Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 19, 2008, 8:43:36 PM (17 years ago)
Author:
landauf
Message:

using "XMLPort::Mode mode" instead of "bool loading" in all XMLPort functions

Location:
code/branches/core2/src/orxonox/objects
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/objects/Ambient.cc

    r871 r902  
    8585        @return The XML-element
    8686    */
    87     void Ambient::XMLPort(Element& xmlelement, bool loading)
     87    void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    8888    {
    89         BaseObject::XMLPort(xmlelement, loading);
     89        BaseObject::XMLPort(xmlelement, mode);
    9090
    91         XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, loading);
     91        XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, mode);
    9292    }
    9393}
  • code/branches/core2/src/orxonox/objects/Ambient.h

    r871 r902  
    1515
    1616            void loadParams(TiXmlElement* xmlElem);
    17             virtual void XMLPort(Element& xmlelement, bool loading);
     17            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    1818            void setAmbientLight(const ColourValue& colour);
    1919
  • code/branches/core2/src/orxonox/objects/Model.cc

    r871 r902  
    6767        @return The XML-element
    6868    */
    69     void Model::XMLPort(Element& xmlelement, bool loading)
     69    void Model::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7070    {
    71         WorldEntity::XMLPort(xmlelement, loading);
     71        WorldEntity::XMLPort(xmlelement, mode);
    7272
    73         XMLPortParamLoadOnly(Model, "mesh", setMesh, xmlelement, loading);
     73        XMLPortParamLoadOnly(Model, "mesh", setMesh, xmlelement, mode);
    7474
    7575        create();
  • code/branches/core2/src/orxonox/objects/Model.h

    r871 r902  
    1818            virtual ~Model();
    1919            virtual void loadParams(TiXmlElement* xmlElem);
    20             virtual void XMLPort(Element& xmlelement, bool loading);
     20            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    2121            void setMesh(const std::string& meshname);
    2222            bool create();
  • code/branches/core2/src/orxonox/objects/Skybox.cc

    r871 r902  
    7777        @return The XML-element
    7878    */
    79     void Skybox::XMLPort(Element& xmlelement, bool loading)
     79    void Skybox::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    8080    {
    81         BaseObject::XMLPort(xmlelement, loading);
     81        BaseObject::XMLPort(xmlelement, mode);
    8282
    83         XMLPortParamLoadOnly(Skybox, "src", setSkybox, xmlelement, loading);
     83        XMLPortParamLoadOnly(Skybox, "src", setSkybox, xmlelement, mode);
    8484    }
    8585}
  • code/branches/core2/src/orxonox/objects/Skybox.h

    r871 r902  
    1717
    1818            void loadParams(TiXmlElement* xmlElem);
    19             virtual void XMLPort(Element& xmlelement, bool loading);
     19            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    2020            void setSkybox(const std::string& skyboxname);
    2121
  • code/branches/core2/src/orxonox/objects/SpaceShip.cc

    r871 r902  
    291291        @return The XML-element
    292292    */
    293     void SpaceShip::XMLPort(Element& xmlelement, bool loading)
    294     {
    295         Model::XMLPort(xmlelement, loading);
    296 
    297         XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, loading);
    298         XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, loading);
    299         XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, loading);
    300         XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, loading);
    301         XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, loading);
    302         XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, loading);
    303         XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, loading);
    304         XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, loading);
     293    void SpaceShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     294    {
     295        Model::XMLPort(xmlelement, mode);
     296
     297        XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, mode);
     298        XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, mode);
     299        XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, mode);
     300        XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, mode);
     301        XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, mode);
     302        XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, mode);
     303        XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);
     304        XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, mode);
    305305    }
    306306
  • code/branches/core2/src/orxonox/objects/SpaceShip.h

    r871 r902  
    2424            void setConfigValues();
    2525            virtual void loadParams(TiXmlElement* xmlElem);
    26             virtual void XMLPort(Element& xmlelement, bool loading);
     26            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    2727            virtual void tick(float dt);
    2828
  • code/branches/core2/src/orxonox/objects/WorldEntity.cc

    r879 r902  
    171171        @return The XML-element
    172172    */
    173     void WorldEntity::XMLPort(Element& xmlelement, bool loading)
    174     {
    175         BaseObject::XMLPort(xmlelement, loading);
    176 
    177         XMLPortParam(WorldEntity, "position", setPositionLoader2, getPosition, xmlelement, loading);
    178         XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionLoader, xmlelement, loading);
    179         XMLPortParamLoadOnly(WorldEntity, "yawpitchroll", setYawPitchRoll, xmlelement, loading);
    180         XMLPortParam(WorldEntity, "scale", setTotalScale, getScale, xmlelement, loading);
    181         XMLPortParam(WorldEntity, "rotationAxis", setRotationAxisLoader, getRotationAxis, xmlelement, loading);
    182         XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, loading);
    183 
    184         XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, loading, false, true);
     173    void WorldEntity::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     174    {
     175        BaseObject::XMLPort(xmlelement, mode);
     176
     177        XMLPortParam(WorldEntity, "position", setPositionLoader2, getPosition, xmlelement, mode);
     178        XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionLoader, xmlelement, mode);
     179        XMLPortParamLoadOnly(WorldEntity, "yawpitchroll", setYawPitchRoll, xmlelement, mode);
     180        XMLPortParam(WorldEntity, "scale", setTotalScale, getScale, xmlelement, mode);
     181        XMLPortParam(WorldEntity, "rotationAxis", setRotationAxisLoader, getRotationAxis, xmlelement, mode);
     182        XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, mode);
     183
     184        XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, mode, false, true);
    185185    }
    186186
  • code/branches/core2/src/orxonox/objects/WorldEntity.h

    r877 r902  
    2525            virtual void tick(float dt);
    2626            virtual void loadParams(TiXmlElement* xmlElem);
    27             virtual void XMLPort(Element& xmlelement, bool loading);
     27            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    2828            bool create();
    2929
Note: See TracChangeset for help on using the changeset viewer.