Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

ArClientData Class Reference

This class is mostly just for holding all the information about one of the client data entires in one convenient spot. More...

#include <ArClientData.h>

List of all members.

Public Member Functions

void addDataFlags (const char *dataFlags)
 Sets the data flags.
void addFunctor (ArFunctor1< ArNetPacket * > *functor)
 Adds a new functor the end of the list.
 ArClientData (const char *name, const char *description, unsigned int command, ArFunctor1< ArNetPacket * > *functor)
 Constructor.
const char * getArgumentDescription (void)
 Gets the argument description.
unsigned int getCommand (void)
const char * getCommandGroup (void)
 Gets the command group.
const char * getDataFlagsString (void)
const char * getDescription (void)
 Gets the description.
const std::list< ArFunctor1<
ArNetPacket * > * > * 
getFunctorList (void) const
 Gets the list of functors.
const char * getName (void)
 Gets the name.
const char * getReturnDescription (void)
 Gets the return description.
bool hasDataFlag (const char *dataFlag)
int lockFunctorList (void)
 Locks the functor list so we can walk it without it changing.
void remFunctor (ArFunctor1< ArNetPacket * > *functor)
 Removes a functor from the list all together.
void setArgRetDescs (const char *argDesc, const char *retDesc)
 Sets the argument and return descriptions.
void setCommandGroup (const char *commandGroup)
 Sets the command group.
int tryLockFunctorList (void)
 Tries to lock the functor list so we can walk it without it changing.
int unlockFunctorList (void)
 Unlocks the functor list so we can walk it without it changing.
virtual ~ArClientData ()
 Destructor.

Protected Attributes

std::string myArgumentDescription
unsigned int myCommand
std::string myCommandGroup
ArArgumentBuilder myDataFlagsBuilder
ArMutex myDataMutex
std::string myDescription
std::list< ArFunctor1< ArNetPacket * > * > myFunctorList
ArMutex myMutex
std::string myName
std::string myReturnDescription


Detailed Description

This class is mostly just for holding all the information about one of the client data entires in one convenient spot.

Information about the data flags held here... The recognized ones right now are just for return values so some forwarding can be done intelligently, you should only have one return value, they are: RETURN_NONE (There are no return packets), RETURN_SINGLE (There is exactly one return packet), RETURN_UNTIL_EMPTY (There return goes until an empty packet), RETURN_VIDEO (this is the special case for video where basically its something thats always requested at an interval and everyone'll want it after we've transfered it), RETURN_COMPLEX (The return is more complex (so you'll need a helper class))

Definition at line 49 of file ArClientData.h.


Constructor & Destructor Documentation

ArClientData::ArClientData const char *  name,
const char *  description,
unsigned int  command,
ArFunctor1< ArNetPacket * > *  functor
 

Constructor.

Definition at line 31 of file ArClientData.cpp.

References addFunctor(), myCommand, myDescription, and myName.

ArClientData::~ArClientData  )  [virtual]
 

Destructor.

Definition at line 43 of file ArClientData.cpp.


Member Function Documentation

void ArClientData::addDataFlags const char *  dataFlags  ) 
 

Sets the data flags.

Definition at line 68 of file ArClientData.cpp.

References ArArgumentBuilder::add(), ArMutex::lock(), myDataFlagsBuilder, myDataMutex, and ArMutex::unlock().

Referenced by ArClientBase::buildList().

void ArClientData::addFunctor ArFunctor1< ArNetPacket * > *  functor  )  [inline]
 

Adds a new functor the end of the list.

Definition at line 85 of file ArClientData.h.

References myFunctorList.

Referenced by ArClientBase::addHandler(), and ArClientData().

const char* ArClientData::getArgumentDescription void   )  [inline]
 

Gets the argument description.

Definition at line 64 of file ArClientData.h.

References myArgumentDescription.

Referenced by ArCentralForwarder::connectingCallOnce(), and ArClientBase::logDataList().

unsigned int ArClientData::getCommand void   )  [inline]
 

Definition at line 62 of file ArClientData.h.

References myCommand.

Referenced by ArCentralForwarder::connectingCallOnce(), and ArClientBase::logDataList().

const char* ArClientData::getCommandGroup void   )  [inline]
 

Gets the command group.

Definition at line 70 of file ArClientData.h.

References myCommandGroup.

Referenced by ArCentralForwarder::connectingCallOnce(), and ArClientBase::logDataList().

const char* ArClientData::getDataFlagsString void   )  [inline]
 

Definition at line 72 of file ArClientData.h.

References ArArgumentBuilder::getFullString(), and myDataFlagsBuilder.

Referenced by ArCentralForwarder::connectingCallOnce(), and ArClientBase::logDataList().

const char* ArClientData::getDescription void   )  [inline]
 

Gets the description.

Definition at line 61 of file ArClientData.h.

References myDescription.

Referenced by ArCentralForwarder::connectingCallOnce(), and ArClientBase::logDataList().

const std::list<ArFunctor1<ArNetPacket *> *>* ArClientData::getFunctorList void   )  const [inline]
 

Gets the list of functors.

Definition at line 75 of file ArClientData.h.

References myFunctorList.

Referenced by ArClientBase::addHandler(), ArClientBase::logDataList(), and ArClientBase::processPacket().

const char* ArClientData::getName void   )  [inline]
 

Gets the name.

Definition at line 59 of file ArClientData.h.

References myName.

Referenced by ArCentralForwarder::connectingCallOnce(), and ArClientBase::logDataList().

const char* ArClientData::getReturnDescription void   )  [inline]
 

Gets the return description.

Definition at line 67 of file ArClientData.h.

References myReturnDescription.

Referenced by ArCentralForwarder::connectingCallOnce(), and ArClientBase::logDataList().

bool ArClientData::hasDataFlag const char *  dataFlag  ) 
 

Definition at line 48 of file ArClientData.cpp.

References ArArgumentBuilder::getArg(), ArArgumentBuilder::getArgc(), ArMutex::lock(), myDataFlagsBuilder, myDataMutex, and ArMutex::unlock().

Referenced by ArCentralForwarder::connectingCallOnce().

int ArClientData::lockFunctorList void   )  [inline]
 

Locks the functor list so we can walk it without it changing.

Definition at line 78 of file ArClientData.h.

References ArMutex::lock(), and myMutex.

Referenced by ArClientBase::addHandler(), ArClientBase::processPacket(), and ArClientBase::remHandler().

void ArClientData::remFunctor ArFunctor1< ArNetPacket * > *  functor  )  [inline]
 

Removes a functor from the list all together.

Definition at line 88 of file ArClientData.h.

References myFunctorList.

Referenced by ArClientBase::remHandler().

void ArClientData::setArgRetDescs const char *  argDesc,
const char *  retDesc
[inline]
 

Sets the argument and return descriptions.

Definition at line 91 of file ArClientData.h.

References myArgumentDescription, and myReturnDescription.

Referenced by ArClientBase::buildList().

void ArClientData::setCommandGroup const char *  commandGroup  )  [inline]
 

Sets the command group.

Definition at line 94 of file ArClientData.h.

References myCommandGroup.

Referenced by ArClientBase::buildList().

int ArClientData::tryLockFunctorList void   )  [inline]
 

Tries to lock the functor list so we can walk it without it changing.

Definition at line 80 of file ArClientData.h.

References myMutex, and ArMutex::tryLock().

int ArClientData::unlockFunctorList void   )  [inline]
 

Unlocks the functor list so we can walk it without it changing.

Definition at line 82 of file ArClientData.h.

References myMutex, and ArMutex::unlock().

Referenced by ArClientBase::addHandler(), ArClientBase::processPacket(), and ArClientBase::remHandler().


Member Data Documentation

std::string ArClientData::myArgumentDescription [protected]
 

Definition at line 102 of file ArClientData.h.

Referenced by getArgumentDescription(), and setArgRetDescs().

unsigned int ArClientData::myCommand [protected]
 

Definition at line 101 of file ArClientData.h.

Referenced by ArClientData(), and getCommand().

std::string ArClientData::myCommandGroup [protected]
 

Definition at line 104 of file ArClientData.h.

Referenced by getCommandGroup(), and setCommandGroup().

ArArgumentBuilder ArClientData::myDataFlagsBuilder [protected]
 

Definition at line 106 of file ArClientData.h.

Referenced by addDataFlags(), getDataFlagsString(), and hasDataFlag().

ArMutex ArClientData::myDataMutex [protected]
 

Definition at line 105 of file ArClientData.h.

Referenced by addDataFlags(), and hasDataFlag().

std::string ArClientData::myDescription [protected]
 

Definition at line 100 of file ArClientData.h.

Referenced by ArClientData(), and getDescription().

std::list<ArFunctor1<ArNetPacket *> *> ArClientData::myFunctorList [protected]
 

Definition at line 108 of file ArClientData.h.

Referenced by addFunctor(), getFunctorList(), and remFunctor().

ArMutex ArClientData::myMutex [protected]
 

Definition at line 107 of file ArClientData.h.

Referenced by lockFunctorList(), tryLockFunctorList(), and unlockFunctorList().

std::string ArClientData::myName [protected]
 

Definition at line 99 of file ArClientData.h.

Referenced by ArClientData(), and getName().

std::string ArClientData::myReturnDescription [protected]
 

Definition at line 103 of file ArClientData.h.

Referenced by getReturnDescription(), and setArgRetDescs().


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 10:51:51 2007 for ArNetworking by  doxygen 1.4.0