cgma
CubitSimpleAttrib Class Reference

#include <CubitSimpleAttrib.hpp>

List of all members.

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 ()
CubitSimpleAttriboperator= (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< CubitStringstringDataList
std::vector< double > doubleDataList
std::vector< int > intDataList

Static Private Attributes

static CubitBoolean pushAttribs = CUBIT_FALSE

Detailed Description

Definition at line 23 of file CubitSimpleAttrib.hpp.


Constructor & Destructor Documentation

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;
}

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.

{
}

Member Function Documentation

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;
}

Definition at line 91 of file CubitSimpleAttrib.hpp.

{return pushAttribs;};
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;
}

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;}

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;
} 

Member Data Documentation

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.

Definition at line 32 of file CubitSimpleAttrib.hpp.

Definition at line 26 of file CubitSimpleAttrib.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines