Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 19, 2006, 5:49:58 PM (18 years ago)
Author:
bensch
Message:

compiles again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/loading/load_param_class_description.cc

    r9764 r9765  
    1414*/
    1515
    16 #include "load_param_description.h"
     16#include "load_param_class_description.h"
    1717
    1818#include "multi_type.h"
     
    125125 *  A list, that holds all the classes that are loadable (classes not objects!!)
    126126 */
    127 std::list<LoadClassDescription*>* LoadClassDescription::classList = NULL;
     127std::list<LoadParamClassDescription*>* LoadParamClassDescription::classList = NULL;
    128128
    129129/**
    130130 *  if the description of Parameters should be executed
    131131 */
    132 bool LoadClassDescription::parametersDescription = false;
     132bool LoadParamClassDescription::parametersDescription = false;
    133133
    134134/**
    135135 * @param className the name of the class to be loadable
    136136 */
    137 LoadClassDescription::LoadClassDescription(const std::string& className)
     137LoadParamClassDescription::LoadParamClassDescription(const std::string& className)
    138138{
    139139  this->className = className;
    140140
    141   if (LoadClassDescription::classList == NULL)
    142     LoadClassDescription::classList = new std::list<LoadClassDescription*>;
    143 
    144   LoadClassDescription::classList->push_back(this);
     141  if (LoadParamClassDescription::classList == NULL)
     142    LoadParamClassDescription::classList = new std::list<LoadParamClassDescription*>;
     143
     144  LoadParamClassDescription::classList->push_back(this);
    145145}
    146146
     
    148148 *  deletes a classDescription (deletes all the parameterDescriptions as well
    149149 */
    150 LoadClassDescription::~LoadClassDescription()
     150LoadParamClassDescription::~LoadParamClassDescription()
    151151{
    152152  std::list<LoadParamDescription*>::iterator it = this->paramList.begin();
     
    158158}
    159159
    160 void LoadClassDescription::deleteAllDescriptions()
    161 {
    162   if (LoadClassDescription::classList != NULL)
    163   {
    164     while (!LoadClassDescription::classList->empty())
    165     {
    166       delete LoadClassDescription::classList->front();
    167       LoadClassDescription::classList->pop_front();
    168     }
    169     delete LoadClassDescription::classList;
    170   }
    171   LoadClassDescription::classList = NULL;
     160void LoadParamClassDescription::deleteAllDescriptions()
     161{
     162  if (LoadParamClassDescription::classList != NULL)
     163  {
     164    while (!LoadParamClassDescription::classList->empty())
     165    {
     166      delete LoadParamClassDescription::classList->front();
     167      LoadParamClassDescription::classList->pop_front();
     168    }
     169    delete LoadParamClassDescription::classList;
     170  }
     171  LoadParamClassDescription::classList = NULL;
    172172}
    173173
     
    180180   Otherwise it returns a new classDescription
    181181 */
    182 LoadClassDescription* LoadClassDescription::addClass(const std::string& className)
    183 {
    184   if (LoadClassDescription::classList != NULL)
    185   {
    186     std::list<LoadClassDescription*>::iterator it = LoadClassDescription::classList->begin();
    187     while (it != LoadClassDescription::classList->end())
     182LoadParamClassDescription* LoadParamClassDescription::addClass(const std::string& className)
     183{
     184  if (LoadParamClassDescription::classList != NULL)
     185  {
     186    std::list<LoadParamClassDescription*>::iterator it = LoadParamClassDescription::classList->begin();
     187    while (it != LoadParamClassDescription::classList->end())
    188188    {
    189189      if ((*it)->className == className)
     
    194194    }
    195195  }
    196   return new LoadClassDescription(className);
     196  return new LoadParamClassDescription(className);
    197197}
    198198
     
    201201 * @param paramName the name of the parameter to add.
    202202 */
    203 LoadParamDescription* LoadClassDescription::addParam(const std::string& paramName)
     203LoadParamDescription* LoadParamClassDescription::addParam(const std::string& paramName)
    204204{
    205205  std::list<LoadParamDescription*>::iterator it = this->paramList.begin();
     
    224224 * @todo implement it
    225225 */
    226 void LoadClassDescription::printAll(const std::string& fileName)
     226void LoadParamClassDescription::printAll(const std::string& fileName)
    227227{
    228228  PRINT(3)("===============================================================\n");
    229229  PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n");
    230   if (LoadClassDescription::classList != NULL)
    231   {
    232     std::list<LoadClassDescription*>::iterator classDesc = LoadClassDescription::classList->begin();
    233     while (classDesc != LoadClassDescription::classList->end())
     230  if (LoadParamClassDescription::classList != NULL)
     231  {
     232    std::list<LoadParamClassDescription*>::iterator classDesc = LoadParamClassDescription::classList->begin();
     233    while (classDesc != LoadParamClassDescription::classList->end())
    234234    {
    235235      PRINT(3)("<%s>\n", (*classDesc)->className.c_str());
     
    255255 * !! The strings MUST NOT be deleted !!
    256256 */
    257 std::list<std::string> LoadClassDescription::searchClassWithShort(const std::string& classNameBegin)
     257std::list<std::string> LoadParamClassDescription::searchClassWithShort(const std::string& classNameBegin)
    258258{
    259259  /// FIXME
     
    262262  std::list<const std::string&> retVal;
    263263
    264   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    265   LoadClassDescription* enumClassDesc = iterator->firstElement();
     264  tIterator<LoadParamClassDescription>* iterator = LoadParamClassDescription::classList->getIterator();
     265  LoadParamClassDescription* enumClassDesc = iterator->firstElement();
    266266  while (enumClassDesc)
    267267  {
Note: See TracChangeset for help on using the changeset viewer.