Main Page   Packages   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

clawsoft.SharedVar< T > Class Template Reference

#include <SharedVar.h>

Inheritance diagram for clawsoft.SharedVar< T >:

Inheritance graph
[legend]
Collaboration diagram for clawsoft.SharedVar< T >:

Collaboration graph
[legend]

Detailed Description

template<class T>
class clawsoft::SharedVar< T >

This class is define template to implemented Shared varibles.

Definition at line 14 of file SharedVar.h.

Public Methods

getValue (T v=0)
 Returns the values of the shared var.

void setValue (T v=0)
 Changes shared valuble's value.

 SharedVar ()
 Constructor that does nothing.

 SharedVar (T v)
 This constructor initializes the value of the shared variable.

operator++ (T u=0)
 Increases the shared variable's value in one unit.

operator-- (T u=0)
 Decreases the shared variable's value in one unit.


Protected Methods

void init ()
 Initializer, use in case of not using the default constructor (this interface is provided for future compatibility).

void lock ()
 Use this to lock the mutex explicitely.

void unlock ()
 Use this to unlock the mutex explicitely.

void setClassName (char *n)
 Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.

char * getClassName ()
 Returns the name of the current class.


Private Attributes

var
 T var is the shared variable.


Constructor & Destructor Documentation

template<class T>
clawsoft.SharedVar< T >.SharedVar   [inline]
 

Constructor that does nothing.

Definition at line 33 of file SharedVar.h.

template<class T>
clawsoft.SharedVar< T >.SharedVar   v [inline]
 

This constructor initializes the value of the shared variable.

Definition at line 35 of file SharedVar.h.


Member Function Documentation

char * clawsoft.Object::getClassName   [inherited]
 

Returns the name of the current class.

Definition at line 18 of file Object.cpp.

References clawsoft.Object.__cls_name.

template<class T>
T clawsoft.SharedVar< T >.getValue   v = 0 [inline]
 

Returns the values of the shared var.

Definition at line 20 of file SharedVar.h.

void clawsoft.Mutex::init   [inherited]
 

Initializer, use in case of not using the default constructor (this interface is provided for future compatibility).

Definition at line 54 of file Mutex.cpp.

References clawsoft.Mutex.mutex.

Referenced by clawsoft.Mutex.Mutex().

void clawsoft.Mutex::lock   [inherited]
 

Use this to lock the mutex explicitely.

Definition at line 59 of file Mutex.cpp.

References clawsoft.Mutex.mutex.

Referenced by Random.autoSeed(), clawsoft.SharedVar< int >.getValue(), clawsoft.KeyboardEvent.keyPressed(), clawsoft.SharedVar< int >.operator++(), clawsoft.SharedVar< int >.operator--(), Random.random(), Random.Random(), and clawsoft.SharedVar< int >.setValue().

template<class T>
T clawsoft.SharedVar< T >.operator++   u = 0 [inline]
 

Increases the shared variable's value in one unit.

Definition at line 39 of file SharedVar.h.

template<class T>
T clawsoft.SharedVar< T >.operator--   u = 0 [inline]
 

Decreases the shared variable's value in one unit.

Definition at line 46 of file SharedVar.h.

void clawsoft.Object::setClassName char *    n [protected, inherited]
 

Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.

Definition at line 14 of file Object.cpp.

References clawsoft.Object.__cls_name.

Referenced by clawsoft.ArrayOutOfBoundsException.ArrayOutOfBoundsException(), clawsoft.BrokenPipeException.BrokenPipeException(), clawsoft.Dialog.CancelButton.CancelButton(), clawsoft.CantLoadDSOException.CantLoadDSOException(), clawsoft.CantUnloadDSOException.CantUnloadDSOException(), clawsoft.ConnectionRefusedException.ConnectionRefusedException(), clawsoft.ConnectionTimeoutException.ConnectionTimeoutException(), clawsoft.Dialog.Dialog(), clawsoft.DSOException.DSOException(), clawsoft.DSOSymbolException.DSOSymbolException(), clawsoft.ElementNotFoundException.ElementNotFoundException(), clawsoft.Font.Font(), clawsoft.GameSelector.GameSelector(), clawsoft.Dialog.HelpButton.HelpButton(), clawsoft.IOException.IOException(), clawsoft.KeyboardEvent.KeyboardEvent(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Mutex.Mutex(), clawsoft.MutexException.MutexException(), clawsoft.NetworkException.NetworkException(), clawsoft.NetworkUnreachableException.NetworkUnreachableException(), clawsoft.NoMoreTokensException.NoMoreTokensException(), clawsoft.NullPointerException.NullPointerException(), clawsoft.NumberException.NumberException(), clawsoft.Object.Object(), clawsoft.Dialog.OKButton.OKButton(), clawsoft.Plugin.Plugin(), clawsoft.ProcOutOfFileDescriptorsException.ProcOutOfFileDescriptorsException(), Random.Random(), clawsoft.ServerSocket.ServerSocket(), clawsoft.Socket.Socket(), clawsoft.SocketAlreadyBoundedException.SocketAlreadyBoundedException(), clawsoft.SocketAlreadyUsedException.SocketAlreadyUsedException(), clawsoft.SocketUnableToReadException.SocketUnableToReadException(), clawsoft.SocketUnableToWriteException.SocketUnableToWriteException(), clawsoft.SysOutOfFileDescriptorsException.SysOutOfFileDescriptorsException(), clawsoft.TextBox.TextBox(), clawsoft.TextButton.TextButton(), clawsoft.TextField.TextField(), clawsoft.Thread.Thread(), clawsoft.UnableToLockMutexException.UnableToLockMutexException(), clawsoft.UnableToUnlockMutexException.UnableToUnlockMutexException(), and clawsoft.Window.Window().

template<class T>
void clawsoft.SharedVar< T >.setValue   v = 0 [inline]
 

Changes shared valuble's value.

Definition at line 27 of file SharedVar.h.

Referenced by clawsoft.SharedVar< int >.SharedVar().

void clawsoft.Mutex::unlock   [inherited]
 

Use this to unlock the mutex explicitely.

Definition at line 75 of file Mutex.cpp.

References clawsoft.Mutex.mutex.

Referenced by Random.autoSeed(), clawsoft.SharedVar< int >.getValue(), clawsoft.KeyboardEvent.keyPressed(), clawsoft.SharedVar< int >.operator++(), clawsoft.SharedVar< int >.operator--(), Random.random(), Random.Random(), and clawsoft.SharedVar< int >.setValue().


Field Documentation

template<class T>
T clawsoft.SharedVar< T >.var [private]
 

T var is the shared variable.

Definition at line 17 of file SharedVar.h.

Referenced by clawsoft.SharedVar< int >.getValue(), clawsoft.SharedVar< int >.operator++(), clawsoft.SharedVar< int >.operator--(), and clawsoft.SharedVar< int >.setValue().


The documentation for this class was generated from the following file:

Powered by:

SourceForge Logo