DeviceController Class 

The DeviceController class is derived from VObject. It encapsulates the basic functionalitt for controlling a device and is the base class for all the devices in the object system. It provides variables for storing the device's name, status flags and relative location. It overrides two functions inherited from VObject allowing the positional information to be used when visualizing the device.

Defined in: devices.hpp and devices.cpp

Class Members

Data Members

public

unsigned short type

The type id for the DeviceController.

string name

The name of the DeviceController.

unsigned long status

Bit flags that specify the current status of the DeviceController.

float xLocation

Specifies the x-coordinate of the DeviceController.

float yLocation

Specifies the y-coordinate of the DeviceController.

Member Functions

public

DeviceController (void)

Constructs a DeviceController object.

DeviceController (char * _name, unsigned short _type)

Constructs a DeviceController object with the specified name and type.

DeviceController (const DeviceController & that)

Constructs a DeviceController object that is a copy of the specified DeviceController.

virtual ~DeviceController (void)

DeviceController destructor.

virtual void populateEditView (void)

Overrides VObject's populateEditView function and initializes the DeviceController's data with values that will be displayed during the view editing process.

virtual DeviceController * createCopy (void)

Creates a copy of the object and returns a pointer to the copy.

DeviceController & operator= (const DeviceController & that)

Assignment operator.

virtual ostream & operator<< (ostream & stream)

Writes the DeviceController's data to the specified output stream.

virtual istream & operator>> (istream & stream)

Reads the DeviceController's data from the specified input stream.

virtual bool processCommand (unsigned long command)

Provides a mechanism for sending commands to a DeviceController.

virtual unsigned short getPosition (float x_origin, float y_origin, float & object_x, float & object_y, unsigned short coord_type)

Overrides VObject's getPosition to return positional information about the object.

virtual unsigned short setPosition (float x_origin, float y_origin, float object_x, float object_y, unsigned short coord_type)

Overrides VObject's setPosition to set an object's  positional information.

Copyright 2002-2007 Outerface Technologies, Inc.