DbcLib 1.0
CAN DBC C++ library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dbc::Attribute Class Reference

Support class for handling attributes of network objects. More...

#include <attribute.h>

Public Member Functions

 Attribute (AttributeType type, const std::string &name)
 Constructor for an attribute or definition.
 
void Name (const std::string &name)
 Sets the name of the attribute.
 
const std::string & Name () const
 Retuns the attribute name.
 
void Type (AttributeType type)
 Sets the type of attribute.
 
AttributeType Type () const
 Return type of attribute.
 
void ValueType (AttributeValueType type)
 Sets the attribute data type.
 
AttributeValueType ValueType () const
 Returns the attribute data type.
 
std::string ValueTypeAsString () const
 Returns the attribute data type as string.
 
void Min (double min)
 Sets the min range.
 
double Min () const
 Min range.
 
void Max (double max)
 Sets the max range.
 
double Max () const
 Max range.
 
void EnumList (const std::vector< std::string > &list)
 Sets an enumerate string list.
 
const std::vector< std::string > & EnumList () const
 Returns an enumerated string list.
 
template<typename T >
void Value (const T &value)
 Sets the attribute value.
 
template<typename T >
Value () const
 Returns the attribute value.
 
template<>
void Value (const std::string &value)
 Sets an attribute string value.
 
template<>
std::string Value () const
 Returns an attribute string value.
 

Detailed Description

The Attribute class is a support class for handling attributes attached to DBC objects.

The DBC file first specify a definition of an attribute. This definition defines range and data type i.e. a sort of template.

Then the DBC file define the attribute that references a definition and has a value (constant).


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