cgma
|
#include <CubitSimpleAttrib.hpp>
Public Member Functions | |
bool | isEmpty () const |
CubitSimpleAttrib () | |
CubitSimpleAttrib (const CubitString new_character_type, const CubitString new_string_data=CubitString(), const CubitString new_more_string_data=CubitString(), const int *new_integer_data=NULL, const double *new_double_data=NULL) | |
CubitSimpleAttrib (const std::vector< CubitString > *string_list, const std::vector< double > *double_list=NULL, const std::vector< int > *int_list=NULL) | |
CubitSimpleAttrib (const CubitSimpleAttrib &csa_ptr) | |
~CubitSimpleAttrib () | |
CubitSimpleAttrib & | operator= (const CubitSimpleAttrib &other) |
CubitString | character_type () const |
const std::vector< CubitString > & | string_data_list () const |
std::vector< CubitString > & | string_data_list () |
void | string_data_list (const std::vector< CubitString > &new_list) |
const std::vector< double > & | double_data_list () const |
std::vector< double > & | double_data_list () |
void | double_data_list (const std::vector< double > &new_list) |
const std::vector< int > & | int_data_list () const |
std::vector< int > & | int_data_list () |
void | int_data_list (const std::vector< int > &new_list) |
bool | operator== (const CubitSimpleAttrib &other) const |
void | print () const |
Static Public Member Functions | |
static void | initialize_settings () |
static CubitBoolean | get_push_attribs () |
static void | set_push_attribs (CubitBoolean flag) |
Private Attributes | |
std::vector< CubitString > | stringDataList |
std::vector< double > | doubleDataList |
std::vector< int > | intDataList |
Static Private Attributes | |
static CubitBoolean | pushAttribs = CUBIT_FALSE |
Definition at line 23 of file CubitSimpleAttrib.hpp.
Definition at line 21 of file CubitSimpleAttrib.cpp.
{ }
CubitSimpleAttrib::CubitSimpleAttrib | ( | const CubitString | new_character_type, |
const CubitString | new_string_data = CubitString() , |
||
const CubitString | new_more_string_data = CubitString() , |
||
const int * | new_integer_data = NULL , |
||
const double * | new_double_data = NULL |
||
) | [explicit] |
Definition at line 29 of file CubitSimpleAttrib.cpp.
{ assert(new_character_type.length() > 0); stringDataList.push_back(new_character_type); if (new_string_data.length()) { stringDataList.push_back(new_string_data); } if (new_more_string_data.length()) { stringDataList.push_back(new_more_string_data); } if(new_double_data) doubleDataList.push_back( *new_double_data ); if(new_integer_data) intDataList.push_back( *new_integer_data ); return; }
CubitSimpleAttrib::CubitSimpleAttrib | ( | const std::vector< CubitString > * | string_list, |
const std::vector< double > * | double_list = NULL , |
||
const std::vector< int > * | int_list = NULL |
||
) | [explicit] |
Definition at line 69 of file CubitSimpleAttrib.cpp.
{ if(string_list) this->stringDataList = *string_list; if(double_list) this->doubleDataList = *double_list; if(int_list) this->intDataList = *int_list; }
CubitSimpleAttrib::CubitSimpleAttrib | ( | const CubitSimpleAttrib & | csa_ptr | ) |
Definition at line 62 of file CubitSimpleAttrib.cpp.
{ this->stringDataList = csa_ptr.stringDataList; this->doubleDataList = csa_ptr.doubleDataList; this->intDataList = csa_ptr.intDataList; }
Definition at line 25 of file CubitSimpleAttrib.cpp.
{ }
CubitString CubitSimpleAttrib::character_type | ( | ) | const |
Definition at line 90 of file CubitSimpleAttrib.cpp.
{ if(stringDataList.size() >= 1 ) { return stringDataList[0]; } return CubitString(); }
const std::vector<double>& CubitSimpleAttrib::double_data_list | ( | ) | const [inline] |
Definition at line 74 of file CubitSimpleAttrib.hpp.
{return doubleDataList;}
std::vector<double>& CubitSimpleAttrib::double_data_list | ( | ) | [inline] |
Definition at line 75 of file CubitSimpleAttrib.hpp.
{return doubleDataList;}
void CubitSimpleAttrib::double_data_list | ( | const std::vector< double > & | new_list | ) |
Definition at line 104 of file CubitSimpleAttrib.cpp.
{ doubleDataList = new_list; }
static CubitBoolean CubitSimpleAttrib::get_push_attribs | ( | ) | [inline, static] |
Definition at line 91 of file CubitSimpleAttrib.hpp.
{return pushAttribs;};
void CubitSimpleAttrib::initialize_settings | ( | ) | [static] |
Definition at line 123 of file CubitSimpleAttrib.cpp.
{ SettingHandler::instance()->add_setting("Push Attribs", CubitSimpleAttrib::set_push_attribs, CubitSimpleAttrib::get_push_attribs); }
const std::vector<int>& CubitSimpleAttrib::int_data_list | ( | ) | const [inline] |
Definition at line 79 of file CubitSimpleAttrib.hpp.
{return intDataList;}
std::vector<int>& CubitSimpleAttrib::int_data_list | ( | ) | [inline] |
Definition at line 80 of file CubitSimpleAttrib.hpp.
{return intDataList;}
void CubitSimpleAttrib::int_data_list | ( | const std::vector< int > & | new_list | ) |
Definition at line 109 of file CubitSimpleAttrib.cpp.
{ intDataList = new_list; }
bool CubitSimpleAttrib::isEmpty | ( | ) | const |
Definition at line 55 of file CubitSimpleAttrib.cpp.
{ return stringDataList.empty() && doubleDataList.empty() && intDataList.empty(); }
CubitSimpleAttrib & CubitSimpleAttrib::operator= | ( | const CubitSimpleAttrib & | other | ) |
Definition at line 82 of file CubitSimpleAttrib.cpp.
{ this->stringDataList = other.stringDataList; this->intDataList = other.intDataList; this->doubleDataList = other.doubleDataList; return *this; }
bool CubitSimpleAttrib::operator== | ( | const CubitSimpleAttrib & | other | ) | const |
Definition at line 114 of file CubitSimpleAttrib.cpp.
{ return this->stringDataList == other.stringDataList && this->doubleDataList == other.doubleDataList && this->intDataList == other.intDataList; }
void CubitSimpleAttrib::print | ( | ) | const |
Definition at line 131 of file CubitSimpleAttrib.cpp.
{ PRINT_INFO("CSA: type = %s\n", stringDataList[0].c_str()); PRINT_INFO("String data: "); for ( size_t i=1; i<stringDataList.size(); i++) PRINT_INFO("%s;", stringDataList[i].c_str()); if (stringDataList.size() == 0) PRINT_INFO("(none)"); PRINT_INFO("\n"); PRINT_INFO("Int data: "); for (size_t i=0; i<intDataList.size(); i++) PRINT_INFO("%d;", intDataList[i]); if (intDataList.size() == 0) PRINT_INFO("(none)"); PRINT_INFO("\n"); PRINT_INFO("Double data: "); for (size_t i=0; i<doubleDataList.size(); i++) PRINT_INFO("%f;", doubleDataList[i]); if (doubleDataList.size() == 0) PRINT_INFO("(none)"); PRINT_INFO("\n"); }
static void CubitSimpleAttrib::set_push_attribs | ( | CubitBoolean | flag | ) | [inline, static] |
Definition at line 92 of file CubitSimpleAttrib.hpp.
{pushAttribs = flag;};
const std::vector<CubitString>& CubitSimpleAttrib::string_data_list | ( | ) | const [inline] |
Definition at line 69 of file CubitSimpleAttrib.hpp.
{return stringDataList;}
std::vector<CubitString>& CubitSimpleAttrib::string_data_list | ( | ) | [inline] |
Definition at line 70 of file CubitSimpleAttrib.hpp.
{return stringDataList;}
void CubitSimpleAttrib::string_data_list | ( | const std::vector< CubitString > & | new_list | ) |
Definition at line 99 of file CubitSimpleAttrib.cpp.
{ this->stringDataList = new_list; }
std::vector<double> CubitSimpleAttrib::doubleDataList [private] |
Definition at line 28 of file CubitSimpleAttrib.hpp.
std::vector<int> CubitSimpleAttrib::intDataList [private] |
Definition at line 30 of file CubitSimpleAttrib.hpp.
CubitBoolean CubitSimpleAttrib::pushAttribs = CUBIT_FALSE [static, private] |
Definition at line 32 of file CubitSimpleAttrib.hpp.
std::vector<CubitString> CubitSimpleAttrib::stringDataList [private] |
Definition at line 26 of file CubitSimpleAttrib.hpp.