ContRap-Core
Public Member Functions

crp::String Class Reference

Class String is the wrapped class for strings. More...

#include <types.h>

Public Member Functions

 String (char *value)
 Constructs a string from a hardware string.
 String (const char *value="")
 Constructs a string from a hardware string.
 String (const std::string &value)
 Constructs a string from a hardware string.
 String (bool boolean)
 Constructs a string from a boolean.
virtual ~String ()
 Destroys the string.
 operator const char * () const
 Assignment operator to a hardware integer.
const char * get_value () const
 Accessor function.
virtual bool operator== (const String &string) const
 Compares two strings with the native string comparator.
virtual bool operator== (const char *string) const
 Compares two strings with the native string comparator.
virtual std::string get_type_name () const
 Returns the type of the object.
virtual std::string to_string () const
 Converts the object to a string.

Detailed Description

Class String is the wrapped class for strings.


Constructor & Destructor Documentation

crp::String::String ( char *  value) [inline]

Constructs a string from a hardware string.

Parameters:
valueValue of the string
crp::String::String ( const char *  value = "") [inline]

Constructs a string from a hardware string.

Parameters:
valueValue of the string
crp::String::String ( const std::string &  value) [inline]

Constructs a string from a hardware string.

Parameters:
valueValue of the string
crp::String::String ( bool  boolean) [inline]

Constructs a string from a boolean.

Parameters:
valueValue of the string
virtual crp::String::~String ( ) [inline, virtual]

Destroys the string.


Member Function Documentation

virtual std::string crp::String::get_type_name ( ) const [inline, virtual]

Returns the type of the object.

Returns:
Type of the object
const char* crp::String::get_value ( ) const [inline]

Accessor function.

Returns:
Value of the string
crp::String::operator const char * ( ) const [inline]

Assignment operator to a hardware integer.

Returns:
Value of the string
virtual bool crp::String::operator== ( const char *  string) const [inline, virtual]

Compares two strings with the native string comparator.

Parameters:
stringString to compare
virtual bool crp::String::operator== ( const String string) const [inline, virtual]

Compares two strings with the native string comparator.

Parameters:
stringString to compare
virtual std::string crp::String::to_string ( ) const [inline, virtual]

Converts the object to a string.

Returns:
String represenation of the object

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