Ignore:
Timestamp:
03/31/06 17:29:32 (18 years ago)
Author:
igarcia
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboardClusterData.h

    r700 r721  
    66namespace BBC { 
    77 
    8 class _BBCExport BillboardClusterData { 
     8// Fordward declaration... 
     9class BillboardClusterData; 
     10 
     11namespace boost 
     12{ 
     13    void intrusive_ptr_add_ref(BillboardClusterData * p); 
     14    void intrusive_ptr_release(BillboardClusterData * p); 
     15}; 
     16 
     17class _BBCExport BillboardClusterData  
     18{ 
     19private: 
     20    long references; 
     21    friend void boost::intrusive_ptr_add_ref(BillboardClusterData * p); 
     22    friend void boost::intrusive_ptr_release(BillboardClusterData * p); 
     23 
    924  public: 
    1025    BillboardClusterData(); 
    1126 
    12     ~BillboardClusterData(); 
     27    virtual ~BillboardClusterData(); 
    1328 
    1429        void setNormal(Ogre::Vector3 value); 
     
    2035        float getD(); 
    2136 
    22     EntityCluster* getEntityCluster(); 
     37    EntityClusterPtr getEntityCluster(); 
    2338 
    24         void setEntityCluster(EntityCluster *value); 
     39        void setEntityCluster(EntityClusterPtr value); 
    2540 
    2641        virtual void readBillboardClusterData(TiXmlNode *parentNode); 
     
    4762 
    4863protected: 
    49         EntityCluster *mEntityCluster; 
     64        EntityClusterPtr mEntityCluster; 
    5065         
    5166        Ogre::Vector3 mAxisX; 
     
    7085}; 
    7186 
     87// class specific addref/release implementation 
     88// the two function overloads must be in the boost namespace on most compilers: 
     89namespace boost 
     90{ 
     91 inline void intrusive_ptr_add_ref(BillboardClusterData * p) 
     92  { 
     93    // increment reference count of object *p 
     94    ++(p->references); 
     95  } 
     96 
     97 
     98 
     99 inline void intrusive_ptr_release(BillboardClusterData * p) 
     100  { 
     101   // decrement reference count, and delete object when reference count reaches 0 
     102   if (--(p->references) == 0) 
     103     delete p; 
     104  }  
     105} // namespace boost 
     106 
     107typedef ::boost::intrusive_ptr<BillboardClusterData> BillboardClusterDataPtr; 
     108 
    72109} 
    73110#endif 
Note: See TracChangeset for help on using the changeset viewer.