ROSE
0.11.21.0
|
Encoding for the length of a string.
Strings that are length-encoded must specify a length encoding scheme that gives the length of the string measured in code points.
Definition at line 409 of file BinaryString.h.
#include <BinaryString.h>
Public Types | |
typedef Sawyer::SharedPointer< LengthEncodingScheme > | Ptr |
Shared ownership pointer to a LengthEncodingScheme. More... | |
Public Member Functions | |
virtual Ptr | clone () const =0 |
Create a new copy of this encoder. More... | |
virtual std::string | name () const =0 |
Name of encoder. More... | |
virtual Octets | encode (size_t)=0 |
Encode a length into a sequence of octets. More... | |
State | state () const |
Decoder state. More... | |
virtual State | decode (Octet)=0 |
Decode one octet. More... | |
virtual size_t | consume ()=0 |
Consume a decoded length. More... | |
virtual void | reset ()=0 |
Reset the decoder state machine. More... | |
![]() | |
SharedObject () | |
Default constructor. More... | |
SharedObject (const SharedObject &) | |
Copy constructor. More... | |
virtual | ~SharedObject () |
Virtual destructor. More... | |
SharedObject & | operator= (const SharedObject &) |
Assignment. More... | |
Protected Attributes | |
State | state_ |
typedef Sawyer::SharedPointer<LengthEncodingScheme> Rose::BinaryAnalysis::Strings::LengthEncodingScheme::Ptr |
Shared ownership pointer to a LengthEncodingScheme.
See Shared ownership.
Definition at line 417 of file BinaryString.h.
|
pure virtual |
Create a new copy of this encoder.
Implemented in Rose::BinaryAnalysis::Strings::BasicLengthEncodingScheme.
|
pure virtual |
Name of encoder.
Implemented in Rose::BinaryAnalysis::Strings::BasicLengthEncodingScheme.
|
pure virtual |
Encode a length into a sequence of octets.
Implemented in Rose::BinaryAnalysis::Strings::BasicLengthEncodingScheme.
|
inline |
Decoder state.
Definition at line 429 of file BinaryString.h.
Decode one octet.
Processes a single octet and updates the decoder state machine. Returns the decoder's new state. See documentation for State for restrictions on state transitions.
Implemented in Rose::BinaryAnalysis::Strings::BasicLengthEncodingScheme.
|
pure virtual |
Consume a decoded length.
The decoder must be in the FINAL_STATE or COMPLETE_STATE, and upon return will be in the INITIAL_STATE.
Implemented in Rose::BinaryAnalysis::Strings::BasicLengthEncodingScheme.
|
pure virtual |
Reset the decoder state machine.
Implemented in Rose::BinaryAnalysis::Strings::BasicLengthEncodingScheme.