retdec
Public Member Functions | Private Types | Private Attributes | List of all members
retdec::fileformat::GuidStream Class Reference

#include <guid_stream.h>

Inheritance diagram for retdec::fileformat::GuidStream:
Inheritance graph
[legend]
Collaboration diagram for retdec::fileformat::GuidStream:
Collaboration graph
[legend]

Public Member Functions

 GuidStream (std::uint64_t streamOffset, std::uint64_t streamSize)
 
Getters
std::vector< std::uint8_t > getGuid (std::size_t index) const
 
std::string getGuidString (std::size_t index) const
 
GUID methods
void addGuids (const std::vector< std::uint8_t > &data)
 
- Public Member Functions inherited from retdec::fileformat::Stream
virtual ~Stream ()=default
 
StreamType getType () const
 
std::uint64_t getOffset () const
 
std::uint64_t getSize () const
 
const std::string & getName () const
 

Private Types

using GuidData = std::array< std::uint8_t, 16 >
 

Private Attributes

std::vector< GuidDataguids
 

Additional Inherited Members

- Protected Member Functions inherited from retdec::fileformat::Stream
 Stream (StreamType streamType, std::uint64_t streamOffset, std::uint64_t streamSize)
 

Member Typedef Documentation

◆ GuidData

using retdec::fileformat::GuidStream::GuidData = std::array<std::uint8_t, 16>
private

Constructor & Destructor Documentation

◆ GuidStream()

retdec::fileformat::GuidStream::GuidStream ( std::uint64_t  streamOffset,
std::uint64_t  streamSize 
)

Constructor.

Parameters
streamOffsetStream offset.
streamSizeStream size.

Member Function Documentation

◆ addGuids()

void retdec::fileformat::GuidStream::addGuids ( const std::vector< std::uint8_t > &  data)

Adds multiple GUIDs stored in single sequence. Each GUID is 16 bytes long. Sequence is read until there are less than 16 bytes available.

Parameters
dataSequence of GUIDs.

◆ getGuid()

std::vector< std::uint8_t > retdec::fileformat::GuidStream::getGuid ( std::size_t  index) const

Returns the GUID at the specified index.

Parameters
indexIndex of the GUID.
Returns
Binary GUID if it exists, otherwise empty sequence.

◆ getGuidString()

std::string retdec::fileformat::GuidStream::getGuidString ( std::size_t  index) const

Returns the GUID at the specified index in the string representation.

Parameters
indexIndex of the GUID.
Returns
String representation of GUID if it exists, otherwise empty string.

Member Data Documentation

◆ guids

std::vector<GuidData> retdec::fileformat::GuidStream::guids
private

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