Changeset 604 for ossie/trunk/ossie/parser/InstantiationProperty.cpp
- Timestamp:
- 10/05/05 14:34:19 (8 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ossie/trunk/ossie/parser/InstantiationProperty.cpp
r397 r604 32 32 {} 33 33 34 35 34 InstantiationProperty::InstantiationProperty(const char *_id, const char *_value): 36 35 id(NULL), value(NULL) … … 42 41 strcpy (value, _value); 43 42 } 44 45 43 46 44 InstantiationProperty::InstantiationProperty(const InstantiationProperty & _copy): … … 54 52 } 55 53 56 57 54 InstantiationProperty::~InstantiationProperty() 58 55 { … … 61 58 } 62 59 63 64 60 void InstantiationProperty::setID(const char *_id) 65 61 { 66 if (id != NULL) delete []id;67 id = new char[strlen(_id) + 1];68 strcpy(id, _id);62 if (id != NULL) delete []id; 63 id = new char[strlen(_id) + 1]; 64 strcpy(id, _id); 69 65 } 70 66 71 72 void InstantiationProperty::setValue (const char *_value) 67 void InstantiationProperty::setValue(const char *_value) 73 68 { 74 if (value != NULL) delete []value;75 value = new char[strlen(_value) + 1];76 strcpy(value, _value);69 if (value != NULL) delete []value; 70 value = new char[strlen(_value) + 1]; 71 strcpy(value, _value); 77 72 } 78 73 79 74 // \note the caller must delete this pointer 75 // \remark why do we have this? java implementation translation? ~tp 80 76 char* InstantiationProperty::toString() 81 77 {