ROSE 0.11.145.192
|
Basic character encoding scheme.
This character encoding scheme converts code value to a sequence of octets in big- or little-endian order, and vice versa. It needs to know the number of octets per code value, and the byte order of the octets per code value is larger than one.
#include <Rose/BinaryAnalysis/String.h>
Public Member Functions | |
virtual Ptr | clone () const override |
Create a new copy of this encoder. | |
virtual std::string | name () const override |
Name of encoder. | |
virtual Octets | encode (CodeValue) override |
Encode a code value into a sequence of octets. | |
virtual State | decode (Octet) override |
Decode one octet. | |
virtual CodeValue | consume () override |
Consume a decoded code value. | |
virtual void | reset () override |
Reset the decoder state machine. | |
Public Member Functions inherited from Rose::BinaryAnalysis::Strings::CharacterEncodingScheme | |
State | state () const |
Decoder state. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Static Public Member Functions | |
static Ptr | instance (size_t octetsPerValue, ByteOrder::Endianness sex=ByteOrder::ORDER_UNSPECIFIED) |
Protected Member Functions | |
BasicCharacterEncodingScheme (size_t octetsPerValue, ByteOrder::Endianness sex) | |
Additional Inherited Members | |
Public Types inherited from Rose::BinaryAnalysis::Strings::CharacterEncodingScheme | |
typedef Sawyer::SharedPointer< CharacterEncodingScheme > | Ptr |
Shared ownership pointer to a CharacterEncodingScheme. | |
Protected Attributes inherited from Rose::BinaryAnalysis::Strings::CharacterEncodingScheme | |
State | state_ = INITIAL_STATE |
|
inlineprotected |
|
inlinestatic |
|
inlineoverridevirtual |
Create a new copy of this encoder.
Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.
|
overridevirtual |
Name of encoder.
Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.
|
overridevirtual |
Encode a code value into a sequence of octets.
For instance, an encoder for UTF-16 will encode a code value into two octets.
Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.
|
overridevirtual |
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.
Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.
|
overridevirtual |
Consume a decoded code value.
The decoder must be in the FINAL_STATE or COMPLETED_STATE and upon return will be in the INITIAL_STATE.
Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.
|
overridevirtual |
Reset the decoder state machine.
Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.