Minor bugfixes

This commit is contained in:
flobernd 2015-05-21 21:42:06 +02:00
parent 26ab01bdfd
commit 02d0d84c68
6 changed files with 63 additions and 62 deletions

View File

@ -60,7 +60,7 @@ set(sources
if (BUILD_SHARED_LIBS AND WIN32) if (BUILD_SHARED_LIBS AND WIN32)
set(sources ${sources} set(sources ${sources}
"Zydis/Zydis.rc") "Zydis/VersionInfo.rc")
endif () endif ()
if (BUILD_C_BINDINGS) if (BUILD_C_BINDINGS)

View File

@ -45,34 +45,10 @@ namespace Zydis
*/ */
class BaseInput class BaseInput
{ {
friend class InstructionDecoder;
private: private:
uint8_t m_currentInput; uint8_t m_currentInput;
protected: private:
/**
* @brief Override this method in your custom data source implementations.
* Reads the next byte from the data source. This method increases the current
* input position by one.
* @return The current input byte.
*/
virtual uint8_t internalInputPeek() = 0;
/**
* @brief Override this method in your custom data source implementations.
* Reads the next byte from the data source. This method does NOT increase the
* current input position.
* @return The current input byte.
*/
virtual uint8_t internalInputNext() = 0;
protected:
/**
* @brief Default constructor.
*/
BaseInput() { };
public:
/**
* @brief Destructor.
*/
virtual ~BaseInput() { };
public:
/** /**
* @brief Reads the next byte from the data source. This method does NOT increase the * @brief Reads the next byte from the data source. This method does NOT increase the
* current input position or the @c length field of the @c info parameter. * current input position or the @c length field of the @c info parameter.
@ -111,6 +87,31 @@ public:
* @return The current input byte. * @return The current input byte.
*/ */
uint8_t inputCurrent() const; uint8_t inputCurrent() const;
protected:
/**
* @brief Override this method in your custom data source implementations.
* Reads the next byte from the data source. This method increases the current
* input position by one.
* @return The current input byte.
*/
virtual uint8_t internalInputPeek() = 0;
/**
* @brief Override this method in your custom data source implementations.
* Reads the next byte from the data source. This method does NOT increase the
* current input position.
* @return The current input byte.
*/
virtual uint8_t internalInputNext() = 0;
protected:
/**
* @brief Default constructor.
*/
BaseInput() { };
public:
/**
* @brief Destructor.
*/
virtual ~BaseInput() { };
public: public:
/** /**
* @brief Override this method in your custom data source implementations. * @brief Override this method in your custom data source implementations.