- Timestamp:
- Mar 13, 2006 8:38:26 PM (18 years ago)
- Location:
- trunk/src/mesh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mesh/grid2d.cc
r336 r342 53 53 // expand points and add them to m_data 54 54 // 55 RpGrid2d::RpGrid2d(DataValType x_min, DataValType x_max, intx_delta,56 DataValType y_min, DataValType y_max, inty_delta)55 RpGrid2d::RpGrid2d(DataValType x_min, DataValType x_max, DataValType x_delta, 56 DataValType y_min, DataValType y_max, DataValType y_delta) 57 57 { 58 58 setUniformGrid(x_min, x_max, x_delta, y_min, y_max, y_delta); … … 60 60 61 61 RP_ERROR 62 RpGrid2d::setUniformGrid(DataValType x_min, DataValType x_max, intx_delta,63 DataValType y_min, DataValType y_max, inty_delta)62 RpGrid2d::setUniformGrid(DataValType x_min, DataValType x_max, DataValType x_delta, 63 DataValType y_min, DataValType y_max, DataValType y_delta) 64 64 { 65 65 // expand array, inclusive of origin and max … … 154 154 } 155 155 156 // 157 // serialize object to a byte stream 158 // Output: 159 // nbytes: total number of bytes in the byte stream 160 // return pointer to buffer holding the byte stream 161 // 162 char* 163 RpGrid2d::serialize(int& nbytes) 164 { 165 // call base class serialize() 166 char* buf = RpGrid1d::serialize(nbytes); 167 168 // now, override the header with correct object type 169 writeRpHeader(buf, RpCurrentVersion[GRID2D], nbytes); 170 171 return buf; 156 // 157 // serialization 158 // 159 RP_ERROR 160 RpGrid2d::doSerialize(char* buf, int nbytes) 161 { 162 RP_ERROR err; 163 164 // call base class doSerialize() 165 err = RpGrid1d::doSerialize(buf, nbytes); 166 167 if (err == RP_SUCCESS) { 168 // now, override the header with correct object type 169 writeRpHeader(buf, RpCurrentVersion[GRID2D], nbytes); 170 } 171 172 return err; 173 172 174 } 173 175 -
trunk/src/mesh/grid2d.h
r336 r342 27 27 // constructor - uniform 2d grid, data expanded inclusive of 28 28 // origin and max 29 RpGrid2d(DataValType x_min, DataValType x_max, intx_delta,30 DataValType y_min, DataValType y_max, inty_delta);29 RpGrid2d(DataValType x_min, DataValType x_max, DataValType x_delta, 30 DataValType y_min, DataValType y_max, DataValType y_delta); 31 31 32 32 // constructor - 2d rectilinear grid … … 43 43 RP_ERROR addAllPoints(DataValType* points, int npoints); 44 44 45 RP_ERROR setUniformGrid(DataValType xmin, DataValType xmax, int xdelta, 46 DataValType ymin, DataValType ymax, int ydelta); 45 RP_ERROR setUniformGrid(DataValType xmin, DataValType xmax, 46 DataValType xdelta, 47 DataValType ymin, DataValType ymax, DataValType ydelta); 47 48 48 49 // add points of a rectilinear grid … … 59 60 60 61 // serialize data 61 virtual char * serialize(int& nbytes); 62 //virtual char * serialize(int& nbytes); 63 virtual RP_ERROR doSerialize(char* buf, int nbytes); 64 62 65 virtual RP_ERROR deserialize(const char* buf); 63 66
Note: See TracChangeset
for help on using the changeset viewer.