Changeset 1161 for trunk/packages/vizservers/nanovis/AxisRange.h
- Timestamp:
- Sep 24, 2008, 10:03:52 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/AxisRange.h
r1111 r1161 2 2 #define _AXIS_RANGE_H 3 3 4 #include <string.h> 5 4 6 class AxisRange { 5 7 double min_, max_; 8 char *units_; 6 9 public: 7 10 AxisRange(void) { 8 11 min(0.0), max(1.0); 12 } 13 ~AxisRange(void) { 14 if (units_ != NULL) { 15 delete [] units_; 16 } 9 17 } 10 18 void SetRange(double min, double max) { … … 23 31 max_ = max; 24 32 } 33 const char *units(void) { 34 return units_; 35 } 36 void units(const char *units) { 37 if (units_ != NULL) { 38 delete [] units_; 39 } 40 units_ = new char [strlen(units) + 1]; 41 strcpy(units_, units); 42 } 25 43 }; 26 44
Note: See TracChangeset
for help on using the changeset viewer.