Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

CDAQTCLProcessor Class Reference

#include <CDAQTCLProcessor.h>

Inheritance diagram for CDAQTCLProcessor:

CTCLSynchronizeCommand List of all members.

Public Member Functions

 CDAQTCLProcessor (const STD(string)&rCommand, CTCLInterpreter *pInterp)
 CDAQTCLProcessor (const char *pCommand, CTCLInterpreter *pInter)
 ~CDAQTCLProcessor ()
int operator== (const CDAQTCLProcessor &aCDAQTCLProcessor) const
 Operator== Equality Operator.
virtual void Register ()

Private Member Functions

 CDAQTCLProcessor (const CDAQTCLProcessor &aCDAQTCLProcessor)
 Copy Constructor illegal and therefore unimplemented.
CDAQTCLProcessoroperator= (const CDAQTCLProcessor &aCDAQTCLProcessor)
 Operator= Assignment Operator illegal and therefore unimplemented.

Static Private Member Functions

int EvalRelay (ClientData pData, Tcl_Interp *pInterp, int Argc, char **Argv)
void DeleteRelay (ClientData pData)

Detailed Description

Provides a synchronized TCL command. Inheriting from this class allows you to produce a TCL command which is synchronized to the application through the application mutex. This member essentially just replaces the TCLProcessor's registration procedures and static callback relay. The static callback relay will now lock the application mutex prior to calling operator() and unlock on return (exception or normal).

Definition at line 320 of file CDAQTCLProcessor.h.


Constructor & Destructor Documentation

CDAQTCLProcessor::CDAQTCLProcessor const STD(string)&  rCommand,
CTCLInterpreter *  pInterp
 

CDAQTCLProcessor::CDAQTCLProcessor const char *  pCommand,
CTCLInterpreter *  pInterp
 

Constructor, Builds a new command which will execute synchronized with all the other threads in the application.

Definition at line 325 of file CDAQTCLProcessor.cpp.

CDAQTCLProcessor::~CDAQTCLProcessor  ) 
 

Destructor: The base class will take care of everything we need. The fact that register registered our DeleteRelay will take care of ensuring that OnDelete is executed with application synchronization.

Definition at line 307 of file CDAQTCLProcessor.cpp.

CDAQTCLProcessor::CDAQTCLProcessor const CDAQTCLProcessor aCDAQTCLProcessor  )  [private]
 

Copy Constructor illegal and therefore unimplemented.


Member Function Documentation

void CDAQTCLProcessor::DeleteRelay ClientData  pData  )  [static, private]
 

Locks the application mutex, call's the object's OnDelete member function (the object is pointed to by the client data parameter), and unlocks the mutex.

Definition at line 385 of file CDAQTCLProcessor.cpp.

References CApplicationSerializer::getInstance(), CThreadRecursiveMutex::Lock(), and CThreadRecursiveMutex::UnLock().

Referenced by Register().

int CDAQTCLProcessor::EvalRelay ClientData  pData,
Tcl_Interp *  pInterp,
int  Argc,
char **  Argv
[static, private]
 

Locks the application mutex, calls operator() and the unlocks the resource.

Definition at line 357 of file CDAQTCLProcessor.cpp.

References CApplicationSerializer::getInstance(), CThreadRecursiveMutex::Lock(), and CThreadRecursiveMutex::UnLock().

Referenced by Register().

CDAQTCLProcessor& CDAQTCLProcessor::operator= const CDAQTCLProcessor aCDAQTCLProcessor  )  [private]
 

Operator= Assignment Operator illegal and therefore unimplemented.

int CDAQTCLProcessor::operator== const CDAQTCLProcessor aCDAQTCLProcessor  )  const [inline]
 

Operator== Equality Operator.

Definition at line 337 of file CDAQTCLProcessor.h.

void CDAQTCLProcessor::Register  )  [virtual]
 

Registers the processor on the current interpreter. This reimplements code from the base class because I need to specify my own Eval and Delete relay functions (there's naturally no way for static functions to be virtual).

Definition at line 340 of file CDAQTCLProcessor.cpp.

References DeleteRelay(), and EvalRelay().

Referenced by CInterpreterStartup::RegisterExtensions().


The documentation for this class was generated from the following files:
Generated on Thu Jan 6 16:58:43 2005 for Spectrodaq External Event Framework by  doxygen 1.3.9.1