Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 12, 2015, 11:07:14 PM (9 years ago)
Author:
landauf
Message:

use static identifier initializer to store the inheritance definition of abstract classes. this prevents that identifiers are used (via Class(Name)) before they are properly initialized.

Location:
code/branches/core7/src/orxonox
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/orxonox/chat/ChatManager.cc

    r10347 r10362  
    113113    // ChatListener                                                         //
    114114    //////////////////////////////////////////////////////////////////////////
    115     RegisterAbstractClass(ChatListener).inheritsFrom(Class(Listable));
     115    RegisterAbstractClass(ChatListener).inheritsFrom<Listable>();
    116116
    117117    ChatListener::ChatListener()
  • code/branches/core7/src/orxonox/collisionshapes/CollisionShape.cc

    r10216 r10362  
    4444namespace orxonox
    4545{
    46     RegisterAbstractClass(CollisionShape).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable));
     46    RegisterAbstractClass(CollisionShape).inheritsFrom<BaseObject>().inheritsFrom<Synchronisable>();
    4747
    4848    /**
  • code/branches/core7/src/orxonox/gamestates/GSLevel.cc

    r10347 r10362  
    252252    ///////////////////////////////////////////////////////////////////////////
    253253
    254     RegisterAbstractClass(GSLevelMemento).inheritsFrom(Class(OrxonoxInterface));
     254    RegisterAbstractClass(GSLevelMemento).inheritsFrom<OrxonoxInterface>();
    255255
    256256    GSLevelMemento::GSLevelMemento()
  • code/branches/core7/src/orxonox/infos/PlayerInfo.cc

    r9945 r10362  
    4040namespace orxonox
    4141{
    42     RegisterAbstractClass(PlayerInfo).inheritsFrom(Class(Info));
     42    RegisterAbstractClass(PlayerInfo).inheritsFrom<Info>();
    4343
    4444    PlayerInfo::PlayerInfo(Context* context) : Info(context)
  • code/branches/core7/src/orxonox/interfaces/InterfaceCompilation.cc

    r9667 r10362  
    5050    // GametypeMessageListener
    5151    //----------------------------
    52     RegisterAbstractClass(GametypeMessageListener).inheritsFrom(Class(OrxonoxInterface));
     52    RegisterAbstractClass(GametypeMessageListener).inheritsFrom<OrxonoxInterface>();
    5353
    5454    GametypeMessageListener::GametypeMessageListener()
     
    6060    // PlayerTrigger
    6161    //----------------------------
    62     RegisterAbstractClass(PlayerTrigger).inheritsFrom(Class(OrxonoxInterface));
     62    RegisterAbstractClass(PlayerTrigger).inheritsFrom<OrxonoxInterface>();
    6363
    6464    PlayerTrigger::PlayerTrigger()
     
    8080    // RadarListener
    8181    //----------------------------
    82     RegisterAbstractClass(RadarListener).inheritsFrom(Class(OrxonoxInterface));
     82    RegisterAbstractClass(RadarListener).inheritsFrom<OrxonoxInterface>();
    8383
    8484    RadarListener::RadarListener()
     
    9090    // TeamColourable
    9191    //----------------------------
    92     RegisterAbstractClass(TeamColourable).inheritsFrom(Class(OrxonoxInterface));
     92    RegisterAbstractClass(TeamColourable).inheritsFrom<OrxonoxInterface>();
    9393
    9494    TeamColourable::TeamColourable()
     
    100100    // Rewardable
    101101    //----------------------------
    102     RegisterAbstractClass(Rewardable).inheritsFrom(Class(OrxonoxInterface));
     102    RegisterAbstractClass(Rewardable).inheritsFrom<OrxonoxInterface>();
    103103
    104104    Rewardable::Rewardable()
  • code/branches/core7/src/orxonox/interfaces/PickupCarrier.cc

    r9667 r10362  
    4141namespace orxonox
    4242{
    43     RegisterAbstractClass(PickupCarrier).inheritsFrom(Class(OrxonoxInterface));
     43    RegisterAbstractClass(PickupCarrier).inheritsFrom<OrxonoxInterface>();
    4444
    4545    /**
  • code/branches/core7/src/orxonox/interfaces/Pickupable.cc

    r9667 r10362  
    4646namespace orxonox
    4747{
    48     RegisterAbstractClass(Pickupable).inheritsFrom(Class(OrxonoxInterface)).inheritsFrom(Class(Rewardable));
     48    RegisterAbstractClass(Pickupable).inheritsFrom<OrxonoxInterface>().inheritsFrom<Rewardable>();
    4949
    5050    /**
  • code/branches/core7/src/orxonox/interfaces/RadarViewable.cc

    r9667 r10362  
    3838namespace orxonox
    3939{
    40     RegisterAbstractClass(RadarViewable).inheritsFrom(Class(OrxonoxInterface));
     40    RegisterAbstractClass(RadarViewable).inheritsFrom<OrxonoxInterface>();
    4141
    4242    /**
  • code/branches/core7/src/orxonox/sound/BaseSound.cc

    r9939 r10362  
    4343namespace orxonox
    4444{
    45     RegisterAbstractClass(BaseSound).inheritsFrom(Class(Listable));
     45    RegisterAbstractClass(BaseSound).inheritsFrom<Listable>();
    4646
    4747    BaseSound::BaseSound()
  • code/branches/core7/src/orxonox/weaponsystem/WeaponMode.cc

    r9939 r10362  
    4545namespace orxonox
    4646{
    47     RegisterAbstractClass(WeaponMode).inheritsFrom(Class(BaseObject));
     47    RegisterAbstractClass(WeaponMode).inheritsFrom<BaseObject>();
    4848
    4949    WeaponMode::WeaponMode(Context* context) : BaseObject(context)
  • code/branches/core7/src/orxonox/worldentities/WorldEntity.cc

    r10288 r10362  
    6161    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD  == (int)WorldEntity::World);
    6262
    63     RegisterAbstractClass(WorldEntity).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable));
     63    RegisterAbstractClass(WorldEntity).inheritsFrom<BaseObject>().inheritsFrom<Synchronisable>();
    6464
    6565    /**
Note: See TracChangeset for help on using the changeset viewer.