In file /home/eternity/Source/Six/Six/H/six.h:

class Six : public Debugable

Ancestor of some Services running above Mix

Inheritance:

Six < Debugable


Public Methods

void Six::CreateMajordomo ()
Creates majordomo
void Six::CreateRunningObjects ()
Creates running objects
Char* Six::GetMixSixVersion ()
Returns SixMix protocol version
Char* Six::GetPath (Char *pathSuffix)
Returns the six path with appended pathSuffix
void Six::Run ()
Function running Six
Six::Six (string configName)
Creates all the objects necessary to run
RunningObjectID Six::StartObject ( Runable *object)
Starts runable object
void Six::WaitForRunningObjects ()
Waits for running objects forever
Six::~Six ()
Six destructor

Public

attributes
MessageQueue* receiverToMajordomo
Queue connecting receiver to majordomo.
MessageQueue* majordomoToSender
Queue connecting majordomo to sender.
Cipherer* cipherer
Cipherer for ciphering in- and outcoming messages.
Killer* killer
Class responsible for shutdown of all objects.
ConfigFile* configFile
Log file.
Receiver* receiver
Class responsible for receiving commands from Mix.
SixMajordomo* majordomo
Class responsible for handling all messages.
Sender* sender
Class responsible for sending commands to Mix.
methods
Six (string configName)
Constructor.
virtual ~Six ()
Destructor.
virtual void Run ()
Method that runs as a thread and processes all requests.
Char* GetMixSixVersion ()
Method that returns MixSix communication protocol version got from ConfigFile.
Char* GetPath (Char *pathSuffix = NULL)
Method that adds path prefix got from ConfigFile before pathSuffix got as a parameter.

Protected

attributes
string mixSixProtoVer
MixSix protocol version got from ConfigFile
string path
Path to the Six SystemData directory got from ConfigFile.
RunningObject* runningObject
Object needed for waiting for running objects (now threads, but possibly processes).
methods
virtual void CreateMajordomo ()
In this method majordomo must be assigned a valid SixMajordomo ancestor pointer.
virtual void CreateRunningObjects ()
In this method running objects are created.
virtual void WaitForRunningObjects ()
In this method waiting for running objects to stop is started.
RunningObjectID StartObject (Runable *object)
Returns ID of a running object.

Inherited from Debugable:

Public Methods

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Debugable::Debugable(LogFile * debugLogFile)
int Debugable::SetDebugOptions(int newLogOptions)
void Debugable::SetLogFile(LogFile *aLogFile)
void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Debugable::~Debugable()

Documentation

Ancestor of some Services running above Mix. Abstract class that provides capability to communication with Mix server. Sender, Receiver and msgQueues to and from majordomo are created and common information from the SixConfigFile is got.
attributes

string mixSixProtoVer
MixSix protocol version got from ConfigFile

string path
Path to the Six SystemData directory got from ConfigFile.

RunningObject* runningObject
Object needed for waiting for running objects (now threads, but possibly processes).

methods

virtual void CreateMajordomo()
In this method majordomo must be assigned a valid SixMajordomo ancestor pointer.

virtual void CreateRunningObjects()
In this method running objects are created.

virtual void WaitForRunningObjects()
In this method waiting for running objects to stop is started.

RunningObjectID StartObject(Runable *object)
Returns ID of a running object.

attributes

MessageQueue* receiverToMajordomo
Queue connecting receiver to majordomo.

MessageQueue* majordomoToSender
Queue connecting majordomo to sender.

Cipherer* cipherer
Cipherer for ciphering in- and outcoming messages.

Killer* killer
Class responsible for shutdown of all objects.

ConfigFile* configFile
Log file.

Receiver* receiver
Class responsible for receiving commands from Mix.

SixMajordomo* majordomo
Class responsible for handling all messages.

Sender* sender
Class responsible for sending commands to Mix.

methods

Six(string configName)
Constructor.

virtual ~Six()
Destructor.

virtual void Run()
Method that runs as a thread and processes all requests.

Char* GetMixSixVersion()
Method that returns MixSix communication protocol version got from ConfigFile.

Char* GetPath(Char *pathSuffix = NULL)
Method that adds path prefix got from ConfigFile before pathSuffix got as a parameter.

void Six::CreateMajordomo()
Creates majordomo. This method must be overloaded in Six descendants.
Returns:
void
Author:
Pavel
See Also:
SixMajordomo

void Six::CreateRunningObjects()
Creates running objects. Brings to life all running objects: Sender, Receiver, Majordomo.
Returns:
void
Author:
Pavel
See Also:
Receiver, SixMajordomo, Sender

Char* Six::GetMixSixVersion()
Returns SixMix protocol version. Returns the protocol version got from the configFile in constructor.
Returns:
char* the version
Author:
Pavel
See Also:
ConfigFile

Char* Six::GetPath(Char *pathSuffix)
Returns the six path with appended pathSuffix. Creates string concatenating the sixPath (the path to SystemData of Six directory) and the path suffix and returns it.
Returns:
concatenated pathSuffix to sixPath
Parameters:
pathSuffix - suffix to append behind the six path
Author:
Marek, Pavel
See Also:
ConfigFile

void Six::Run()
Function running Six. Brings all the objets, that have to run, to life. (Each in a separate thread.)
Returns:
void
Author:
Pavel
See Also:
RunningObject

Six::Six(string configName)
Creates all the objects necessary to run. In Six constructor the information from ConfigFile is read and the basic Six structure
Receiver
receiverToMajordomo queue

majordomoTosender queue
Sender
is created. Majordomo must be created in the descedants of Six.
Parameters:
configName - name of the ConfigFile
Author:
Pavel
See Also:
Receiver, Sender, MessageQueue, SixMajordomo

RunningObjectID Six::StartObject( Runable *object)
Starts runable object. This function is used to start objects running in separate threads.
Returns:
runningObjectID
Parameters:
object - object to start (must be descendant of Runable)
Author:
Pavel
See Also:
Runable, RunningObject, RunningObjectID

void Six::WaitForRunningObjects()
Waits for running objects forever. Calls method of runningObject WaitForRunningObject, that waits for running object forever.
Returns:
void
Author:
Pavel
See Also:
RunningObject

Six::~Six()
Six destructor. Deletes all members.
Author:
Pavel
See Also:
Receiver, Sender, MessageQueue


Direct child classes:
Eso
Client
Bank
Author:
Pavel, Marek
See Also:
Sender, Receiver, MessageQueue, ConfigFile, LogFile, Debugable

alphabetic index hierarchy of classes


generated by doc++