Show
Ignore:
Timestamp:
12/12/08 19:47:30 (5 years ago)
Author:
robert
Message:

Where possible moved redundent C header includes from headers to source files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/Referenced

    r9023 r9343  
    1616 
    1717// When building OSG with Java need to derive from Noodle::CBridgable class, 
    18 // therefore so OSG_JAVA_BUILD must be defined. Also the thread-safe ref/unref test 
    19 // as built in for the NoodleGlue wrapping. NoodleGlue has a Garbage collector mechanism  
    20 // which is very similar to osg::DeletionManager. So these aspects of osg::Referenced 
    21 // have been removed 
    22 //#define OSG_JAVA_BUILD 
    23  
    2418#include <osg/Export> 
    2519 
    26 #ifdef OSG_JAVA_BUILD 
    27 #include <NoodleGlue/Bridgable.h> 
    28 #else 
    2920#include <OpenThreads/ScopedLock> 
    3021#include <OpenThreads/Mutex> 
    31 #endif 
    3222 
    3323#include <OpenThreads/Atomic> 
     
    3828namespace osg { 
    3929 
    40 #ifndef OSG_JAVA_BUILD 
    4130// forward declare, declared after Referenced below. 
    4231class DeleteHandler; 
     
    194183inline void intrusive_ptr_release(Referenced* p) { p->unref(); } 
    195184 
    196 #else  
    197  
    198 /** Java wrappers use the CBridgable base-class for referencing 
    199   * and garbage collection. 
    200   */ 
    201 class OSG_EXPORT Referenced : public NoodleGlue::CBridgable  
    202 { 
    203     public: 
    204         /** Method not used in NoodleGlue referencing  
    205           */ 
    206         inline void unref_nodelete() const { --_refCount; } 
    207         inline int referenceCount() const { return _refCount; } 
    208  
    209         /* These methods are not used in JavaOSG */ 
    210         void addObserver(Observer* observer) {} 
    211         void removeObserver(Observer* observer) {} 
    212  
    213     public: 
    214  
    215         /** Set whether reference counting should be use a mutex to create thread reference counting.*/ 
    216         static void setThreadSafeReferenceCounting(bool enableThreadSafeReferenceCounting) {} 
    217          
    218         /** Get whether reference counting is active. */ 
    219         static bool getThreadSafeReferenceCounting() { return true; } 
    220  
    221     protected: 
    222         virtual ~Referenced() {} 
    223 }; 
    224 #endif //OSG_JAVA_BUILD 
    225  
    226185} 
    227186