Changeset 9778 in orxonox.OLD for branches/new_class_id/src/lib/util/loading
- Timestamp:
- Sep 20, 2006, 9:53:49 AM (18 years ago)
- Location:
- branches/new_class_id/src/lib/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/load_param_class_description.cc
r9777 r9778 121 121 void LoadParamClassDescription::printAll(const std::string& fileName, bool withComments) 122 122 { 123 printf("================== function called\n");124 125 123 FILE* stream; 126 124 if( (stream = fopen (fileName.c_str(), "w")) == NULL) -
branches/new_class_id/src/lib/util/loading/load_param_description.cc
r9777 r9778 70 70 } 71 71 fprintf(stream, "</%s>", this->_name.c_str()); 72 if (!this->_description.empty()) 73 fprintf(stream, " <!-- %s", this->_description.c_str()); 74 // default values 75 if (this->_parameterCount > 0) 72 // here the comments are printed out. 73 if (withComments) 76 74 { 77 fprintf(stream, " (Default: "); 78 for (unsigned int i = 0; i < this->_parameterCount; i++) 75 if (!this->_description.empty()) 76 fprintf(stream, " <!-- %s", this->_description.c_str()); 77 // default values 78 if (this->_parameterCount > 0) 79 79 { 80 if (i > 0) 81 fprintf(stream, ", "); 82 if (this->_types[i] == "string") 83 { // leave brackets !! 84 fprintf(stream, "\"%s\"", this->_defaultValues[i].c_str()); 80 fprintf(stream, " (Default: "); 81 for (unsigned int i = 0; i < this->_parameterCount; i++) 82 { 83 if (i > 0) 84 fprintf(stream, ", "); 85 if (this->_types[i] == "string") 86 { // leave brackets !! 87 fprintf(stream, "\"%s\"", this->_defaultValues[i].c_str()); 88 } 89 else 90 { 91 fprintf(stream, "%s", this->_defaultValues[i].c_str()); 92 } 85 93 } 86 else 87 { 88 fprintf(stream, "%s", this->_defaultValues[i].c_str()); 89 } 94 fprintf(stream, ")"); 90 95 } 91 fprintf(stream, ")"); 96 if (!this->_description.empty() || this->_parameterCount > 0) 97 fprintf(stream, " -->"); 92 98 } 93 if (!this->_description.empty() || this->_parameterCount > 0)94 fprintf(stream, " -->");95 96 99 fprintf(stream, "\n"); 97 100 }
Note: See TracChangeset
for help on using the changeset viewer.