Namespace

Engine/source/console/consoleInternal.h

A dictionary of function entries.

More...

Classes:

class

A function entry in the namespace.

Private Types

enum
_Anonymous_ {  MaxActivePackages = 512
}

Private Static Attributes

Public Functions

addCommand(StringTableEntry name, BoolCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)
addCommand(StringTableEntry name, FloatCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)
addCommand(StringTableEntry name, IntCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)
addCommand(StringTableEntry name, StringCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)
addCommand(StringTableEntry name, VoidCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)
addFunction(StringTableEntry name, CodeBlock * cb, U32 functionOffset, const char * usage, U32 lineNumber)
addScriptCallback(const char * funcName, const char * usage, ConsoleFunctionHeader * header)
bool

Decrease the count on the reference that this namespace holds to its parent.

Return the name of this namespace.

Return the package in which this namespace is defined.

Return the topmost package in the parent hierarchy of this namespace that still refers to the same namespace.

Return the superordinate namespace to this namespace.

getUniqueEntryLists(Namespace * other, VectorPtr< Entry * > * outThisList, VectorPtr< Entry * > * outOtherList)

Increase the count on the reference that this namespace holds to its parent.

bool

Returns true if this namespace represents an engine defined class and is not just a script defined class namespace.

markGroup(const char * name, const char * usage)
const char *
tabComplete(const char * prevText, S32 baseLen, bool fForward)
bool

Detailed Description

A dictionary of function entries.

Namespaces are used for dispatching calls in the console system.

Private Types

@57

Enumerator

MaxActivePackages = 512

Private Static Attributes

StringTableEntry mActivePackages [MaxActivePackages]
U32 mNumActivePackages 
U32 mOldNumActivePackages 

Public Attributes

char * lastUsage 
AbstractClassRep * mClassRep 
bool mCleanUpUsage 

Script defined usage strings need to be cleaned up.

This field indicates whether or not the usage was set from script.

Entry * mEntryList 
U32 mHashSequence 

note:

The hash sequence is used by the autodoc console facility as a means of testing reference state.

U32 mHashSize 
Entry ** mHashTable 
StringTableEntry mName 
Namespace * mNext 
StringTableEntry mPackage 
Namespace * mParent 
U32 mRefCountToParent 
const char * mUsage 

Public Static Attributes

DataChunker mAllocator 
DataChunker mCacheAllocator 
U32 mCacheSequence 
Namespace * mGlobalNamespace 
Namespace * mNamespaceList 

Public Functions

Namespace()

~Namespace()

addCommand(StringTableEntry name, BoolCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)

addCommand(StringTableEntry name, FloatCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)

addCommand(StringTableEntry name, IntCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)

addCommand(StringTableEntry name, StringCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)

addCommand(StringTableEntry name, VoidCallback , const char * usage, S32 minArgs, S32 maxArgs, bool toolOnly, ConsoleFunctionHeader * header)

addFunction(StringTableEntry name, CodeBlock * cb, U32 functionOffset, const char * usage, U32 lineNumber)

addScriptCallback(const char * funcName, const char * usage, ConsoleFunctionHeader * header)

buildHashTable()

classLinkTo(Namespace * parent)

clearEntries()

createLocalEntry(StringTableEntry name)

decRefCountToParent()

Decrease the count on the reference that this namespace holds to its parent.

note:

Must not be called on namespaces coming from packages.

getEntryList(VectorPtr< Entry * > * )

getName()

Return the name of this namespace.

getPackage()

Return the package in which this namespace is defined.

getPackageRoot()

Return the topmost package in the parent hierarchy of this namespace that still refers to the same namespace.

If packages are active and adding to this namespace, then they will be linked in-between the namespace they are adding to and its real parent namespace.

getParent()

Return the superordinate namespace to this namespace.

Symbols are inherited from this namespace.

getUniqueEntryLists(Namespace * other, VectorPtr< Entry * > * outThisList, VectorPtr< Entry * > * outOtherList)

incRefCountToParent()

Increase the count on the reference that this namespace holds to its parent.

note:

Must not be called on namespaces coming from packages.

isClass()

Returns true if this namespace represents an engine defined class and is not just a script defined class namespace.

lookup(StringTableEntry name)

lookupRecursive(StringTableEntry name)

markGroup(const char * name, const char * usage)

tabComplete(const char * prevText, S32 baseLen, bool fForward)

unlinkClass(Namespace * parent)

Public Static Functions

activatePackage(StringTableEntry name)

deactivatePackage(StringTableEntry name)

deactivatePackageStack(StringTableEntry name)

dumpClasses(bool dumpScript, bool dumpEngine)

dumpFunctions(bool dumpScript, bool dumpEngine)

find(StringTableEntry name, StringTableEntry package)

getActivePackage(U32 index)

getActivePackagesCount()

global()

init()

isPackage(StringTableEntry name)

printNamespaceEntries(Namespace * g, bool dumpScript, bool dumpEngine)

relinkPackages()

shutdown()

trashCache()

unlinkPackages()