green::BehaviorTemplate Class Reference

#include <BehaviorTemplate.h>

Inheritance diagram for green::BehaviorTemplate:

green::VariableTableTemplate green::KeyNameTable< entryType > List of all members.

Public Member Functions

void SetMessageType (Key msgType)
void SetMessageName (const Name &name)
Key GetMessageType () const
const NameGetMessageName () const
void SetGeneric (int genericIn)
 This sets the generic flag.
int GetGeneric () const
 This returns the generic flag.
void addInitCode (UnresOpSeqPtr uInitCodeIn)
 This adds the unresolved init code to this behavior.
UnresOpSeqPtr getInitCode ()
 This gets the unresolved init code from this behavior.
void addBodyCode (UnresOpSeqPtr uBodyCodeIn)
 This adds the unresolved body code to this behavior.
UnresOpSeqPtr getBodyCode ()
 This gets the unresolved body code from this behavior.
void addResolvedInit (VariableTableTemplatePtr argList, OpSeqPtr resdCode)
 This adds resolved init code. This adds resolved code (OpSeq). It also as a hack adds the argList from the other arg list.
void addResolvedBody (OpSeqPtr resdCode)
 This adds resolved body code. This adds resolved code (OpSeq).
OpSeqPtr getResInitCode ()
 This gets the resolved init code from this behavior.
OpSeqPtr getResBodyCode ()
 This gets the resolved body code from this behavior.
virtual void Print (std::ostream &os)

Protected Attributes

Key mMsgType
Name mMsgName
int isGeneric
UnresOpSeqPtr unresInitCode
OpSeqPtr initCode
UnresOpSeqPtr unresBodyCode
OpSeqPtr bodyCode

Detailed Description

BehaviorTemplate contains extra information and methods from the VariableTableTemplate class, such as the parsed script code associated with that behavior, what kinds of entities it can attach to, and what types of messages it can attach to.


Member Function Documentation

void green::BehaviorTemplate::SetMessageType ( Key  msgType  )  [inline]

Set the key for the message type this behavior is expecting to receive.

Parameters:
msgType The Key for the BehaviorTemplateTable of the message template that this behavior is expecting to process.

void green::BehaviorTemplate::SetMessageName ( const Name name  )  [inline]

Set the Name of the message type of this behavior

Parameters:
name The Name of the message this behavior is expecting to process.

Key green::BehaviorTemplate::GetMessageType (  )  const [inline]

Get the message type key for the message type this behavior is expecting to receive.

Returns:
Returns the Key into the BehaviorTemplateTable for the message template this behavior is expecting to receive.

const Name& green::BehaviorTemplate::GetMessageName (  )  const [inline]

Get the message name for the message this behavior processes.

Returns:
The Name of the message type that this behavior responds to.

void green::BehaviorTemplate::SetGeneric ( int  genericIn  )  [inline]

This sets the generic flag.

Parameters:
genericIn the value of generic to set

int green::BehaviorTemplate::GetGeneric (  )  const [inline]

This returns the generic flag.

Returns:
the generic flag

void green::BehaviorTemplate::addInitCode ( UnresOpSeqPtr  uInitCodeIn  )  [inline]

This adds the unresolved init code to this behavior.

Parameters:
uBodyCodeIn the body code to add

UnresOpSeqPtr green::BehaviorTemplate::getInitCode (  )  [inline]

This gets the unresolved init code from this behavior.

Returns:
the UnresOpCode if it exists, a null shared pointer otherwise.

void green::BehaviorTemplate::addBodyCode ( UnresOpSeqPtr  uBodyCodeIn  )  [inline]

This adds the unresolved body code to this behavior.

Parameters:
uInitCodeIn the body code to add

UnresOpSeqPtr green::BehaviorTemplate::getBodyCode (  )  [inline]

This gets the unresolved body code from this behavior.

Returns:
the UnresOpCode if it exists, a null shared pointer otherwise.

void green::BehaviorTemplate::addResolvedInit ( VariableTableTemplatePtr  argList,
OpSeqPtr  resdCode 
) [inline]

This adds resolved init code. This adds resolved code (OpSeq). It also as a hack adds the argList from the other arg list.

Parameters:
argList the argument list in VariableTableTemplate format to set to InitFormat.
resdCode the OpSeq to set as code

void green::BehaviorTemplate::addResolvedBody ( OpSeqPtr  resdCode  )  [inline]

This adds resolved body code. This adds resolved code (OpSeq).

Parameters:
resdCode the OpSeq to set as code

OpSeqPtr green::BehaviorTemplate::getResInitCode (  )  [inline]

This gets the resolved init code from this behavior.

Returns:
the OpCode if it exists, a null shared pointer otherwise.

OpSeqPtr green::BehaviorTemplate::getResBodyCode (  )  [inline]

This gets the resolved body code from this behavior.

Returns:
the OpCode if it exists, a null shared pointer otherwise.

virtual void green::BehaviorTemplate::Print ( std::ostream &  os  )  [inline, virtual]

A nice Print function to print the contents of the table.

Parameters:
os The output ostream to print to.

Reimplemented from green::VariableTableTemplate.


The documentation for this class was generated from the following file:
Generated on Fri Apr 27 10:27:39 2007 for Green Engine by  doxygen 1.5.1