P300ScreenLayoutReader Class Reference
Inheritance diagram for P300ScreenLayoutReader:
CoAdaptP300PropertyReader

List of all members.

Public Member Functions

virtual void readPropertiesFromFile (OpenViBE::CString propertyFile)
std::vector< P300KeyDescriptor * > * getP300KeyboardLayout ()
OpenViBE::uint32 getNumberOfStandardKeys ()
OpenViBE::uint32 getNumberOfPredictiveKeys ()
OpenViBE::uint32 getNumberOfKeys ()
OpenViBE::boolean isKeyboardTable ()
const OpenViBE::float32 getDefaultScaleSize (const VisualState event) const

Protected Member Functions

void openChild (const char *sName, const char **sAttributeName, const char **sAttributeValue, XML::uint64 ui64AttributeCount)
void processChildData (const char *sData)
void closeChild (void)

Protected Attributes

std::vector< P300KeyDescriptor * > * m_lKeyList
std::map< OpenViBE::uint32,
OpenViBE::float32 > * 
m_mDefaultEventMapScaleSize
std::map< OpenViBE::uint32,
OpenViBE::CString > * 
m_mDefaultEventMapSource
std::map< OpenViBE::uint32,
std::string > * 
m_mDefaultEventMapLabel
std::map< OpenViBE::uint32,
OpenViBE::boolean > * 
m_mDefaultIsTextSymbol

Detailed Description

Class that reads the xml file specifying the keyboard layout, files such as 5by10grid-abc-gray.xml


Member Function Documentation

virtual void readPropertiesFromFile ( OpenViBE::CString  propertyFile) [virtual]

This methods opens and reads the file into a buffer. This buffer pointer is then used to create a XML reader object. The process function is called on this object which will consequently call the functions openChild, processChildData and closeChild implemented in the derived classes

Parameters:
propertyFilethe xml file from which we wish to read the properties

Reimplemented from CoAdaptP300PropertyReader.

std::vector<P300KeyDescriptor*>* getP300KeyboardLayout ( ) [inline]
Returns:
vector of P300KeyDescriptor objects that describe the properties of each key in the keyboard for each state

References P300ScreenLayoutReader::m_lKeyList.

OpenViBE::uint32 getNumberOfStandardKeys ( ) [inline]

number of keys that are not predicted words. The labels of this type of keys can't change during the experiment

OpenViBE::uint32 getNumberOfPredictiveKeys ( ) [inline]

number of keys will contain the predicted words. The labels of this type of keys will change after each trial

Referenced by P300ScreenLayoutReader::getNumberOfKeys().

OpenViBE::uint32 getNumberOfKeys ( ) [inline]

total number of keys

References P300ScreenLayoutReader::getNumberOfPredictiveKeys().

OpenViBE::boolean isKeyboardTable ( ) [inline]

Checks whether dimensions parameters are given per key or not, if not a simple GTable will be created

const OpenViBE::float32 getDefaultScaleSize ( const VisualState  event) const [inline]

some default properties that can be overridden per key

References P300ScreenLayoutReader::m_mDefaultEventMapScaleSize.

void openChild ( const char *  sName,
const char **  sAttributeName,
const char **  sAttributeValue,
XML::uint64  ui64AttributeCount 
) [protected, virtual]

To be implemented in the derived reader classes

Parameters:
sNamename of the element tag
sAttributeNamename of an attribute in the element tag
sAttributeValuevalue of that attribute
ui64AttributeCountnumber of attributes in the element

Reimplemented from CoAdaptP300PropertyReader.

void processChildData ( const char *  sData) [protected, virtual]

To be implemented in the derived reader classes

Parameters:
sDatathe data between opening and closing of element

Reimplemented from CoAdaptP300PropertyReader.

void closeChild ( void  ) [protected, virtual]

To be implemented in the derived reader classes

Reimplemented from CoAdaptP300PropertyReader.


Member Data Documentation

std::vector<P300KeyDescriptor*>* m_lKeyList [protected]

vector of P300KeyDescriptor objects that describe the properties of each key in the keyboard for each state

Referenced by P300ScreenLayoutReader::getP300KeyboardLayout().

std::map<OpenViBE::uint32, OpenViBE::float32>* m_mDefaultEventMapScaleSize [protected]

This default map variable maps each state, that a key can be in, into a property, here scale size of an image or font these default values are then used to fill in the properties that have not been specified

Referenced by P300ScreenLayoutReader::getDefaultScaleSize().

std::map<OpenViBE::uint32, OpenViBE::CString>* m_mDefaultEventMapSource [protected]

This default map variable maps each state, that a key can be in, into a property, here the source of the key, either a font file or a png file these default values are then used to fill in the properties that have not been specified

std::map<OpenViBE::uint32, std::string>* m_mDefaultEventMapLabel [protected]

This default map variable maps each state, that a key can be in, into a property, here the default label of a key in case it is a text label these default values are then used to fill in the properties that have not been specified

std::map<OpenViBE::uint32, OpenViBE::boolean>* m_mDefaultIsTextSymbol [protected]

This default map variable maps each state, that a key can be in, into a property, here if it concerns a text symbol or a picture these default values are then used to fill in the properties that have not been specified