ROSE 0.11.145.147
|
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.
#include <Rose/BinaryAnalysis/String.h>
Public Types | |
typedef Sawyer::SharedPointer< LengthEncodingScheme > | Ptr |
Shared ownership pointer to a LengthEncodingScheme. | |
Public Member Functions | |
virtual Ptr | clone () const =0 |
Create a new copy of this encoder. | |
virtual std::string | name () const =0 |
Name of encoder. | |
virtual Octets | encode (size_t)=0 |
Encode a length into a sequence of octets. | |
State | state () const |
Decoder state. | |
virtual State | decode (Octet)=0 |
Decode one octet. | |
virtual size_t | consume ()=0 |
Consume a decoded length. | |
virtual void | reset ()=0 |
Reset the decoder state machine. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Protected Attributes | |
State | state_ = INITIAL_STATE |
typedef Sawyer::SharedPointer<LengthEncodingScheme> Rose::BinaryAnalysis::Strings::LengthEncodingScheme::Ptr |
Shared ownership pointer to a LengthEncodingScheme.
See Shared ownership.
|
inline |
|
inlinevirtual |
|
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 |
Decode one octet.
Processes a single octet and updates the decoder state machine. Returns the decoder's new state. See documentation for Strings::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.
|
protected |