Arxx::DefaultItemFactory Class Reference

#include <DefaultItemFactory.h>

Inheritance diagram for Arxx::DefaultItemFactory:

Inheritance graph
[legend]
Collaboration diagram for Arxx::DefaultItemFactory:

Collaboration graph
[legend]
List of all members.

Detailed Description

The standard ItemFactory created by every library that has no other ItemFactory set.

The default ItemFactory is only a wrapper object for new and delete and serves as the most basic and simple ItemFactory.

There is no need to ever create a DefaultItemFactory, since a global stack object is included in the object file. If no ItemFactory is forced to be used this global factory will be chosen automatically for you.

Note:
As this global default DefaultItemFactory is a stack object it satisfies the lifepspan requirement of ItemFactories.
See also:
Arxx::ItemFactory


Public Member Functions

 DefaultItemFactory (void)
 The default constructor fot a DefaultItemFactory.
virtual ~DefaultItemFactory (void)
 The default destructor fot a DefaultItemFactory.
virtual Arxx::ItempNewItem (Arxx::u4byte u4UniqueID=Arxx::g_u4InvalidID)
 Creates a new Arxx::Item.
virtual Arxx::ItempNewItem (Arxx::Archive &Archive, Arxx::u4byte u4UniqueID=Arxx::g_u4InvalidID)
 Creates a new Arxx::Item.
virtual void vDeleteItem (Arxx::Item *pItem)
 Destroys a Arxx::Item.


Constructor & Destructor Documentation

Arxx::DefaultItemFactory::DefaultItemFactory ( void   ) 

The default constructor fot a DefaultItemFactory.

The default constructor does no valuable work and is only implemented for debugging and logging support.

Arxx::DefaultItemFactory::~DefaultItemFactory ( void   )  [virtual]

The default destructor fot a DefaultItemFactory.

The default destructor does no valuable work and is only implemented for debugging and logging support.


Member Function Documentation

Arxx::Item * Arxx::DefaultItemFactory::pNewItem ( Arxx::Archive Archive,
Arxx::u4byte  u4UniqueID = Arxx::g_u4InvalidID 
) [virtual]

Creates a new Arxx::Item.

Parameters:
Archive A reference to an Archive which the item is to be registered to.
u4UniqueID The unique ID that the item should be created with.
This function creates a new Arxx::Item and registers it at the Archive. The Item is created via new and no reference counting or any other form of keeping track is performed yet.

The call that is performed here is the Arxx::Item constructor with an Archive and the unique ID.

See also:
Arxx::Library::vRegisterItem().

Implements Arxx::ItemFactory.

Arxx::Item * Arxx::DefaultItemFactory::pNewItem ( Arxx::u4byte  u4UniqueID = Arxx::g_u4InvalidID  )  [virtual]

Creates a new Arxx::Item.

Parameters:
u4UniqueID The unique ID that the item should be created with.
This function creates a new Arxx::Item and does nothing else. The item is created via new and no reference counting or any other form of keeping track is performed yet.

The call that is performed here is the Arxx::Item default constructor.

Note:
Note that the pointer returned from this function is the only reference to the newly created item so you better save it somewhere.

Implements Arxx::ItemFactory.

void Arxx::DefaultItemFactory::vDeleteItem ( Arxx::Item pItem  )  [virtual]

Destroys a Arxx::Item.

This function is a wrapper for delete and nothing else. It deletes the item pItem.

Implements Arxx::ItemFactory.


The documentation for this class was generated from the following files:
Generated on Tue Oct 10 11:34:36 2006 for libarxx by  doxygen 1.4.7