Implements attributed features, that is in the simplest case a number of (attribute, value) pairs.
For example
x[0...].attr1 = <value(s)> x[0...].attr2 = <value(s)>.
A more complex example would be nested structures x[0...].attr1[0...].subattr1 = ..
This might be used to represent (attr, value) pairs, simple structures, trees ...
在文件AttributeFeatures.h第46行定义。
公有成员 | |
CAttributeFeatures () | |
virtual | ~CAttributeFeatures () |
CFeatures * | get_attribute (char *attr_name) |
void | get_attribute_by_index (int idx, const char *&attr_name, CFeatures *&attr_obj) |
bool | set_attribute (char *attr_name, CFeatures *attr_obj) |
bool | del_attribute (char *attr_name) |
int32_t | get_num_attributes () |
virtual const char * | get_name () const |
保护成员 | |
int32_t | find_attr_index (char *attr_name) |
保护属性 | |
CDynamicArray< T_ATTRIBUTE > | features |
list of attributes (sorted) |
default constructor
在文件AttributeFeatures.cpp第16行定义。
~CAttributeFeatures | ( | ) | [virtual] |
destructor
在文件AttributeFeatures.cpp第21行定义。
bool del_attribute | ( | char * | attr_name ) |
delete the attribute matching attribute name
attr_name | attribute name |
在文件AttributeFeatures.h第114行定义。
int32_t find_attr_index | ( | char * | attr_name ) | [protected] |
find the index of the attribute matching attribute name
attr_name | attribute name |
在文件AttributeFeatures.h第147行定义。
CFeatures* get_attribute | ( | char * | attr_name ) |
return the feature object matching attribute name
attr_name | attribute name |
在文件AttributeFeatures.h第61行定义。
void get_attribute_by_index | ( | int | idx, |
const char *& | attr_name, | ||
CFeatures *& | attr_obj | ||
) |
return the feature object at index
idx | index of attribute |
attr_name | attribute name (returned by reference) |
attr_obj | attribute object (returned by reference) |
在文件AttributeFeatures.h第80行定义。
virtual const char* get_name | ( | ) | const [virtual] |
int32_t get_num_attributes | ( | ) |
bool set_attribute | ( | char * | attr_name, |
CFeatures * | attr_obj | ||
) |
set the feature object for attribute name
attr_name | attribute name |
attr_obj | feature object to set |
在文件AttributeFeatures.h第94行定义。
CDynamicArray<T_ATTRIBUTE> features [protected] |
list of attributes (sorted)
在文件AttributeFeatures.h第162行定义。