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

Public Types

typedef std::vector
< property_value >::iterator 
value_iterator
 

Public Member Functions

 property (string k, string l=string())
 
 property (property &p)
 
value_iterator begin ()
 
value_iterator end ()
 
void add_value (property_value v)
 
string get_key ()
 
void write (dtb::output_writer &writer, string_table &strings)
 
void write_dts (FILE *file, int indent)
 

Static Public Member Functions

static propertyparse_dtb (input_buffer &structs, input_buffer &strings)
 
static propertyparse (input_buffer &input, string key, string label=string())
 

Detailed Description

A value encapsulating a single property. This contains a key, optionally a label, and optionally one or more values.

Member Typedef Documentation

typedef std::vector<property_value>::iterator dtc::fdt::property::value_iterator

Iterator type used for accessing the values of a property.

Constructor & Destructor Documentation

dtc::fdt::property::property ( string  k,
string  l = string() 
)
inline

Creates an empty property.

dtc::fdt::property::property ( property p)
inline

Copy constructor.

Member Function Documentation

void dtc::fdt::property::add_value ( property_value  v)
inline

Adds a new value to an existing property.

value_iterator dtc::fdt::property::begin ( )
inline

Returns an iterator referring to the first value in this property.

value_iterator dtc::fdt::property::end ( )
inline

Returns an iterator referring to the last value in this property.

string dtc::fdt::property::get_key ( )
inline

Returns the key for this property.

static property* dtc::fdt::property::parse ( input_buffer input,
string  key,
string  label = string() 
)
inlinestatic

Factory method for constructing a new property. Attempts to parse a property from the input, and returns it on success. On any parse error, this will return 0.

static property* dtc::fdt::property::parse_dtb ( input_buffer structs,
input_buffer strings 
)
inlinestatic

Factory method for constructing a new property. Attempts to parse a property from the input, and returns it on success. On any parse error, this will return 0.

void dtc::fdt::property::write ( dtb::output_writer writer,
string_table strings 
)
inline

Writes the property to the specified writer. The property name is a reference into the strings table.

void dtc::fdt::property::write_dts ( FILE *  file,
int  indent 
)
inline

Writes in DTS format to the specified file, at the given indent level. This will begin the line with the number of tabs specified as the indent level and then write the property in the most applicable way that it can determine.


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