OSG::ContainerChangeEntry Struct Reference

#include <OSGChangeList.h>

List of all members.


Public Types

enum  EntryType {
  Create = 0x0001, AddReference = 0x0002, SubReference = 0x0004, DepSubReference = 0x0008,
  Change = 0x0010
}

Public Member Functions

 ContainerChangeEntry ()
void operator= (const ContainerChangeEntry &)
void clear (void)
void commitChanges (void)

Public Attributes

UInt32 uiEntryDesc
UInt32 uiContainerId
const FieldFlagspFieldFlags
BitVector whichField
BitVectorbvUncommittedChanges

Detailed Description

Definition at line 71 of file OSGChangeList.h.


Member Enumeration Documentation

Enumerator:
Create 
AddReference 
SubReference 
DepSubReference 
Change 

Definition at line 73 of file OSGChangeList.h.

00074     {
00075         Create          = 0x0001,
00076         AddReference    = 0x0002,
00077         SubReference    = 0x0004,
00078         DepSubReference = 0x0008,
00079         Change          = 0x0010
00080     };


Constructor & Destructor Documentation

OSG::ContainerChangeEntry::ContainerChangeEntry (  )  [inline]

Definition at line 93 of file OSGChangeList.h.

00094     {
00095         uiEntryDesc   = 0;
00096         uiContainerId = 0;
00097         pFieldFlags   = NULL;
00098         whichField    = 0;
00099         bvUncommittedChanges = NULL;
00100     }    


Member Function Documentation

void OSG::ContainerChangeEntry::operator= ( const ContainerChangeEntry  )  [inline]

Definition at line 102 of file OSGChangeList.h.

00103     {
00104     }

void OSG::ContainerChangeEntry::clear ( void   )  [inline]

Definition at line 106 of file OSGChangeList.h.

Referenced by OSG::ChangeList::getNewCreatedEntry(), and OSG::ChangeList::getNewEntry().

00107     {
00108         uiEntryDesc   = 0;
00109         uiContainerId = 0;
00110         pFieldFlags   = NULL;
00111         whichField    = 0;
00112         bvUncommittedChanges = NULL;
00113     }

void ContainerChangeEntry::commitChanges ( void   ) 

Definition at line 139 of file OSGChangeList.cpp.

References bvUncommittedChanges, OSG::ChangedOrigin::Commit, NullFC, OSG_ASSERT, OSG::SingletonHolder< SingletonT >::the(), uiContainerId, and whichField.

00140 {
00141 #ifdef OSG_ENABLE_VALGRIND_CHECKS
00142     VALGRIND_CHECK_VALUE_IS_DEFINED(uiContainerId);
00143 #endif
00144     FieldContainerPtr pTmp =
00145         FieldContainerFactory::the()->getContainer(uiContainerId);
00146 
00147     if(pTmp != NullFC)
00148     {
00149 #ifndef SILENT
00150         fprintf(stderr, "Commit for %u %s\n",
00151                 uiContainerId, pTmp->getType().getCName());
00152 #endif
00153         
00154         BitVector tmpChanges;
00155         //OSG_ASSERT(NULL !=  bvUncommittedChanges);
00156 
00157         if (NULL != bvUncommittedChanges)
00158         { 
00159 #ifdef OSG_ENABLE_MEMORY_DEBUGGING
00160            OSG_ASSERT(*bvUncommittedChanges != 0xDEADBEEF);
00161 #endif
00162            tmpChanges             = *bvUncommittedChanges; 
00163            whichField            |= *bvUncommittedChanges;
00164            *bvUncommittedChanges  = TypeTraits<BitVector>::BitsClear;
00165 
00166            pTmp->changed      (tmpChanges, ChangedOrigin::Commit, 0);
00167         }
00168     }
00169 }


Member Data Documentation

Definition at line 89 of file OSGChangeList.h.

Referenced by commitChanges(), and OSG::FieldContainer::registerChangedContainer().


The documentation for this struct was generated from the following files: