cgma
|
#include <CompositeAttrib.hpp>
Public Member Functions | |
const CubitString & | name () const |
CompositeAttrib (const CubitSimpleAttrib &attrib, CompositeAttrib *next_ptr) | |
CompositeAttrib (const CompositeAttrib ©) | |
~CompositeAttrib () | |
void | append_to_csa (CubitSimpleAttrib &attrib) const |
bool | equals (const CubitSimpleAttrib &attrib) const |
CubitSimpleAttrib | csa () const |
Public Attributes | |
CompositeAttrib * | next |
Private Member Functions | |
void | append_to_lists (std::vector< CubitString > &strings, std::vector< int > &ints, std::vector< double > &reals) const |
Private Attributes | |
std::vector< int > | int_array |
std::vector< double > | real_array |
std::vector< CubitString > | string_array |
Definition at line 21 of file CompositeAttrib.hpp.
CompositeAttrib::CompositeAttrib | ( | const CubitSimpleAttrib & | attrib, |
CompositeAttrib * | next_ptr | ||
) |
Definition at line 27 of file CompositeAttrib.cpp.
: int_array(0), real_array(0), string_array(0), next(n) { int_array = attrib.int_data_list(); real_array = attrib.double_data_list(); string_array = attrib.string_data_list(); }
CompositeAttrib::CompositeAttrib | ( | const CompositeAttrib & | copy | ) |
Definition at line 44 of file CompositeAttrib.cpp.
: next(0) { int_array = copy.int_array; real_array = copy.real_array; string_array = copy.string_array; }
Definition at line 114 of file CompositeAttrib.cpp.
{ }
void CompositeAttrib::append_to_csa | ( | CubitSimpleAttrib & | attrib | ) | const |
Definition at line 61 of file CompositeAttrib.cpp.
{ append_to_lists(attrib.string_data_list(), attrib.int_data_list(), attrib.double_data_list()); }
void CompositeAttrib::append_to_lists | ( | std::vector< CubitString > & | strings, |
std::vector< int > & | ints, | ||
std::vector< double > & | reals | ||
) | const [private] |
Definition at line 77 of file CompositeAttrib.cpp.
{ int_list.insert(int_list.end(), int_array.begin(), int_array.end()); real_list.insert(real_list.end(), real_array.begin(), real_array.end()); string_list.insert(string_list.end(), string_array.begin(), string_array.end()); }
CubitSimpleAttrib CompositeAttrib::csa | ( | ) | const |
Definition at line 95 of file CompositeAttrib.cpp.
{ std::vector<CubitString> string_list; std::vector<int> int_list; std::vector<double> real_list; append_to_lists( string_list, int_list, real_list ); return CubitSimpleAttrib(&string_list, &real_list, &int_list); }
bool CompositeAttrib::equals | ( | const CubitSimpleAttrib & | attrib | ) | const |
Definition at line 127 of file CompositeAttrib.cpp.
{ if (attrib.string_data_list().size() != string_array.size() || attrib.int_data_list().size() != int_array.size() || attrib.double_data_list().size() != real_array.size()) return false; return std::equal(string_array.begin(), string_array.end(), attrib.string_data_list().begin()) && std::equal(int_array.begin(), int_array.end(), attrib.int_data_list().begin()) && std::equal(real_array.begin(), real_array.end(), attrib.double_data_list().begin()); }
const CubitString& CompositeAttrib::name | ( | ) | const [inline] |
Definition at line 35 of file CompositeAttrib.hpp.
{ return string_array[0]; }
std::vector<int> CompositeAttrib::int_array [private] |
Definition at line 25 of file CompositeAttrib.hpp.
Definition at line 37 of file CompositeAttrib.hpp.
std::vector<double> CompositeAttrib::real_array [private] |
Definition at line 26 of file CompositeAttrib.hpp.
std::vector<CubitString> CompositeAttrib::string_array [private] |
Definition at line 27 of file CompositeAttrib.hpp.