Dakota::String class, used as main string class for Dakota. More...
Public Member Functions | |
String () | |
Default constructor. | |
String (const String &a) | |
Copy constructor for incoming String. | |
String (const String &a, size_t start_index, size_t num_items) | |
Copy constructor for portion of incoming String. | |
String (const char *c_string) | |
Copy constructor for incoming char* array. | |
String (const std::string &a) | |
Copy constructor for incoming base string. | |
~String () | |
Destructor. | |
String & | operator= (const String &) |
Assignment operator for incoming String. | |
String & | operator= (const std::string &) |
Assignment operator for incoming base string. | |
String & | operator= (const char *) |
Assignment operator for incoming char* array. | |
operator const char * () const | |
The operator() returns pointer to standard C char array. | |
String & | toUpper () |
Convert to upper case string. | |
void | upper () |
String & | toLower () |
Convert to lower case string. | |
void | lower () |
bool | contains (const char *sub_string) const |
Returns true if String contains char* substring. | |
bool | begins (const char *sub_string) const |
Returns true if String starts with char* substring. | |
bool | ends (const char *sub_string) const |
Returns true if String ends with char* substring. | |
char * | data () const |
Returns pointer to standard C char array. |
Dakota::String class, used as main string class for Dakota.
The Dakota::String class is the common string class for Dakota. It provides a common interface for string operations whether using the std::string interface or the (legacy) RogueWave RWCString API
operator const char * | ( | ) | const [inline] |
void upper | ( | ) |
Private method which converts String to upper. Utilizes an STL iterator to step through the string and then calls the STL toupper() method. Needs to be done this way because STL only provides a single char toupper method.
Referenced by String::toUpper(), and Dakota::toUpper().
void lower | ( | ) |
Private method which converts String to lower. Utilizes an STL iterator to step through the string and then calls the STL tolower() method. Needs to be done this way because STL only provides a single char tolower method.
Referenced by String::toLower(), and Dakota::toLower().
bool contains | ( | const char * | sub_string | ) | const [inline] |
Returns true if String contains char* substring.
Returns true if the String contains the char* sub_string. Uses the STL find() method.
Referenced by Interface::algebraic_function_type().
bool begins | ( | const char * | sub_string | ) | const [inline] |
Returns true if String starts with char* substring.
Returns true if the String begins with the char* sub_string. Uses the STL compare() method.
Referenced by PecosApproximation::approx_type_to_basis_type(), DataFitSurrModel::approximation_coefficients(), DataFitSurrModel::build_local_multipoint(), ProblemDescDB::check_input(), DataFitSurrModel::DataFitSurrModel(), SurrogateModel::force_rebuild(), ProblemDescDB::get_dis(), ProblemDescDB::get_ds2a(), Iterator::get_iterator(), ProblemDescDB::get_real(), ProblemDescDB::get_rsdm(), Strategy::get_strategy(), ProblemDescDB::get_string(), ProblemDescDB::get_ushort(), Variables::get_view(), DOTOptimizer::initialize(), CONMINOptimizer::initialize(), NCSUOptimizer::initialize(), NLPQLPOptimizer::initialize(), SurrBasedMinimizer::initialize_graphics(), Minimizer::Minimizer(), Optimizer::Optimizer(), ParamStudy::ParamStudy(), SurrBasedMinimizer::print_results(), ProblemDescDB::set(), and SurrBasedLocalMinimizer::SurrBasedLocalMinimizer().
bool ends | ( | const char * | sub_string | ) | const [inline] |
Returns true if String ends with char* substring.
Returns true if the String ends with the char* sub_string. Uses the STL compare() method.
Referenced by PecosApproximation::approx_type_to_basis_type(), ProblemDescDB::check_input(), DataFitSurrModel::DataFitSurrModel(), Approximation::get_approx(), Iterator::get_iterator(), ProblemDescDB::get_ushort(), Variables::get_view(), Interface::Interface(), Minimizer::Minimizer(), NonDLocalInterval::NonDLocalInterval(), NonDLocalReliability::NonDLocalReliability(), PStudyDACE::PStudyDACE(), SequentialHybridStrategy::run_strategy(), SequentialHybridStrategy::SequentialHybridStrategy(), and SOLBase::SOLBase().
char * data | ( | ) | const [inline] |
Returns pointer to standard C char array.
Returns a pointer to C style char array. Needed to mimic the Rogue Wave string class. USE WITH CARE.
Referenced by GridApplicInterface::derived_map_asynch(), GridApplicInterface::grid_file_test(), Interface::Interface(), Dakota::print_restart_tabular(), and ConcurrentStrategy::print_results().