glove::devices::Device Class Reference

#include <Device.hpp>

Inheritance diagram for glove::devices::Device:

glove::devices::CyberGlove glove::devices::local::LocalDevice glove::devices::remote::RemoteDevice glove::devices::local::LocalCyberGlove glove::devices::remote::RemoteCyberGlove glove::devices::local::LocalCyberGlove glove::devices::remote::RemoteCyberGlove

List of all members.

Public Member Functions

 Device ()
virtual ~Device ()
virtual bool connect ()=0
virtual bool disconnect ()=0
virtual bool isConnected ()=0
virtual const std::string & getTypeIdentifier () const =0
virtual std::string toString ()=0
const std::string & getError ()

Protected Member Functions

void setError (const std::string &e)
void resetErrorState ()

Protected Attributes

std::string errorStr


Detailed Description

Implements a generic Device object that acts a parent for all devices handled by this library.

Author:
Christian Wressnegger
Date:
2009-2010

Constructor & Destructor Documentation

glove::devices::Device::Device (  ) 

The default constructor.

virtual glove::devices::Device::~Device (  )  [virtual]

The destructor.


Member Function Documentation

virtual bool glove::devices::Device::connect (  )  [pure virtual]

Connects this Device

Returns:
A boolean value according to the success of this operation.

Implemented in glove::devices::local::LocalCyberGlove, glove::devices::remote::RemoteCyberGlove, and glove::devices::remote::RemoteDevice.

virtual bool glove::devices::Device::disconnect (  )  [pure virtual]

Disconnects this Device

Returns:
A boolean value according to the success of this operation.

Implemented in glove::devices::local::LocalCyberGlove, glove::devices::remote::RemoteCyberGlove, and glove::devices::remote::RemoteDevice.

const std::string& glove::devices::Device::getError (  ) 

Returns the human-readable description of the error occurred during the call to a function of this object.

Returns:
The human-readable description of the last error.

virtual const std::string& glove::devices::Device::getTypeIdentifier (  )  const [pure virtual]

Returns the type identifier of this Device.

Returns:
The type identifier of this Device.

Implemented in glove::devices::CyberGlove, glove::devices::local::LocalCyberGlove, and glove::devices::remote::RemoteCyberGlove.

virtual bool glove::devices::Device::isConnected (  )  [pure virtual]

Indicates whether the Device is connected or not.

Returns:
A boolean value that indicates whether the Device is connected or not.

Implemented in glove::devices::local::LocalCyberGlove, glove::devices::remote::RemoteCyberGlove, and glove::devices::remote::RemoteDevice.

void glove::devices::Device::resetErrorState (  )  [protected]

Wipes out the previous error.

void glove::devices::Device::setError ( const std::string &  e  )  [protected]

Sets the error string that can be obtained by the getError() function.

Parameters:
e The human-readable error string.

virtual std::string glove::devices::Device::toString (  )  [pure virtual]

Returns a human-readable description of this Device.

Returns:
A human-readable description of this Device.

Implemented in glove::devices::local::LocalCyberGlove, glove::devices::remote::RemoteCyberGlove, and glove::devices::remote::RemoteDevice.


Member Data Documentation

std::string glove::devices::Device::errorStr [protected]

The error string of the last error.


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

Generated on Thu Feb 4 12:36:53 2010 for libglove by  doxygen 1.5.8