BSDL Device Tree Compiler
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
dtc::string_table Class Reference

Public Member Functions

 string_table ()
 
uint32_t add_string (string str)
 
void write (dtb::output_writer &writer)
 

Detailed Description

Class encapsulating the string table. FDT strings are stored in a string section. This maintains a map from strings to their offsets in the strings section.

Note: We don't currently do suffix matching, which may save a small amount of space.

Constructor & Destructor Documentation

dtc::string_table::string_table ( )
inline

Default constructor, creates an empty strings table.

Member Function Documentation

uint32_t dtc::string_table::add_string ( string  str)
inline

Adds a string to the table, returning the offset from the start where it will be written. If the string is already present, this will return its existing offset, otherwise it will return a new offset.

void dtc::string_table::write ( dtb::output_writer writer)
inline

Writes the strings table to the specified output.


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