Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9757 in orxonox.OLD for branches/new_class_id/src/lib


Ignore:
Timestamp:
Sep 18, 2006, 10:06:19 PM (18 years ago)
Author:
bensch
Message:

new_class_id: hups… this was bad naming… confusing too.

Location:
branches/new_class_id/src/lib
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/coord/p_node.cc

    r9755 r9757  
    7878PNode::~PNode ()
    7979{
    80   PRINTF(0)("delete %s::%s\n", this->getClassCName(), this->getCName());
     80  PRINTF(4)("delete %s::%s\n", this->getClassCName(), this->getCName());
    8181  this->debugNode(0);
    8282  // remove the Node, delete it's children (if required).
  • branches/new_class_id/src/lib/graphics/effects/cloud_effect.cc

    r9746 r9757  
    4949
    5050
    51 CREATE_SCRIPTABLE_CLASS(CloudEffect, CloudEffect::classID(),
     51CREATE_SCRIPTABLE_CLASS(CloudEffect,
    5252                        addMethod("skyColor", Executor4<CloudEffect, lua_State*,float,float,float,float>(&CloudEffect::shellSkyColor))
    5353                        ->addMethod("cloudColor", Executor4<CloudEffect, lua_State*,float,float,float,float>(&CloudEffect::shellCloudColor))
  • branches/new_class_id/src/lib/graphics/effects/fog_effect.cc

    r9746 r9757  
    3232#include "class_id_DEPRECATED.h"
    3333
    34 CREATE_SCRIPTABLE_CLASS(FogEffect, FogEffect::classID(),
     34CREATE_SCRIPTABLE_CLASS(FogEffect,
    3535                        addMethod("fadeIn", Executor0<FogEffect, lua_State*>(&FogEffect::fadeInFog))
    3636                            ->addMethod("fadeOut", Executor0<FogEffect, lua_State*>(&FogEffect::fadeOutFog))
  • branches/new_class_id/src/lib/graphics/effects/lightning_effect.cc

    r9746 r9757  
    3535SHELL_COMMAND(deactivate, LightningEffect, deactivateLightning);
    3636
    37 CREATE_SCRIPTABLE_CLASS(LightningEffect, LightningEffect::classID(),
     37CREATE_SCRIPTABLE_CLASS(LightningEffect,
    3838                        addMethod("activate", Executor0<LightningEffect, lua_State*>(&LightningEffect::activate))
    3939                            ->addMethod("deactivate", Executor0<LightningEffect, lua_State*>(&LightningEffect::deactivate))
  • branches/new_class_id/src/lib/graphics/effects/rain_effect.cc

    r9746 r9757  
    4444
    4545
    46 CREATE_SCRIPTABLE_CLASS(RainEffect, RainEffect::classID(),
     46CREATE_SCRIPTABLE_CLASS(RainEffect,
    4747                        addMethod("startRaining", Executor0<RainEffect, lua_State*>(&RainEffect::startRaining))
    4848                            ->addMethod("stopRaining", Executor0<RainEffect, lua_State*>(&RainEffect::stopRaining))
  • branches/new_class_id/src/lib/graphics/effects/snow_effect.cc

    r9746 r9757  
    3737
    3838
    39 CREATE_SCRIPTABLE_CLASS(SnowEffect, SnowEffect::classID(),
     39CREATE_SCRIPTABLE_CLASS(SnowEffect,
    4040                            addMethod("activate", Executor0<SnowEffect, lua_State*>(&SnowEffect::activate))
    4141                            ->addMethod("deactivate", Executor0<SnowEffect, lua_State*>(&SnowEffect::deactivate))
  • branches/new_class_id/src/lib/gui/gl/glgui_box.cc

    r9715 r9757  
    150150    while (itC != this->_children.end())
    151151    {
    152       if ((*itC)->isA(GLGuiContainer::classID()))
     152      if ((*itC)->isA(GLGuiContainer::staticClassID()))
    153153        static_cast<GLGuiContainer*>(*itC)->showAll();
    154154      else
     
    165165    while (itC != this->_children.end())
    166166    {
    167       if ((*itC)->isA(GLGuiContainer::classID()))
     167      if ((*itC)->isA(GLGuiContainer::staticClassID()))
    168168        static_cast<GLGuiContainer*>(*itC)->hideAll();
    169169      else
  • branches/new_class_id/src/lib/gui/gl/glgui_frame.cc

    r9715 r9757  
    7171    if (this->child != NULL)
    7272    {
    73       if (this->child->isA(GLGuiContainer::classID()))
     73      if (this->child->isA(GLGuiContainer::staticClassID()))
    7474        static_cast<GLGuiContainer*>(this->child)->showAll();
    7575      else
     
    8383    if (this->child != NULL)
    8484    {
    85       if (this->child->isA(GLGuiContainer::classID()))
     85      if (this->child->isA(GLGuiContainer::staticClassID()))
    8686        static_cast<GLGuiContainer*>(this->child)->hideAll();
    8787      else
  • branches/new_class_id/src/lib/lang/class_id.h

    r9716 r9757  
    6161public:
    6262  /** @returns the NullClass' ID. */
    63   static const ClassID& classID() { return NullClass::_classID; }
     63  static const ClassID& staticClassID() { return NullClass::_classID; }
    6464  /** @param id the ID to acquire @param name the name to acquire @brief acquires the ID of this Class */
    6565  static void acquireID(const int*& id, const std::string*& name) { id = &_nullID; name = &_nullName; };
     
    6969
    7070private:
    71   static ClassID         _classID;      //!< The NullClass' ID
     71  static ClassID            _classID;      //!< The NullClass' ID
    7272  static const std::string  _nullName;     //!< The NullClass' Name ("NullClass")
    7373  static int                _nullID;       //!< The NullClass' ID
  • branches/new_class_id/src/lib/lang/object_list.cc

    r9726 r9757  
    125125    return base->_identity;
    126126  else
    127     return NullClass::classID();
     127    return NullClass::staticClassID();
    128128}
    129129
     
    141141    return base->_identity;
    142142  else
    143     return NullClass::classID();
     143    return NullClass::staticClassID();
    144144}
    145145
  • branches/new_class_id/src/lib/lang/object_list.h

    r9726 r9757  
    2525  public: \
    2626   static inline const ObjectList<ClassName>& objectList() { return ClassName::_objectList; }; \
    27    static inline const ClassID& classID() { return ClassName::_objectList.identity(); }; \
     27   static inline const ClassID& staticClassID() { return ClassName::_objectList.identity(); }; \
    2828  private: \
    2929   static ObjectList<ClassName> _objectList
  • branches/new_class_id/src/lib/network/network_game_manager.cc

    r9715 r9757  
    9292  assert( SharedNetworkData::getInstance()->isMasterServer());
    9393  assert( State::getGameRules() );
    94   assert( State::getGameRules()->isA( NetworkGameRules::classID()) );
     94  assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) );
    9595
    9696  NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
     
    105105
    106106  assert( bo != NULL );
    107   assert( bo->isA( Playable::classID()) );
     107  assert( bo->isA( Playable::staticClassID()) );
    108108
    109109  Playable & playable = *(dynamic_cast<Playable*>(bo));
     
    130130    stats->setNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Server" ) );
    131131
    132   if ( rules.isA( MultiplayerTeamDeathmatch::classID()) )
     132  if ( rules.isA( MultiplayerTeamDeathmatch::staticClassID()) )
    133133    dynamic_cast<MultiplayerTeamDeathmatch*>(&rules)->respawnPlayable( &playable, team, 0.0f );
    134134
     
    192192    if ( (*it)->getUniqueID() == uniqueId )
    193193    {
    194       if ( (*it)->isA(Playable::classID()) )
     194      if ( (*it)->isA(Playable::staticClassID()) )
    195195      {
    196196        getInstance()->playablesToDelete.push_back( dynamic_cast<Playable*>(*it) );
     
    321321
    322322  assert( State::getGameRules() );
    323   assert( State::getGameRules()->isA( NetworkGameRules::classID()) );
     323  assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) );
    324324
    325325  NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
  • branches/new_class_id/src/lib/network/network_stream.cc

    r9716 r9757  
    967967
    968968      // if handshake not finished only sync handshake
    969       if ( peer->second.handshake && Handshake::classID() != sync.getLeafClassID())
     969      if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID())
    970970        continue;
    971971
     
    973973      if ( ( SharedNetworkData::getInstance()->isMasterServer() ||
    974974             SharedNetworkData::getInstance()->isProxyServerActive() &&  peer->second.isClient())
    975              && Handshake::classID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )
     975             && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )
    976976        continue;
    977977
    978978      /* list of synchronizeables that will never be synchronized over the network: */
    979979      // do not sync null parent
    980       if ( NullParent::classID() == sync.getLeafClassID())
     980      if ( NullParent::staticClassID() == sync.getLeafClassID())
    981981        continue;
    982982
     
    11871187          /* These are some small exeptions in creation: Not all objects can/should be created via Factory */
    11881188          /* Exception 1: NullParent */
    1189           if( NullParent::classID() == leafClassId || Synchronizeable::classID() == leafClassId || NetworkGameManager::classID() == leafClassId)
     1189          if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId)
    11901190          {
    11911191            PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
     
    12031203          }
    12041204
    1205           if ( b->isA(Synchronizeable::classID()) )
     1205          if ( b->isA(Synchronizeable::staticClassID()) )
    12061206          {
    12071207            sync = dynamic_cast<Synchronizeable*>(b);
  • branches/new_class_id/src/lib/network/synchronizeable.cc

    r9715 r9757  
    7575    // remove the message manager only by the server
    7676    if ( (SharedNetworkData::getInstance()->isMasterServer() )
    77           && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( MessageManager::classID() ) )
     77          && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( MessageManager::staticClassID() ) )
    7878      NetworkGameManager::getInstance()->removeSynchronizeable( this->getUniqueID() );
    7979  }
  • branches/new_class_id/src/lib/particles/particle_system.cc

    r9727 r9757  
    134134    if (emitter != NULL)
    135135    {
    136       if (emitter->isA(ParticleEmitter::classID()))
     136      if (emitter->isA(ParticleEmitter::staticClassID()))
    137137        this->addEmitter(dynamic_cast<ParticleEmitter*>(emitter));
    138138      else
  • branches/new_class_id/src/lib/script_engine/script.cc

    r9749 r9757  
    2525ObjectListDefinition(Script);
    2626
    27 CREATE_SCRIPTABLE_CLASS(Script, Script::classID(),
     27CREATE_SCRIPTABLE_CLASS(Script,
    2828                    addMethod("addObject", Executor2<Script, lua_State*,const std::string&, const std::string& >(&Script::addObject))
    2929                    ->addMethod("registerClass", Executor1<Script, lua_State*,const std::string&>(&Script::registerClass))
  • branches/new_class_id/src/lib/script_engine/script_class.h

    r9749 r9757  
    1818 * this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
    1919 */
    20 #define CREATE_SCRIPTABLE_CLASS(CLASS_NAME, CLASS_ID, SCRIPT_METHODS) \
    21     tScriptClass<CLASS_NAME> global_##CLASS_NAME##_ScriptableClass(#CLASS_NAME, CLASS_ID, (new ScriptMethod)->SCRIPT_METHODS)
     20#define CREATE_SCRIPTABLE_CLASS(CLASS_NAME, SCRIPT_METHODS) \
     21    tScriptClass<CLASS_NAME> global_##CLASS_NAME##_ScriptableClass(#CLASS_NAME, CLASS_NAME::staticClassID(), (new ScriptMethod)->SCRIPT_METHODS)
    2222
    2323
  • branches/new_class_id/src/lib/shell/shell_completion.cc

    r9734 r9757  
    8787      if (objectList != NULL)
    8888        classID = objectList->identity();
    89       if (classID != NullClass::classID())
     89      if (classID != NullClass::staticClassID())
    9090        completeType |= ObjectCompletion;
    9191      completeType |= FunctionCompletion;
  • branches/new_class_id/src/lib/util/loading/factory.h

    r9715 r9757  
    3434 */
    3535#define CREATE_FACTORY(CLASS_NAME) \
    36     tFactory<CLASS_NAME>* global_##CLASS_NAME##_Factory = new tFactory<CLASS_NAME>(CLASS_NAME::classID())
     36    tFactory<CLASS_NAME>* global_##CLASS_NAME##_Factory = new tFactory<CLASS_NAME>(CLASS_NAME::staticClassID())
    3737
    3838//! The Factory is a loadable object handler
  • branches/new_class_id/src/lib/util/loading/fast_factory.h

    r9716 r9757  
    3939 */
    4040#define CREATE_FAST_FACTORY_STATIC(CLASS_NAME) \
    41   FastFactory* CLASS_NAME::fastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_NAME::classID(), #CLASS_NAME)
     41  FastFactory* CLASS_NAME::fastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_NAME::staticClassID(), #CLASS_NAME)
    4242
    4343//! A struct, that holds Lists of Objects of a certain type.
Note: See TracChangeset for help on using the changeset viewer.