Provides the central object factory mechanism for Nebula.
Definition factory.h:31
Util::Dictionary< Util::FourCC, const Rtti * > fourccTable
Definition factory.h:67
static Factory * Singleton
Definition factory.h:65
~Factory()
destructor is private
Definition factory.cc:63
static Factory * Instance()
get pointer to singleton instance (cannot use singleton.h!)
Definition factory.cc:22
void * CreateArray(const Util::String &className, SizeT num) const
create an array of objects by class name
Definition factory.cc:242
void Register(const Rtti *rtti, const Util::String &className, const Util::FourCC &classFourCC)
register a RTTI object with the factory (with class name and class fourcc code)
Definition factory.cc:82
bool ClassExists(const Util::String &className) const
check if a class exists by class name
Definition factory.cc:147
Factory()
constructor is private
Definition factory.cc:53
Util::HashTable< Util::String, const Rtti *, 1024 > nameTable
Definition factory.h:66
void * Create(const Util::String &className) const
create an object by class name
Definition factory.cc:192
const Rtti * GetClassRtti(const Util::String &className) const
get class rtti object by name
Definition factory.cc:169
static void Destroy()
static instance destruction method
Definition factory.cc:39
Nebula's runtime type information for one class.
Definition rtti.h:27
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
A four-character-code is a quasi-human-readable 32-bit-id.
Definition fourcc.h:19
Organizes key/value pairs by a hash code.
Definition hashtable.h:42
Definition coreserver.cc:11
Nebula's universal string class.
Definition string.h:50
int SizeT
Definition types.h:49