Odyssey::Message Class Reference

#include <Message.h>

List of all members.

Public Types

typedef std::vector< Variable > VariableList

Public Member Functions

 Message (const String &name)
 Construct a named message.
 Message (const String &name, const Odyssey::Variable &arg)
 Constructs a named message with the given arguement.
 Message (const Message &rhs)
 Copies the given message's content to this message.
void copy (const Message &rhs)
 Forces a deep copy of all of the data within the given message to this one.
bool isEmpty () const
 Returns true of the message has no arguments.
size_t getArgumentCount () const
 Returns the number of arguments in this message.
const String & getName () const
 Returns the message name.
uint32 getID () const
 Returns the unique message ID for this message.
Message & argument (const Odyssey::Variable &arg)
 Adds an argument to the argument list.
Message & argument (size_t index, const Odyssey::Variable &arg)
 Sets an argument at a given index.
void setArguments (const VariableList &args)
 Sets the argument list for this message.
void setArgument (size_t index, const Odyssey::Variable &v)
 Sets the argument at the given index.
Odyssey::Variable getArgument (size_t index) const
 Returns the argument at the given index.
void removeArgument (size_t index) const
 Removes the indexed argument.
void clearArguments ()
 Clears all of the arguments for this message.
Variable & operator[] (size_t index)
 Operator access to arguments.
const Variable & operator[] (size_t index) const
 Operator access to arguments.
Message & operator= (const Message &rhs)
 Share data from the given message with this message.

Classes

struct  MessageBase


Detailed Description

This class represents a generic invocation message. It can contain generic arguments to be passed to the invocation for this message.


Member Typedef Documentation

typedef std::vector<Variable> Odyssey::Message::VariableList
 


Constructor & Destructor Documentation

Odyssey::Message::Message (  const String &  name  ) 
 

Construct a named message.

Odyssey::Message::Message (  const String &  name,
const Odyssey::Variable &  arg
) 
 

Constructs a named message with the given arguement.

Odyssey::Message::Message (  const Message &  rhs  ) 
 

Copies the given message's content to this message.


Member Function Documentation

Message& Odyssey::Message::argument (  size_t  index,
const Odyssey::Variable &  arg
) 
 

Sets an argument at a given index.

This is the same function as setArgument, but it is designed for chaining calls for simpler message declarations.

See also:
setArgument

Message& Odyssey::Message::argument (  const Odyssey::Variable &  arg  ) 
 

Adds an argument to the argument list.

This function adds a new argument to the end of the argument list for this message. This is useful for chaining arguments in a message definition.

Parameters:
arg the argument to add to this message.

void Odyssey::Message::clearArguments (   ) 
 

Clears all of the arguments for this message.

void Odyssey::Message::copy (  const Message &  rhs  ) 
 

Forces a deep copy of all of the data within the given message to this one.

Odyssey::Variable Odyssey::Message::getArgument (  size_t  index  )  const
 

Returns the argument at the given index.

Returns the argument at the given index. If no argument can be found an empty Variable is returned.

Parameters:
index the index to return the argument

size_t Odyssey::Message::getArgumentCount (   )  const
 

Returns the number of arguments in this message.

uint32 Odyssey::Message::getID (   )  const
 

Returns the unique message ID for this message.

const String& Odyssey::Message::getName (   )  const
 

Returns the message name.

bool Odyssey::Message::isEmpty (   )  const
 

Returns true of the message has no arguments.

Message& Odyssey::Message::operator= (  const Message &  rhs  ) 
 

Share data from the given message with this message.

const Variable& Odyssey::Message::operator[] (  size_t  index  )  const
 

Operator access to arguments.

Variable& Odyssey::Message::operator[] (  size_t  index  ) 
 

Operator access to arguments.

void Odyssey::Message::removeArgument (  size_t  index  )  const
 

Removes the indexed argument.

void Odyssey::Message::setArgument (  size_t  index,
const Odyssey::Variable &  v
) 
 

Sets the argument at the given index.

void Odyssey::Message::setArguments (  const VariableList &  args  ) 
 

Sets the argument list for this message.

This function replaces the argument list for this message with the given argument list.

Parameters:
args the new agument list


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 01:18:52 2007 for Odyssey Meta-Engine by  doxygen 1.4.6-NO