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

phObject Class Reference
[Phission SystemNot Thread Safe]

#include <phObject.h>

Inheritance diagram for phObject:

phArgTable phLinkedList phLinkedListNode phMessage phMessageNode phMutex phRequestDB phRequestList phRWLock phTimeStamp List of all members.

Detailed Description

This is the parent class of every object in the Phission library. Every object must inherit from the phObject class to provide a generic way of passing Phission objects around and creating generic interfaces. Copy and swap methods were added to phObject to support phLiveObject functionality. Should other inherited classes required interface support from phObject, the interfaces will be added.

The most important feature of the phObject class is the phObject::setName methods. The 'name' here refers to the object name as seen in the source code. Every object should call phObject::setName in the constructor. Each time phObject::setName is called, the name is appended to a list that allows for a traversable list of inheritance. One can find out if an object is of some object type and can be properly cast to that object. This is similar to the Java instanceof operator. Assuming all objects adhere to the protocol this is very useful when passing phObject ptrs around to make sure that the passed pointer points to a valid object input.

Definition at line 52 of file phObject.h.

Public Member Functions

 phObject ()
 phObject (const char *name)
virtual ~phObject ()
void setName (const char *n)
const char * getName ()
const char ** getNameArray ()
unsigned long getNameCount ()
int isNamed (const char *n)
int hasParent (const char *n)
virtual int copy (phObject *copyto_obj)
virtual int swap (phObject *obj)

Private Attributes

char ** m_phObject_name_array
unsigned long m_phObject_name_count
char * m_phObject_name

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

Copyright (C) 2002 - 2007 Philip D.S. Thoren ( )
University Of Massachusetts at Lowell
Robotics Lab Logo

Generated on Sat Jun 16 02:45:02 2007 for phission by  doxygen 1.4.4