This class stores and provides utilities for sequenced inputs and their operations.
More...
#include <sequencecontainer.h>
|
typedef Trie< Input::MetaCode,
Int32 > | SequencedInputContainer |
|
typedef
SequencedInputContainer::iterator | SequencedInputIterator |
|
This class stores and provides utilities for sequenced inputs and their operations.
Definition at line 57 of file sequencecontainer.h.
Mezzanine::Input::SequenceContainer::SequenceContainer |
( |
const UInt32 & |
Device) | |
|
void Mezzanine::Input::SequenceContainer::AddInputSequence |
( |
const MetaCodeContainer & |
Codes, |
|
|
const Int32 & |
SequenceID |
|
) |
| |
Adds a custom sequence of inputs that this system will look for and generate MetaCode's for when they occur.
- Exceptions
-
If | the vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. An exception can also be thrown if the ID provided is the max value of an Int32. |
- Parameters
-
Codes | A vector containing the sequence of MetaCode's to be added. |
SequenceID | A unique UInt32 to be used as the identifier for this sequence when a MetaCode is generated. |
Definition at line 121 of file sequencecontainer.cpp.
Int32 Mezzanine::Input::SequenceContainer::GetIDofInputSequence |
( |
const MetaCodeContainer & |
Codes) | |
|
Gets the ID of the provided sequence of MetaCode's.
- Exceptions
-
If | the vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. |
- Parameters
-
Codes | A vector containing the sequence of MetaCode's to get the ID for. |
- Returns
- Returns the ID of the provided sequence, or the max value of an Int32 if the sequence does not exist.
Definition at line 136 of file sequencecontainer.cpp.
UInt32 Mezzanine::Input::SequenceContainer::GetNumInputSequences |
( |
) | |
const |
Gets the number of input sequences stored in this sequence container.
- Returns
- Returns a UInt32 containing the number of sequences stored.
Definition at line 162 of file sequencecontainer.cpp.
bool Mezzanine::Input::SequenceContainer::InputSequenceExists |
( |
const MetaCodeContainer & |
Codes) | |
|
Checks to see if the provided sequence of MetaCode's is already being checked for.
- Exceptions
-
If | the vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. |
- Parameters
-
Codes | A vector containing the sequence of MetaCode's to check for. |
- Returns
- Returns true if the sequence already exists, false otherwise.
Definition at line 130 of file sequencecontainer.cpp.
MetaCode Mezzanine::Input::SequenceContainer::ProcessSequence |
( |
MetaCodeIterator |
First, |
|
|
MetaCodeIterator |
OneAfterLast |
|
) |
| |
|
protected |
Processes a sequence(as defined by an iterator range) to see if any action needs to be taken.
- Parameters
-
First | An iterator to the first metacode in the sequence. |
OneAfterLast | An iterator to the space after the last metacode in the sequence. |
- Returns
- Returns a new metacode for a completed sequence, or a "Null" metacode if no sequence was completed.
Definition at line 99 of file sequencecontainer.cpp.
void Mezzanine::Input::SequenceContainer::RemoveInputSequence |
( |
const MetaCodeContainer & |
Codes) | |
|
Removes the specified custom sequence of MetaCode's.
- Exceptions
-
If | the vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. |
- Parameters
-
Codes | A vector containing the sequence of MetaCode's to be removed. |
Definition at line 148 of file sequencecontainer.cpp.
void Mezzanine::Input::SequenceContainer::Update |
( |
const MetaCodeContainer & |
NormalCodes, |
|
|
MetaCodeContainer & |
SequenceCodes |
|
) |
| |
Adds provided codes to the cache if necessary and checks for sequences that have been met.
- Parameters
-
NormalCodes | A vector of the codes to add and/or check as a part of another sequence. |
SequenceCodes | A vector to which generated sequence codes will be added if they are generated. |
Definition at line 167 of file sequencecontainer.cpp.
void Mezzanine::Input::SequenceContainer::VerifyInputID |
( |
const Int32 & |
ID) | |
const |
|
protected |
Verify's a numer is valid to be used as an ID for an input sequence being inserted.
- Parameters
-
ID | The identification number to verify. |
Definition at line 93 of file sequencecontainer.cpp.
void Mezzanine::Input::SequenceContainer::VerifyInputSequence |
( |
const MetaCodeContainer & |
Codes) | |
const |
|
protectedvirtual |
The documentation for this class was generated from the following files: