- Timestamp:
- May 22, 2005, 2:15:45 AM (20 years ago)
- Location:
- orxonox/branches/levelLoader/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelLoader/src/story_entities/world.cc
r4253 r4255 176 176 //delete garbagecollecor 177 177 //delete animator 178 179 LoadClassDescription::printAll(); 178 180 179 181 ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL); -
orxonox/branches/levelLoader/src/util/loading/load_param.cc
r4254 r4255 24 24 BaseLoadParam::BaseLoadParam(BaseObject* object, const char* paramName, int paramCount, ...) 25 25 { 26 this->paramDesc = NULL; 26 27 if (LoadClassDescription::parametersDescription) 27 28 { … … 50 51 void BaseLoadParam::describe(const char* descriptionText) 51 52 { 52 if ( this->paramDesc)53 if (LoadClassDescription::parametersDescription && this->paramDesc && !this->paramDesc->getDescription()) 53 54 { 54 55 this->paramDesc->setDescription(descriptionText); 55 56 } 56 57 57 } 58 59 58 60 59 LoadParamDescription::LoadParamDescription(const char* paramName) 61 60 { 62 61 this->types = NULL; 62 this->description = NULL; 63 63 this->paramName = new char[strlen(paramName)+1]; 64 64 strcpy(this->paramName, paramName); 65 65 } 66 66 67 67 68 LoadParamDescription::~LoadParamDescription(void) … … 73 74 delete []this->types; 74 75 delete []this->paramName; 76 } 77 78 void LoadParamDescription::setDescription(const char* descriptionText) 79 { 80 this->description = descriptionText; 81 } 82 83 void LoadParamDescription::print(void) const 84 { 85 PRINT(3)(" <%s>", this->paramName); 86 for (int i = 0; i < this->paramCount; i++) 87 { 88 if (i > 0) 89 PRINT(3)(","); 90 PRINT(3)("%s", this->types[i]); 91 } 92 PRINT(3)("</%s>", this->paramName); 93 if (this->description) 94 PRINT(3)(" -- %s", this->description); 95 PRINT(3)("\n"); 75 96 } 76 97 … … 93 114 } 94 115 116 95 117 LoadClassDescription::~LoadClassDescription(void) 96 118 { … … 105 127 } 106 128 delete iterator; 107 108 129 } 109 130 … … 137 158 { 138 159 delete iterator; 139 this->paramList->add(enumParamDesc);140 160 return enumParamDesc; 141 161 } … … 147 167 return paramList->lastElement(); 148 168 } 169 170 void LoadClassDescription::printAll(void) 171 { 172 PRINT(3)("==============================================================\n"); 173 PRINT(3)(" Listing all the Loadable Options (loaded since Game started.\n\n"); 174 tIterator<LoadClassDescription>* classIT = LoadClassDescription::classList->getIterator(); 175 LoadClassDescription* enumClassDesc = classIT->nextElement(); 176 while (enumClassDesc) 177 { 178 PRINT(3)("<%s>\n", enumClassDesc->className); 179 tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator(); 180 LoadParamDescription* enumParamDesc = paramIT->nextElement(); 181 while (enumParamDesc) 182 { 183 enumParamDesc->print(); 184 enumParamDesc = paramIT->nextElement(); 185 } 186 delete paramIT; 187 188 PRINT(3)("</%s>\n\n", enumClassDesc->className); 189 enumClassDesc = classIT->nextElement(); 190 } 191 delete classIT; 192 193 } -
orxonox/branches/levelLoader/src/util/loading/load_param.h
r4254 r4255 162 162 LoadParamDescription(const char* paramName); 163 163 ~LoadParamDescription(void); 164 165 void setDescription(const char* descriptionText); 166 /** \returns the descriptionString */ 167 const char* getDescription(void) { return this->description;}; 168 169 void print(void) const; 164 170 private: 165 171 char* paramName; 166 172 int paramCount; 167 173 char** types; 174 const char* description; 168 175 }; 169 176 … … 178 185 LoadParamDescription* addParam(const char* paramName); 179 186 180 static bool parametersDescription; 181 187 static void printAll(void); 188 189 static bool parametersDescription; 182 190 static tList<LoadClassDescription>* classList; 183 191 private: … … 189 197 class BaseLoadParam 190 198 { 199 public: 200 void describe(const char* descriptionText); 201 191 202 protected: 192 203 BaseLoadParam(BaseObject* object, const char* paramName, int paramCount, ...); 193 void describe(const char* descriptionText);194 204 195 205 protected: -
orxonox/branches/levelLoader/src/world_entities/skybox.cc
r4253 r4255 56 56 void SkyBox::loadParams(const TiXmlElement* root) 57 57 { 58 LoadParam<SkyBox>(root, "Materialset", this, &SkyBox::setTexture) ;58 LoadParam<SkyBox>(root, "Materialset", this, &SkyBox::setTexture).describe("Sets the material on the skysphere. The string must be the path relative to the data-dir, and without a trailing .jpg"); 59 59 } 60 60
Note: See TracChangeset
for help on using the changeset viewer.