Version: 6.3.1
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Static Protected Member Functions | Private Attributes

TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 > Class Template Reference

Template class for event which calls the function with two arguments and returning result.

#include <SALOME_Event.h>

Inheritance diagram for TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >:
Inheritance graph

Public Types

typedef TRes TResult
typedef TResult(TObject::* TAction )(TArg, TArg1)

Public Member Functions

 TMemFun2ArgEvent (TObject *theObject, TAction theAction, TArg theArg, TArg1 theArg1, TResult theResult=TResult())
virtual void Execute ()
void ExecutePostedEvent ()
 This method should be called by the main GUI thread in order to execute the code specific for this event and finally to inform the calling thread that the event has been processed waking it up with help of the semaphore .
void process ()
 Post the event and wait for its completion. process() should be called from a secondary thread only.

Static Public Member Functions

static bool IsSessionThread ()
 Check if the processing is in the main application thread.

Data Fields

TResult myResult

Protected Member Functions

void processed ()
 Use this method to signal that this event has been processed.

Static Protected Member Functions

static void GetSessionThread ()
 Initialize event mechanism.

Private Attributes

TObject * myObject
TAction myAction
TStoreArg myArg
TStoreArg1 myArg1

template<class TObject, typename TRes, typename TArg, typename TArg1, typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
class TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >


Member Typedef Documentation

template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
typedef TRes TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.TResult
template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
typedef TResult(TObject::* TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.TAction)(TArg, TArg1)

Constructor & Destructor Documentation

template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.TMemFun2ArgEvent ( TObject *  theObject,
TAction  theAction,
TArg  theArg,
TArg1  theArg1,
TResult  theResult = TResult() 
)

Member Function Documentation

template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
virtual void TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.Execute ( ) [virtual]
void SALOME_Event::ExecutePostedEvent ( ) [inherited]
bool SALOME_Event::IsSessionThread ( ) [static, inherited]
Returns:
true if this method is called from the main application thread

References myThread.

void SALOME_Event::process ( ) [inherited]
void SALOME_Event::processed ( ) [protected, inherited]
void SALOME_Event::GetSessionThread ( ) [static, protected, inherited]

This function sets up the main application thread. It should be called during the application initialization, i.e. main() function.

References myThread.


Field Documentation

template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
TResult TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.myResult
template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
TObject* TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.myObject [private]
template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
TAction TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.myAction [private]
template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
TStoreArg TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.myArg [private]
template<class TObject , typename TRes , typename TArg , typename TArg1 , typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
TStoreArg1 TMemFun2ArgEvent< TObject, TRes, TArg, TArg1, TStoreArg, TStoreArg1 >.myArg1 [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS