gadget::InputMixer< ComposedParent, NewParent > Class Template Reference

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

#include <gadget/Type/InputMixer.h>

Inheritance diagram for gadget::InputMixer< ComposedParent, NewParent >:

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.

Public Member Functions

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

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.

Definition at line 121 of file InputMixer.h.


Member Typedef Documentation

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

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

Definition at line 129 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 131 of file InputMixer.h.

00132    {
00133       writer->beginTag(InputMixer<ComposedParent,NewParent>::getInputTypeName());
00134       ComposedParent::writeObject(writer);
00135       NewParent::writeObject(writer);
00136       writer->endTag();
00137       return(vpr::ReturnStatus::Succeed);
00138    }

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

Definition at line 140 of file InputMixer.h.

00141    {
00142       reader->beginTag(InputMixer<ComposedParent,NewParent>::getInputTypeName());
00143       ComposedParent::readObject(reader);
00144       NewParent::readObject(reader);
00145       reader->endTag();
00146       return(vpr::ReturnStatus::Succeed);
00147    }

template<class ComposedParent, class NewParent>
std::string gadget::InputMixer< ComposedParent, NewParent >::getInputTypeName (  )  [inline]

Definition at line 149 of file InputMixer.h.

00150    {
00151      return(ComposedParent::getInputTypeName() + NewParent::getInputTypeName());    //Input,Digital,Analog,Position, NEED THIS TOO
00152    }


The documentation for this class was generated from the following file:
Generated on Thu Jan 4 10:45:00 2007 for Gadgeteer by  doxygen 1.5.1