Template:CMI Example get grid CXX: Difference between revisions

From CSDMS
Automated import of articles
 
Automated import of articles *** existing text overwritten ***
Line 1: Line 1:
<syntaxhighlight lang=cpp>
    sidl::array<double> x = this->CMI_get_grid_x (long_var_name);
    sidl::array<double> y = this->CMI_get_grid_y (long_var_name);
    sidl::array<int> c = this->get_grid_connectivity (long_var_name);
    sidl::array<int> o = this->get_grid_offset (long_var_name);
    ::edu::csdms::tools::CMIGrid grid =
      ::edu::csdms::tools::CMIGrid::_create ();


    grid.initialize (x, y, c, o);
    return ::babel_cast<edu::csdms::cmi::IGrid>(grid);
</syntaxhighlight>

Revision as of 17:12, 1 February 2012