Defines one level of array bounds for an associated XFileDataDef element. More...
#include "xFileArrayDef.h"
Public Member Functions | |
XFileArrayDef (int fixed_size) | |
XFileArrayDef (XFileDataDef *dynamic_size) | |
XFileDataDef * | get_dynamic_size () const |
Returns the data element that names the dynamic size of the array, if is_fixed_size() returned false. More... | |
int | get_fixed_size () const |
Returns the const size of the array, if is_fixed_size() returned true. More... | |
int | get_size (const XFileNode::PrevData &prev_data) const |
Returns the size of the array dimension. More... | |
bool | is_fixed_size () const |
Returns true if this array definition specifies a const-size array, false if it is a dynamic-size array. More... | |
bool | matches (const XFileArrayDef &other, const XFileDataDef *parent, const XFileDataDef *other_parent) const |
Returns true if the node, particularly a template node, is structurally equivalent to the other node (which must be of the same type). More... | |
void | output (std::ostream &out) const |
Defines one level of array bounds for an associated XFileDataDef element.
Definition at line 26 of file xFileArrayDef.h.
|
inline |
Returns the data element that names the dynamic size of the array, if is_fixed_size() returned false.
Definition at line 57 of file xFileArrayDef.I.
Referenced by matches().
|
inline |
Returns the const size of the array, if is_fixed_size() returned true.
Definition at line 47 of file xFileArrayDef.I.
Referenced by matches().
int XFileArrayDef::get_size | ( | const XFileNode::PrevData & | prev_data | ) | const |
Returns the size of the array dimension.
If this is a fixed array, the size is trivial; if it is dynamic, the size is determined by looking up the dynamic_size element in the prev_data table (which lists all of the data values already defined at this scoping level).
Definition at line 25 of file xFileArrayDef.cxx.
References is_fixed_size().
|
inline |
Returns true if this array definition specifies a const-size array, false if it is a dynamic-size array.
Definition at line 39 of file xFileArrayDef.I.
Referenced by get_size(), and matches().
bool XFileArrayDef::matches | ( | const XFileArrayDef & | other, |
const XFileDataDef * | parent, | ||
const XFileDataDef * | other_parent | ||
) | const |
Returns true if the node, particularly a template node, is structurally equivalent to the other node (which must be of the same type).
This checks data element types, but does not compare data element names.
Definition at line 55 of file xFileArrayDef.cxx.
References XFileNode::find_child_index(), get_dynamic_size(), get_fixed_size(), and is_fixed_size().