Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

DAQObject Class Reference

Basic DAQ object super class. More...

Inheritance diagram for DAQObject::

Printable DAQExecId DAQThreadMutex DAQThreadRecursiveMutex List of all members.

Public Methods

 ~DAQObject ()
 Basic destructor. More...

int GetType ()
 Return object type of object. More...

const char * GetTypeString ()
 Return stringification of the object type id. More...

void SetType (int)
 Set the object type of the object. More...

void SetType ()
 Set the object type to the current object type. More...

unsigned int alarm (unsigned int)
 Override alarm function. More...

daqsighandler_t signal (int, daqsighandler_t)
 Override signal function. More...

virtual int operator== (const char *) const
 Equality with char*. Good for testing against NULL. More...

virtual int operator== (const DAQObject &) const
 Equality with a DAQObject. More...

virtual bool IsNull ()
 Return true if object is null. More...

virtual void Nullify ()
 Nullify this object. More...

virtual ostream & Print (ostream &)
 Print this object to an ostream. More...

virtual void PrintEyeCatcher (ostream &)
 Print an eye catcher to an ostream. More...

virtual void Dump (ostream &)
 Dump this object to an ostream. More...

Basic_OStream_Iface & Print (Basic_OStream_Iface &)
 Print this object to a Basic_OStream_Iface. More...

void Dump (Basic_OStream_Iface &)
 Dump this object to a Basic_OStream_Iface object. More...


Protected Methods

 DAQObject ()
 Basic Constructor. More...


Friends

class DAQTrackMap

Detailed Description

The DAQObject class is a super class from which nearly all other DAQ classes inherit. This class provides some basic functionality and support for tracking object creation. Some basic C/C++ functions are overridden in this class.

Author:
Eric Kasten
Version:
0.4.0


Constructor & Destructor Documentation

DAQObject::~DAQObject
 

Basic destructor method.

Parameters:
None  
Returns:
None

DAQObject::DAQObject [protected]
 

Basic constructor method.

Parameters:
None  
Returns:
this


Member Function Documentation

void DAQObject::Dump Basic_OStream_Iface & aStream
 

Dump this to a object that implements Basic_OStream_Iface interface. For a DAQObject this simply prints the type id and stringification.

Parameters:
aStream   A Basic_OStream_Iface object for printing
Returns:
None

void DAQObject::Dump ostream & aStream [virtual]
 

Dump this to an ostream. For a DAQObject this simply prints the type id and stringification.

Parameters:
aStream   An ostream for printing
Returns:
None

int DAQObject::GetType
 

Get the type id of this object as previously set using SetType().

Parameters:
None  
Returns:
The integer type id of this object.

const char * DAQObject::GetTypeString
 

Get a string (char*) representation of the object type for this.

Parameters:
None  
Returns:
The stringification of the type id

bool DAQObject::IsNull [virtual]
 

Determine if this object is considered a null object (from a meta standpoint -- that is, the object exists but is considered to be an object of a null type).

Parameters:
None  
Returns:
Whether this object is considered null
Return values:
true   The object is considered null
false   The object isn't considered null

void DAQObject::Nullify [virtual]
 

Make this a null object. That is IsNull() will return true once Nullify() is called on this.

Parameters:
None  
Returns:
None

Basic_OStream_Iface & DAQObject::Print Basic_OStream_Iface & aStream
 

Print a stringified representation of this to an object that implements the Basic_OStream_Iface interface.

Parameters:
aStream   A Basic_OStream_Iface object for printing
Returns:
The Basic_OStream_Iface object

ostream & DAQObject::Print ostream & aStream [virtual]
 

Print a stringified representation of this to an ostream.

Parameters:
aStream   An ostream for printing
Returns:
The ostream

Reimplemented from Printable.

Reimplemented in DAQNodeId, and DAQThreadId.

void DAQObject::PrintEyeCatcher ostream & aStream [virtual]
 

Print an eye catcher. Note that you can't create any new objects that might actually get added to the daq_tracker in this method or any methods derived from this method. Doing so tends to create deadlocks due to the locking nature of the daq_tracker.

This method does very little (i.e. it prints nothing for a DAQObject). Override for better use.

Parameters:
aStream   The ostream for printing
Returns:
None

Reimplemented in DAQThreadMutex, and DAQThreadRecursiveMutex.

void DAQObject::SetType
 

Reset the type id of this to one set previously. This is mainly used during bootstrapping.

Parameters:
None  
Returns:
None

void DAQObject::SetType int t
 

DAQ objects can be typed so that they can be tracked at runtime. By default, all objects derived from a DAQObject are of type DAQObject. Derived classes can choose to provide a more informative type id by using this method to set their type.

This has nothing to do with rtt.

At this time, the system needs to have a type id entered into a compile time table for this.

Parameters:
t   A type id for this.
Returns:
None
Todo:
Add dynamic type additions

unsigned int DAQObject::alarm unsigned int aVal
 

Override the standard C alarm() function. Throws an exception if it appears the alarm is already in use.

Parameters:
aVal   The number of seconds to wait for the alarm
Returns:
See alarm(2)

int DAQObject::operator== const DAQObject & v const [virtual]
 

Equality with DAQObject. Really just checks to make sure the object types are identical. Override if you want more functionality!

Parameters:
v   A DAQObject for comparison.
Returns:
If this object is type equivalent to v
Return values:
0   This object isn't type equivalent
1   This object is type equivalent

int DAQObject::operator== const char * s const [virtual]
 

Check if this can be considered equal to NULL. That is, This object must have a type of DAQObject and both (v == NULL) and IsNull() must be true.

Parameters:
v   Character pointer
Returns:
If this object can be considered equal to NULL
Return values:
0   This object isn't considered equal to NULL
1   This object is considered equal to NULL

daqsighandler_t DAQObject::signal int signum,
daqsighandler_t handler
 

Over the standard C signal() function. Throws an exception if an error is return from the call to signal().

Parameters:
signum   The signal number
handler   A signal handle function
Returns:
The signal handler or error (see signal(2))


The documentation for this class was generated from the following files:
Generated at Tue Jan 29 14:07:10 2002 for SpectroDAQ by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001