Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 845 for code/branches


Ignore:
Timestamp:
Mar 1, 2008, 9:29:23 PM (17 years ago)
Author:
landauf
Message:

(1) removed ExportClass and ExportAbstractClass macros
(2) removed _UtilExport from templates

reto, i hope (2) removed some of your compiler errors and orxonox works still on your system with (1)

Location:
code/branches/core/src
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core/src/network/Synchronisable.h

    r828 r845  
    22// C++ Interface: synchronisable
    33//
    4 // Description: 
     4// Description:
    55//
    66//
     
    6666    int datasize;
    6767  };
    68 
    69 }
    70 
    71 namespace orxonox
    72 {
    73   template class _NetworkExport ClassIdentifier<network::Synchronisable>;
    74   template class _NetworkExport ObjectList<network::Synchronisable>;
    7568}
    7669
  • code/branches/core/src/orxonox/core/BaseObject.h

    r826 r845  
    5858            const Level* level_;                        //!< The level that loaded this object
    5959    };
    60     ExportClass(BaseObject, Core);
    6160}
    6261
  • code/branches/core/src/orxonox/core/CoreIncludes.h

    r820 r845  
    9191
    9292/**
    93     @brief Exports the necessary templates in order to make them available to all libraries.
    94     @param ClassName The name of the Class
    95     @param LibraryName The name of the Library
    96 */
    97 #define ExportClass(ClassName, LibraryName) \
    98     template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
    99     template class _##LibraryName##Export orxonox::ObjectList<ClassName>; \
    100     template class _##LibraryName##Export orxonox::ClassFactory<ClassName>
    101 
    102 /**
    103     @brief Exports the necessary templates in order to make them available to all libraries.
    104     @param ClassName The name of the Class
    105     @param LibraryName The name of the Library
    106 */
    107 #define ExportAbstractClass(ClassName, LibraryName) \
    108     template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
    109     template class _##LibraryName##Export orxonox::ObjectList<ClassName>
    110 
    111 /**
    11293    @brief Returns the Identifier of the given class.
    11394    @param ClassName The name of the class
  • code/branches/core/src/orxonox/core/DebugLevel.h

    r813 r845  
    6666            ConfigValueContainer* softDebugLevelContainer_; //!< The config value container for the debug level
    6767    };
    68     ExportAbstractClass(DebugLevel, Core);
    6968}
    7069
  • code/branches/core/src/orxonox/core/Language.h

    r839 r845  
    8383            bool bLocalisationSet_;                                 //!< True if the translation was set
    8484    };
    85     template class _CoreExport orxonox::ClassIdentifier<LanguageEntry>;
    86     template class _CoreExport orxonox::ObjectList<LanguageEntry>;
    8785
    8886
     
    118116            std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their labels
    119117    };
    120     template class _CoreExport orxonox::ClassIdentifier<Language>;
    121     template class _CoreExport orxonox::ObjectList<Language>;
    122118}
    123119
  • code/branches/core/src/orxonox/core/OrxonoxClass.h

    r817 r845  
    183183            bool bVisible_;                             //!< True = the object is visible
    184184    };
    185     template class _CoreExport orxonox::ClassIdentifier<OrxonoxClass>;
    186     template class _CoreExport orxonox::ObjectList<OrxonoxClass>;
    187185}
    188186
  • code/branches/core/src/orxonox/objects/Ambient.cc

    r790 r845  
    4545namespace orxonox
    4646{
    47     // create a template instantiations
    48     //template class _OrxonoxExport ClassIdentifier<Ambient>;
    49 
    5047    CreateFactory(Ambient);
    5148
  • code/branches/core/src/orxonox/objects/Ambient.h

    r790 r845  
    1414            virtual ~Ambient();
    1515
    16            
     16
    1717            void loadParams(TiXmlElement* xmlElem);
    1818
    1919        private:
    20            
     20
    2121
    2222    };
    23     ExportClass(Ambient, Orxonox);
    2423}
    2524
  • code/branches/core/src/orxonox/objects/Camera.h

    r790 r845  
    1414            virtual ~Camera();
    1515
    16            
     16
    1717            void loadParams(TiXmlElement* xmlElem);
    1818
    1919        private:
    20            
     20
    2121
    2222    };
    23     ExportClass(Camera, Orxonox);
    2423}
    2524
  • code/branches/core/src/orxonox/objects/Explosion.h

    r790 r845  
    2121            ParticleInterface* particle_;
    2222    };
    23     ExportClass(Explosion, Orxonox);
    2423}
    2524
  • code/branches/core/src/orxonox/objects/Fighter.h

    r790 r845  
    9090            int emitterRate_;
    9191    };
    92     ExportClass(Fighter, Orxonox);
    9392}
    9493
  • code/branches/core/src/orxonox/objects/Model.h

    r790 r845  
    2525            void registerAllVariables();
    2626    };
    27     ExportClass(Model, Orxonox);
    2827}
    2928
  • code/branches/core/src/orxonox/objects/NPC.h

    r790 r845  
    4444      static int const NUMELEMENTS = 9;  //number of elements
    4545  };
    46   ExportClass(NPC, Orxonox);
    47 
    4846}
    4947#endif /* _NPC_H__ */
  • code/branches/core/src/orxonox/objects/Projectile.h

    r790 r845  
    2828            Timer<Projectile> destroyTimer_;
    2929    };
    30     ExportClass(Projectile, Orxonox);
    3130}
    3231
  • code/branches/core/src/orxonox/objects/Skybox.h

    r790 r845  
    1616            virtual ~Skybox();
    1717
    18            
     18
    1919            void loadParams(TiXmlElement* xmlElem);
    2020
    2121        private:
    22            
     22
    2323
    2424    };
    25     ExportClass(Skybox, Orxonox);
    2625}
    2726
  • code/branches/core/src/orxonox/objects/SpaceShip.h

    r790 r845  
    7575            int emitterRate_;
    7676    };
    77     ExportClass(SpaceShip, Orxonox);
    7877}
    7978
  • code/branches/core/src/orxonox/objects/Tickable.h

    r790 r845  
    6767            Tickable() { RegisterRootObject(Tickable); }
    6868    };
    69     ExportAbstractClass(Tickable, Orxonox);
    7069
    7170    //! The TickFrameListener calls the tick(dt) function of all Tickables every frame.
  • code/branches/core/src/orxonox/objects/WorldEntity.h

    r793 r845  
    147147      bool bStatic_;
    148148  };
    149   ExportClass(WorldEntity, Orxonox);
    150149}
    151150
  • code/branches/core/src/orxonox/objects/weapon/AmmunitionDump.h

    r790 r845  
    6666    int *capacity_;
    6767  };
    68   ExportClass(AmmunitionDump, Orxonox);
    6968}
    7069
  • code/branches/core/src/orxonox/objects/weapon/BarrelGun.h

    r790 r845  
    6060
    6161  };
    62   ExportClass(BarrelGun, Orxonox);
    6362}
    6463
  • code/branches/core/src/orxonox/objects/weapon/BaseWeapon.h

    r790 r845  
    122122
    123123  };
    124   ExportAbstractClass(BaseWeapon, Orxonox);
    125124}
    126125
  • code/branches/core/src/orxonox/objects/weapon/Bullet.h

    r790 r845  
    4747    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
    4848 };
    49   ExportClass(Bullet, Orxonox);
    5049}
    5150
  • code/branches/core/src/orxonox/objects/weapon/BulletManager.h

    r790 r845  
    6767          int bulletsIndex_;
    6868  };
    69   ExportClass(BulletManager, Orxonox);
    7069}
    7170
  • code/branches/core/src/orxonox/tools/Timer.h

    r813 r845  
    104104            float time_;        //!< Internal variable, counting the time till the next function-call
    105105    };
    106     ExportAbstractClass(TimerBase, Orxonox);
    107106
    108107    //! The Timer is a callback-object, calling a given function after a given time-interval.
     
    158157            T* object_;
    159158    };
    160     ExportAbstractClass(Timer<BaseObject>, Orxonox);
    161159
    162160    //! The TimerFrameListener manages all Timers in the game.
  • code/branches/core/src/util/Convert.h

    r827 r845  
    4141// DEFAULT CLASS
    4242template <typename FromType, typename ToType>
    43 class _UtilExport Converter
     43class Converter
    4444{
    4545  public:
     
    5252// PARTIAL SPECIALIZATION TO CONVERT TO STRINGS
    5353template<typename FromType>
    54 class _UtilExport Converter<FromType, std::string>
     54class Converter<FromType, std::string>
    5555{
    5656  public:
     
    7070// PARTIAL SPECIALIZATION TO CONVERT FROM STRING
    7171template<typename ToType>
    72 class _UtilExport Converter<std::string, ToType>
     72class Converter<std::string, ToType>
    7373{
    7474  public:
     
    8585// FUNCTION SO WE DO NOT HAVE TO TELL THE COMPILER ABOUT THE TYPE
    8686template<typename FromType, typename ToType>
    87 static _UtilExport bool ConvertValue(ToType* output, const FromType& input)
     87static bool ConvertValue(ToType* output, const FromType& input)
    8888{
    8989  Converter<FromType, ToType> converter;
     
    9393// THE SAME, BUT WITH DEFAULT VALUE
    9494template<typename FromType, typename ToType>
    95 static _UtilExport bool ConvertValue(ToType* output, const FromType& input, const ToType& fallback)
     95static bool ConvertValue(ToType* output, const FromType& input, const ToType& fallback)
    9696{
    9797  Converter<FromType, ToType> converter;
     
    108108// Vector2 to std::string
    109109template <>
    110 class _UtilExport Converter<orxonox::Vector2, std::string>
     110class Converter<orxonox::Vector2, std::string>
    111111{
    112112  public:
     
    126126// Vector3 to std::string
    127127template <>
    128 class _UtilExport Converter<orxonox::Vector3, std::string>
     128class Converter<orxonox::Vector3, std::string>
    129129{
    130130  public:
     
    144144// Vector4 to std::string
    145145template <>
    146 class _UtilExport Converter<orxonox::Vector4, std::string>
     146class Converter<orxonox::Vector4, std::string>
    147147{
    148148  public:
     
    162162// Quaternion to std::string
    163163template <>
    164 class _UtilExport Converter<orxonox::Quaternion, std::string>
     164class Converter<orxonox::Quaternion, std::string>
    165165{
    166166  public:
     
    180180// ColourValue to std::string
    181181template <>
    182 class _UtilExport Converter<orxonox::ColourValue, std::string>
     182class Converter<orxonox::ColourValue, std::string>
    183183{
    184184  public:
  • code/branches/core/src/util/Math.h

    r792 r845  
    5959
    6060template <typename T>
    61 inline _UtilExport T sgn(T x)
     61inline T sgn(T x)
    6262{
    6363    return (x >= 0) ? 1 : -1;
     
    6565
    6666template <typename T>
    67 inline _UtilExport T min(T a, T b)
     67inline T min(T a, T b)
    6868{
    6969    return (a <= b) ? a : b;
     
    7171
    7272template <typename T>
    73 inline _UtilExport T max(T a, T b)
     73inline T max(T a, T b)
    7474{
    7575    return (a >= b) ? a : b;
     
    7777
    7878template <typename T>
    79 inline _UtilExport T clamp(T x, T min, T max)
     79inline T clamp(T x, T min, T max)
    8080{
    8181    if (x < min)
     
    8989
    9090template <typename T>
    91 inline _UtilExport T square(T x)
     91inline T square(T x)
    9292{
    9393    return x*x;
     
    9595
    9696template <typename T>
    97 inline _UtilExport T cube(T x)
     97inline T cube(T x)
    9898{
    9999    return x*x*x;
     
    101101
    102102template <typename T>
    103 inline _UtilExport int floor(T x)
     103inline int floor(T x)
    104104{
    105105    return (int)(x);
     
    107107
    108108template <typename T>
    109 inline _UtilExport int ceil(T x)
     109inline int ceil(T x)
    110110{
    111111    int temp = floor(x);
     
    114114
    115115template <typename T>
    116 inline _UtilExport int round(T x)
     116inline int round(T x)
    117117{
    118118    return (int)(x + 0.5);
     
    120120
    121121template <typename T>
    122 _UtilExport T interpolate(float time, const T& start, const T& end)
     122T interpolate(float time, const T& start, const T& end)
    123123{
    124124    return time * (end - start) + start;
     
    126126
    127127template <typename T>
    128 _UtilExport T interpolateSmooth(float time, const T& start, const T& end)
     128T interpolateSmooth(float time, const T& start, const T& end)
    129129{
    130130    return (-2 * (end - start) * cube(time)) + (3 * (end - start) * square(time)) + start;
  • code/branches/core/src/util/String2Number.h

    r792 r845  
    2424
    2525template <class T>
    26 class _UtilExport String2Number
     26class String2Number
    2727{
    2828  private:
Note: See TracChangeset for help on using the changeset viewer.