ROSE  0.9.9.109
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme Class Reference

Description

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.

Definition at line 373 of file BinaryString.h.

#include <BinaryString.h>

Inheritance diagram for Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme:
Collaboration graph
[legend]

Public Member Functions

virtual Ptr clone () const ROSE_OVERRIDE
 Create a new copy of this encoder. More...
 
virtual std::string name () const ROSE_OVERRIDE
 Name of encoder. More...
 
virtual Octets encode (CodeValue) ROSE_OVERRIDE
 Encode a code value into a sequence of octets. More...
 
virtual State decode (Octet) ROSE_OVERRIDE
 Decode one octet. More...
 
virtual CodeValue consume () ROSE_OVERRIDE
 Consume a decoded code value. More...
 
virtual void reset () ROSE_OVERRIDE
 Reset the decoder state machine. More...
 
- Public Member Functions inherited from Rose::BinaryAnalysis::Strings::CharacterEncodingScheme
State state () const
 Decoder state. More...
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

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< CharacterEncodingSchemePtr
 Shared ownership pointer to a CharacterEncodingScheme. More...
 
- Protected Attributes inherited from Rose::BinaryAnalysis::Strings::CharacterEncodingScheme
State state_
 

Member Function Documentation

virtual Ptr Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme::clone ( ) const
inlinevirtual

Create a new copy of this encoder.

Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.

Definition at line 387 of file BinaryString.h.

virtual std::string Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme::name ( ) const
virtual
virtual Octets Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme::encode ( CodeValue  )
virtual

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.

virtual State Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme::decode ( Octet  )
virtual

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.

Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.

virtual CodeValue Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme::consume ( )
virtual

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.

virtual void Rose::BinaryAnalysis::Strings::BasicCharacterEncodingScheme::reset ( )
virtual

Reset the decoder state machine.

Implements Rose::BinaryAnalysis::Strings::CharacterEncodingScheme.


The documentation for this class was generated from the following file: