ArServerInfoStrings Class Reference

#include <ArServerInfoStrings.h>

List of all members.


Detailed Description

This will set up strings to send to MobileEyes so that server developers can easily add more information.

There are different ways ways you can add a string (they all are the same way internally). The raw way is addString which takes a functor with a buffer and a buffer len, the functor then has to fill in the string when called. The other ways are set up for convenience and are wrappers in this class around the addString, the other ways are addStringInt, addStringDouble, addStringBool, these all take a functor that returns the type and a format string (in addition to the name and maxLen again).

Examples:

serverDemo.cpp, and simpleServerExample.cpp.


Public Member Functions

void addString (const char *name, ArTypes::UByte2 maxLen, ArFunctor2< char *, ArTypes::UByte2 > *functor)
 Adds a string to the list in the raw format.
 ArServerInfoStrings (ArServerBase *server)
 Constructor.
ArFunctor3< const char *,
ArTypes::UByte2, ArFunctor2<
char *, ArTypes::UByte2 > * > * 
getAddStringFunctor (void)
 Gets the functor for adding a string (for ArStringInfoGroup).
void netGetStrings (ArServerClient *client, ArNetPacket *packet)
 Gets the strings.
void netGetStringsInfo (ArServerClient *client, ArNetPacket *packet)
 Gets the information about the strings being sent.
 ~ArServerInfoStrings ()
 Destructor.

Protected Member Functions

void buildStringsInfoPacket (void)
void buildStringsPacket (void)

Protected Attributes

ArFunctor3C< ArServerInfoStrings,
const char *, ArTypes::UByte2,
ArFunctor2< char *, ArTypes::UByte2 > * > 
myAddStringFunctor
ArTime myLastStringPacketBuild
ArTypes::UByte2 myMaxMaxLength
ArFunctor2C< ArServerInfoStrings,
ArServerClient *, ArNetPacket * > 
myNetGetStringsCB
ArFunctor2C< ArServerInfoStrings,
ArServerClient *, ArNetPacket * > 
myNetGetStringsInfoCB
ArServerBasemyServer
ArNetPacket myStringInfoPacket
ArNetPacket myStringPacket
std::list< ArStringInfoHolder * > myStrings
ArMutex myStringsMutex


Constructor & Destructor Documentation

ArServerInfoStrings::ArServerInfoStrings ( ArServerBase server  ) 

Constructor.

ArServerInfoStrings::~ArServerInfoStrings (  ) 

Destructor.


Member Function Documentation

void ArServerInfoStrings::addString ( const char *  name,
ArTypes::UByte2  maxLen,
ArFunctor2< char *, ArTypes::UByte2 > *  functor 
)

Adds a string to the list in the raw format.

void ArServerInfoStrings::buildStringsInfoPacket ( void   )  [protected]

void ArServerInfoStrings::buildStringsPacket ( void   )  [protected]

ArFunctor3<const char *, ArTypes::UByte2, ArFunctor2<char *, ArTypes::UByte2> *>* ArServerInfoStrings::getAddStringFunctor ( void   )  [inline]

Gets the functor for adding a string (for ArStringInfoGroup).

Examples:
serverDemo.cpp.

void ArServerInfoStrings::netGetStrings ( ArServerClient client,
ArNetPacket packet 
)

Gets the strings.

void ArServerInfoStrings::netGetStringsInfo ( ArServerClient client,
ArNetPacket packet 
)

Gets the information about the strings being sent.


Member Data Documentation

ArFunctor3C<ArServerInfoStrings, const char *, ArTypes::UByte2, ArFunctor2<char *, ArTypes::UByte2> *> ArServerInfoStrings::myAddStringFunctor [protected]

ArTime ArServerInfoStrings::myLastStringPacketBuild [protected]

ArTypes::UByte2 ArServerInfoStrings::myMaxMaxLength [protected]

ArFunctor2C<ArServerInfoStrings, ArServerClient *, ArNetPacket *> ArServerInfoStrings::myNetGetStringsCB [protected]

ArFunctor2C<ArServerInfoStrings, ArServerClient *, ArNetPacket *> ArServerInfoStrings::myNetGetStringsInfoCB [protected]

ArServerBase* ArServerInfoStrings::myServer [protected]

ArNetPacket ArServerInfoStrings::myStringInfoPacket [protected]

ArNetPacket ArServerInfoStrings::myStringPacket [protected]

std::list<ArStringInfoHolder *> ArServerInfoStrings::myStrings [protected]

ArMutex ArServerInfoStrings::myStringsMutex [protected]


The documentation for this class was generated from the following files:
Generated on Fri Jul 31 12:37:29 2009 for ArNetworking by  doxygen 1.4.7