Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6512 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Jan 17, 2006, 10:01:07 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL

SuperClass::loadParams(root);

isntead of:
static_cast<SuperClass*>(this)→loadParams(root);

which was quite stupid anyways

Location:
trunk/src/lib
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r6498 r6512  
    123123void PNode::loadParams(const TiXmlElement* root)
    124124{
    125   static_cast<BaseObject*>(this)->loadParams(root);
     125  BaseObject::loadParams(root);
    126126
    127127  LoadParam(root, "rel-coor", this, PNode, setRelCoor)
  • trunk/src/lib/coord/p_node.h

    r6498 r6512  
    7878  virtual ~PNode ();
    7979
    80   void loadParams(const TiXmlElement* root);
     80  virtual void loadParams(const TiXmlElement* root);
    8181
    8282  void init();
  • trunk/src/lib/graphics/light.cc

    r5982 r6512  
    8686void Light::loadParams(const TiXmlElement* root)
    8787{
    88   static_cast<PNode*>(this)->loadParams(root);
     88  PNode::loadParams(root);
    8989
    9090  LoadParam(root, "diffuse-color", this, Light, setDiffuseColor)
  • trunk/src/lib/graphics/light.h

    r5405 r6512  
    2929  virtual ~Light();
    3030
    31   void loadParams(const TiXmlElement* root);
     31  virtual void loadParams(const TiXmlElement* root);
    3232
    3333  void setDiffuseColor(GLfloat r, GLfloat g, GLfloat b);
     
    9595  inline static LightManager* getInstance() { if (!singletonRef) singletonRef = new LightManager();  return singletonRef; };
    9696
    97   void loadParams(const TiXmlElement* root);
     97  virtual void loadParams(const TiXmlElement* root);
    9898  void loadLights(const TiXmlElement* root);
    9999
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r6307 r6512  
    131131void Element2D::loadParams(const TiXmlElement* root)
    132132{
     133  BaseObject::loadParams(root);
     134
    133135  // ELEMENT2D-native settings.
    134136  LoadParam(root, "alignment", this, Element2D, setAlignment)
  • trunk/src/lib/graphics/render2D/element_2d.h

    r6299 r6512  
    9191    virtual ~Element2D();
    9292
    93     void loadParams(const TiXmlElement* root);
     93    virtual void loadParams(const TiXmlElement* root);
    9494
    9595    // ACTIVATION //
  • trunk/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.h

    r5312 r6512  
    1717 public:
    1818  GLMenuImageScreen (const TiXmlElement* root = NULL);
    19   void loadParams(const TiXmlElement* root);
     19  virtual void loadParams(const TiXmlElement* root);
    2020  virtual ~GLMenuImageScreen ();
    2121
  • trunk/src/lib/lang/base_object.h

    r6341 r6512  
    2828  virtual ~BaseObject ();
    2929
    30   void loadParams(const TiXmlElement* root);
     30  virtual void loadParams(const TiXmlElement* root);
    3131  void setName (const char* newName);
    3232  /** returns the Name of this Object */
  • trunk/src/lib/particles/particle_emitter.cc

    r5750 r6512  
    9393void ParticleEmitter::loadParams(const TiXmlElement* root)
    9494{
    95   static_cast<PNode*>(this)->loadParams(root);
     95  PNode::loadParams(root);
    9696
    9797  LoadParam(root, "type", this, ParticleEmitter, setType)
  • trunk/src/lib/particles/particle_emitter.h

    r5405 r6512  
    3939
    4040  void init();
    41   void loadParams(const TiXmlElement* root);
     41  virtual void loadParams(const TiXmlElement* root);
    4242
    4343  /* controlling the emitter: interface */
  • trunk/src/lib/particles/particle_engine.h

    r5944 r6512  
    3737  inline static ParticleEngine* getInstance() { if (!singletonRef) singletonRef = new ParticleEngine();  return singletonRef; };
    3838
    39   void loadParams(const TiXmlElement* root);
     39  virtual void loadParams(const TiXmlElement* root);
    4040
    4141  void tick(float dt);
  • trunk/src/lib/particles/particle_system.cc

    r6308 r6512  
    116116void ParticleSystem::loadParams(const TiXmlElement* root)
    117117{
    118   static_cast<WorldEntity*>(this)->loadParams(root);
    119   static_cast<PhysicsInterface*>(this)->loadParams(root);
     118  WorldEntity::loadParams(root);
     119  PhysicsInterface::loadParams(root);
    120120
    121121  LoadParam(root, "max-count", this, ParticleSystem, setMaxCount)
  • trunk/src/lib/particles/particle_system.h

    r5446 r6512  
    7474
    7575  void init();
    76   void loadParams(const TiXmlElement* root);
     76  virtual void loadParams(const TiXmlElement* root);
    7777
    7878  void setType(const char* particleType);
  • trunk/src/lib/physics/fields/field.cc

    r5708 r6512  
    5858void Field::loadParams(const TiXmlElement* root)
    5959{
    60   static_cast<PNode*>(this)->loadParams(root);
     60  PNode::loadParams(root);
    6161
    6262  LoadParam(root, "magnitude", this, Field, setMagnitude)
  • trunk/src/lib/physics/fields/field.h

    r5405 r6512  
    3939
    4040  void init();
    41   void loadParams(const TiXmlElement* root);
     41  virtual void loadParams(const TiXmlElement* root);
    4242
    4343  /**
  • trunk/src/lib/physics/fields/gravity.cc

    r5750 r6512  
    4444void Gravity::loadParams(const TiXmlElement* root)
    4545{
    46   static_cast<Field*>(this)->loadParams(root);
     46  Field::loadParams(root);
    4747}
    4848
  • trunk/src/lib/physics/fields/gravity.h

    r5405 r6512  
    2121  virtual ~Gravity();
    2222
    23   void loadParams(const TiXmlElement* root);
     23  virtual void loadParams(const TiXmlElement* root);
    2424
    2525  virtual Vector calcForce(const Vector& data) const;
  • trunk/src/lib/physics/physics_connection.cc

    r5750 r6512  
    5050  this->type = PCON_PhysIField;
    5151
    52   static_cast<BaseObject*>(this)->loadParams(root);
     52  BaseObject::loadParams(root);
    5353
    5454  LoadParam(root, "subject", this, PhysicsConnection, setSubject)
  • trunk/src/lib/physics/physics_engine.h

    r5779 r6512  
    2727  inline static PhysicsEngine* getInstance() { if (!singletonRef) singletonRef = new PhysicsEngine();  return singletonRef; };
    2828
    29   void loadParams(const TiXmlElement* root);
     29  virtual void loadParams(const TiXmlElement* root);
    3030  void loadFields(const TiXmlElement* root);
    3131  void loadConnections(const TiXmlElement* root);
Note: See TracChangeset for help on using the changeset viewer.