Public Member Functions
String Class Reference

Dakota::String class, used as main string class for Dakota. More...

List of all members.

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.
Stringoperator= (const String &)
 Assignment operator for incoming String.
Stringoperator= (const std::string &)
 Assignment operator for incoming base string.
Stringoperator= (const char *)
 Assignment operator for incoming char* array.
 operator const char * () const
 The operator() returns pointer to standard C char array.
StringtoUpper ()
 Convert to upper case string.
void upper ()
StringtoLower ()
 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.

Detailed Description

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


Member Function Documentation

operator const char * ( ) const [inline]

The operator() returns pointer to standard C char array.

The operator () returns a pointer to a char string. Uses the STL c_str() method. This allows for the String to be used in method calls without having to call the data() or c_str() methods.

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 Dakota::toUpper(), and String::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 Dakota::toLower(), and String::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]
bool ends ( const char *  sub_string) const [inline]
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 Graphics::create_plots_2d(), GridApplicInterface::derived_map_asynch(), GridApplicInterface::grid_file_test(), Interface::Interface(), BoStream::operator<<(), Dakota::print_restart_tabular(), and ConcurrentStrategy::print_results().


The documentation for this class was generated from the following files: