Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

gadget::InputMixer Class Template Reference

Class for mixin in base classes of input devices. More...

#include <InputMixer.h>

Inheritance diagram for gadget::InputMixer:

Inheritance graph
[legend]
List of all members.

Public Types

typedef InputPlaceHolder<
InputMixer< ComposedParent,
NewParent > > 
MixedPlaceholderType
 Type of the placeholder object that can be used to represent us. More...


Public Methods

vpr::ReturnStatus writeObject (vpr::ObjectWriter *writer)
vpr::ReturnStatus readObject (vpr::ObjectReader *reader)
std::string getBaseType ()

Detailed Description

template<class ComposedParent, class NewParent>
class gadget::InputMixer< ComposedParent, NewParent >

Class for mixin in base classes of input devices.

All devices should derive from a mixed type like below based on their types.

This allows us to implement any custom functions that are needed such as writeObject and readObject.

InputMixer<InputMixer<InputMixer<Input,Digital>,Analog>,Position>

Definition at line 105 of file InputMixer.h.


Member Typedef Documentation

template<class ComposedParent, class NewParent>
typedef InputPlaceHolder< InputMixer<ComposedParent, NewParent> > gadget::InputMixer::MixedPlaceholderType
 

Type of the placeholder object that can be used to represent us.

Definition at line 113 of file InputMixer.h.


Member Function Documentation

template<class ComposedParent, class NewParent>
vpr::ReturnStatus gadget::InputMixer< ComposedParent, NewParent >::writeObject vpr::ObjectWriter *    writer [inline]
 

Definition at line 115 of file InputMixer.h.

00116    {
00117       writer->beginTag(InputMixer<ComposedParent,NewParent>::getBaseType());
00118       ComposedParent::writeObject(writer);
00119       NewParent::writeObject(writer);
00120       writer->endTag();
00121       return(vpr::ReturnStatus::Succeed);
00122    }

template<class ComposedParent, class NewParent>
vpr::ReturnStatus gadget::InputMixer< ComposedParent, NewParent >::readObject vpr::ObjectReader *    reader [inline]
 

Definition at line 124 of file InputMixer.h.

00125    {
00126       reader->beginTag(InputMixer<ComposedParent,NewParent>::getBaseType());
00127       ComposedParent::readObject(reader);
00128       NewParent::readObject(reader);
00129       reader->endTag();
00130       return(vpr::ReturnStatus::Succeed);
00131    }

template<class ComposedParent, class NewParent>
std::string gadget::InputMixer< ComposedParent, NewParent >::getBaseType   [inline]
 

Definition at line 133 of file InputMixer.h.

Referenced by gadget::InputMixer< InputMixer< SimInput, Input >, Analog >::readObject, and gadget::InputMixer< InputMixer< SimInput, Input >, Analog >::writeObject.

00134    {
00135      return(ComposedParent::getBaseType() + NewParent::getBaseType());    //Input,Digital,Analog,Position, NEED THIS TOO
00136    }


The documentation for this class was generated from the following file:
Generated on Sun May 2 14:27:00 2004 for Gadgeteer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002