Infrared4Arduino
|
This class consists of a vector of durations. More...
#include <IrSequence.h>
Public Member Functions | |
IrSequence () | |
Create an empty sequence. More... | |
IrSequence (const microseconds_t *durations, size_t length, boolean toBeFreed=false) | |
Creates an IrSequence. More... | |
virtual | ~IrSequence () |
IrSequence (const IrSequence &orig) | |
Performs shallow copy. More... | |
IrSequence (const IrSequence &orig, boolean toBeFreed) | |
Performs shallow copy. More... | |
size_t | getLength () const |
Returns the length of the data. More... | |
boolean | isEmpty () const |
const microseconds_t * | getDurations () const |
IrSequence * | clone () const |
Creates a (deep) clone of the current object. More... | |
void | dump (Stream &stream, boolean usingSigns=false) const |
Prints the IrSequence on the stream provided. More... | |
void | dumpWithSigns (Stream &stream) const |
Prints the IrSequence on the stream provided. More... | |
This class consists of a vector of durations.
The even entries denotes spaces, while the odd entries denotes gaps. The length should always be even, i.e., the sequences starts with a space, and ends with a gap. This class is immutable.
Definition at line 12 of file IrSequence.h.
IrSequence::IrSequence | ( | ) |
Create an empty sequence.
Definition at line 4 of file IrSequence.cpp.
IrSequence::IrSequence | ( | const microseconds_t * | durations, |
size_t | length, | ||
boolean | toBeFreed = false |
||
) |
Creates an IrSequence.
durations | const array of microseconds durations |
length | length of durations. Shuld be even (not checked). |
toBeFreed | If true, the destructor will delete the durations array. |
Definition at line 7 of file IrSequence.cpp.
|
virtual |
Definition at line 17 of file IrSequence.cpp.
IrSequence::IrSequence | ( | const IrSequence & | orig | ) |
Performs shallow copy.
orig | original IrSequence to be cloned |
Definition at line 11 of file IrSequence.cpp.
IrSequence::IrSequence | ( | const IrSequence & | orig, |
boolean | toBeFreed | ||
) |
Performs shallow copy.
orig | original IrSequence to be cloned |
toBeFreed | If true, the destructor will delete the durations array. |
Definition at line 14 of file IrSequence.cpp.
IrSequence * IrSequence::clone | ( | ) | const |
Creates a (deep) clone of the current object.
The used must delete it manually.
Definition at line 22 of file IrSequence.cpp.
void IrSequence::dump | ( | Stream & | stream, |
boolean | usingSigns = false |
||
) | const |
Prints the IrSequence on the stream provided.
stream | Stream onto the output is printed. |
usingSigns | If true, Gaps are written with a leading '+', spaces with a leading '-'. |
Definition at line 28 of file IrSequence.cpp.
|
inline |
Prints the IrSequence on the stream provided.
Gaps are written with a leading '+', spaces with a leading '-'.
stream | Stream onto the output is printed. |
Definition at line 80 of file IrSequence.h.
|
inline |
Definition at line 57 of file IrSequence.h.
|
inline |
|
inline |
Definition at line 53 of file IrSequence.h.