| HDK
    | 
#include <COP_CableStructure.h>
| Classes | |
| struct | CableField | 
| Each field has a name and a type.  More... | |
| Public Member Functions | |
| COP_CableStructure () | |
| int | getNumberOfFields () const | 
| Number of fields in this cable.  More... | |
| const UT_StringHolder & | getFieldName (int index) const | 
| Name of the index-th field in this cable.  More... | |
| bool | setFieldName (const UT_StringHolder &name, int index) | 
| void | copyFieldNames (const COP_CableStructure &other) | 
| Copies fields names from the other cable.  More... | |
| void | renameAllFields (const UT_StringHolder &name) | 
| All existing fields of this cable structure will be renamed.  More... | |
| COP_Type | getFieldType (int index) const | 
| Type of the index-th field in this cable.  More... | |
| COP_Type | getFieldType (const UT_StringHolder &name) const | 
| Type of the first field in this cable of the specified name.  More... | |
| int | getFieldIndex (const UT_StringHolder &name, int appearance=0) const | 
| Index of the field that has the given name.  More... | |
| int | getFieldAppearance (int index) const | 
| void | addField (const UT_StringHolder &name, COP_Type type) | 
| void | addFields (const COP_CableStructure &other, const char *prefix) | 
| void | reset () | 
| Removes all fields from this cable structure.  More... | |
| bool | operator== (const COP_CableStructure &other) const | 
| bool | operator!= (const COP_CableStructure &other) const | 
| int64 | getMemoryUsage (bool inclusive=false) const | 
| Protected Attributes | |
| UT_Array< CableField > | myFields | 
| Array of all fields in the cable.  More... | |
This class holds the structure of what flows through a cable. It's an ordered collection of fields, each one having a name and a type.
Definition at line 19 of file COP_CableStructure.h.
| 
 | inline | 
Definition at line 36 of file COP_CableStructure.h.
| void COP_CableStructure::addField | ( | const UT_StringHolder & | name, | 
| COP_Type | type | ||
| ) | 
Adds a new field to this cable, of the given name and type. The new field is added to the end of the current list of fields.
| void COP_CableStructure::addFields | ( | const COP_CableStructure & | other, | 
| const char * | prefix | ||
| ) | 
Concatenates this structure with other; fields of other go after all current fields of this structure. If prefix is not null, every newly-added field's name will be prefix.name, where name is name of the original field.
| void COP_CableStructure::copyFieldNames | ( | const COP_CableStructure & | other | ) | 
Copies fields names from the other cable.
Appearance index fo the field at the given index (this is the 0-based index of that field among all fields of the same name).
| int COP_CableStructure::getFieldIndex | ( | const UT_StringHolder & | name, | 
| int | appearance = 0 | ||
| ) | const | 
Index of the field that has the given name.
| const UT_StringHolder& COP_CableStructure::getFieldName | ( | int | index | ) | const | 
Name of the index-th field in this cable.
Type of the index-th field in this cable.
| COP_Type COP_CableStructure::getFieldType | ( | const UT_StringHolder & | name | ) | const | 
Type of the first field in this cable of the specified name.
| 
 | inline | 
Definition at line 86 of file COP_CableStructure.h.
| int COP_CableStructure::getNumberOfFields | ( | ) | const | 
Number of fields in this cable.
| 
 | inline | 
Definition at line 81 of file COP_CableStructure.h.
| 
 | inline | 
Compares with another cable structure; two cable structures are equal if all fields have the same name and type.
Definition at line 77 of file COP_CableStructure.h.
| void COP_CableStructure::renameAllFields | ( | const UT_StringHolder & | name | ) | 
All existing fields of this cable structure will be renamed.
| void COP_CableStructure::reset | ( | ) | 
Removes all fields from this cable structure.
| bool COP_CableStructure::setFieldName | ( | const UT_StringHolder & | name, | 
| int | index | ||
| ) | 
Changes the name of an already-existing field; if the field does not exist, returns false without making modifications.
| 
 | protected | 
Array of all fields in the cable.
Definition at line 93 of file COP_CableStructure.h.