Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry Class Reference

Provides a wrapper for non-plistDictionary entries. More...

#include <InstanceTracker.h>

Inheritance diagram for InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry:

Detailed Description

template<class FamilyT, typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
class InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry

Provides a wrapper for non-plistDictionary entries.

This allows InstanceTracker to use plist::Dictionary as a superclass to manage the tracked instances, as well as polymorphically load and save the entire set of instances. Which is why we use a dictionary here instead of a simple plist::ObjectBase so we can handle a '.type' entry to store the instance's class type.

Definition at line 59 of file InstanceTracker.h.

List of all members.

Public Member Functions

 InstanceEntry (FamilyT *inst)
 constructor, assigns inst to both instance and alloc (thus marking the instance for deallocation on InstanceEntry destruction)
 InstanceEntry (FamilyT &inst)
 constructor, assigns inst to instance only, leaving alloc NULL (thus leaving deallocation of instance to the caller)
 ~InstanceEntry ()
 destructor, deallocates alloc (which might be NULL, and thus a no-op)

Public Attributes

FamilyT *const alloc
 if the original instance was passed as a pointer, we will store that here for easy deallocation on destruction
FamilyT & instance
 reference to the actual instance

Private Member Functions

 InstanceEntry (const InstanceEntry &)
 copy constructor, don't call
InstanceEntryoperator= (const InstanceEntry &)
 assignment, don't call

Constructor & Destructor Documentation

template<class FamilyT , typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry::InstanceEntry ( FamilyT *  inst  )  [explicit]

constructor, assigns inst to both instance and alloc (thus marking the instance for deallocation on InstanceEntry destruction)

Definition at line 62 of file InstanceTracker.h.

template<class FamilyT , typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry::InstanceEntry ( FamilyT &  inst  )  [explicit]

constructor, assigns inst to instance only, leaving alloc NULL (thus leaving deallocation of instance to the caller)

Definition at line 64 of file InstanceTracker.h.

template<class FamilyT , typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry::~InstanceEntry (  ) 

destructor, deallocates alloc (which might be NULL, and thus a no-op)

Definition at line 66 of file InstanceTracker.h.

template<class FamilyT , typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry::InstanceEntry ( const InstanceEntry  )  [private]

copy constructor, don't call


Member Function Documentation

template<class FamilyT , typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
InstanceEntry& InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry::operator= ( const InstanceEntry  )  [private]

assignment, don't call


Member Data Documentation

template<class FamilyT , typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
FamilyT* const InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry::alloc

if the original instance was passed as a pointer, we will store that here for easy deallocation on destruction

Definition at line 68 of file InstanceTracker.h.

template<class FamilyT , typename ClassNameT = std::string, class FactoryBaseT = Factory1Arg<FamilyT,std::string>, template< class U > class FactoryT = FactoryBaseT::template Factory>
FamilyT& InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::InstanceEntry::instance

reference to the actual instance

Definition at line 69 of file InstanceTracker.h.


The documentation for this class was generated from the following file:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:09 2016 by Doxygen 1.6.3