BSDL Device Tree Compiler
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
dtc::mmap_input_buffer Struct Reference
Inheritance diagram for dtc::mmap_input_buffer:
dtc::input_buffer

Public Member Functions

 mmap_input_buffer (int fd)
 
virtual ~mmap_input_buffer ()
 
- Public Member Functions inherited from dtc::input_buffer
virtual ~input_buffer ()
 
 input_buffer ()
 
 input_buffer (const char *b, size_t s)
 
input_buffer buffer_from_offset (size_t offset, size_t s=0)
 
bool empty ()
 
char operator* ()
 
char operator[] (int offset)
 
input_bufferoperator++ ()
 
 operator const char * ()
 
bool consume (char c)
 
bool consume (const char *str)
 
bool consume_integer (long long &outInt)
 
template<typename T >
bool consume_binary (T &out)
 
bool consume_hex_byte (uint8_t &outByte)
 
input_buffernext_token ()
 
void parse_error (const char *msg)
 
void dump ()
 
template<>
bool consume_binary (uint8_t &out)
 

Additional Inherited Members

- Protected Attributes inherited from dtc::input_buffer
const char * buffer
 
size_t size
 

Detailed Description

Subclass of input_buffer that mmap()s a file and owns the resulting memory. When this object is destroyed, the memory is unmapped.

Constructor & Destructor Documentation

dtc::mmap_input_buffer::mmap_input_buffer ( int  fd)
inline

Constructs a new buffer from the file passed in as a file descriptor.

virtual dtc::mmap_input_buffer::~mmap_input_buffer ( )
inlinevirtual

Unmaps the buffer, if one exists.


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