6.52 ABA_STRING Class Reference

class ABA_STRING implements are very simple class for the representation of character strings.

#include <string.h>

Inheritance diagram for ABA_STRING::


PIC


Public Member Functions

Friends

6.52.1 Detailed Description

class ABA_STRING implements are very simple class for the representation of character strings.

Definition at line 45 of file string.h.

6.52.2 Constructor & Destructor Documentation

6.52.2.1 ABA_STRING::ABA_STRING (ABA_GLOBAL * glob, const char * cString = ~~)

The constructor.

Parameters:

glob
A pointer to the corresponding global object.
cString
The initializing string, by default the empty string.

6.52.2.2 ABA_STRING::ABA_STRING (ABA_GLOBAL * glob, const char * cString, int index)

A constructor building a string from a string and an integer.

This constructor is especially useful for building variable or constraint names like { con18}.

Parameters:

glob
A pointer to the corresponding global object.
cString
The initializing string.
index
The integer value appending to the cString (must be less than { MAX}).

6.52.2.3 ABA_STRING::ABA_STRING (const ABA_STRING & rhs)

The copy constructor.

Parameters:

rhs
The string that is copied.

6.52.2.4 ABA_STRING::~ABA_STRING ()

The destructor.

6.52.3 Member Function Documentation

6.52.3.1 const ABA_STRING& ABA_STRING::operator= (const ABA_STRING & rhs)

The assignment operator makes a copy of the right hand side and reallocates memory if required.

Returns:

A reference to the object.

Parameters:

rhs
The right hand side of the assignment.

6.52.3.2 const ABA_STRING& ABA_STRING::operator= (const char * rhs)

The assignment operator is overloaded for character strings.

6.52.3.3 ]

char& ABA_STRING::operator[ ] (int i)

With the subscript operator a single character of the string can be accessed or modified.

If the class is compiled with the preprocessor flag -DABACUSSAFE, then a range check is performed.

Returns:

A reference to the i-th character of the string.

Parameters:

i
The number of the character that should be accessed or modified. The first character has number 0.

6.52.3.4 ]

const char& ABA_STRING::operator[ ] (int i) const

The subscript operator is overloaded for constant use.

6.52.4 Friends And Related Function Documentation

6.52.4.1 int operator== (const ABA_STRING & lhs, const ABA_STRING & rhs) [friend]

The comparison operator.

Note:

the C-library function strcmp() returns 0 if both strings equal.

Returns:

0 If both strings are not equal,

1 otherwise.

Parameters:

lhs
The left hand side of the comparison.
rhs
The right hand side of the comparison.

6.52.4.2 int operator== (const ABA_STRING & lhs, const char * rhs) [friend]

The comparison operator is overloaded for character strings on the right hand side.

6.52.4.3 int operator!= (const ABA_STRING & lhs, const ABA_STRING & rhs) [friend]

The not-equal operator.

Note:

the C-library function strcmp() returns 0 if both strings equal.

Returns:

0 If both strings are equal,

1 otherwise.

Parameters:

lhs
The left hand side of the comparison.
rhs
The right hand side of the comparison.

6.52.4.4 int operator!= (const ABA_STRING & lhs, const char * rhs) [friend]

The not-equal operator is overloaded for character strings on the right hand side.

6.52.4.5 ostream& operator<< (ostream & out, const ABA_STRING & rhs) [friend]

The output operator.

Returns:

A reference to the output stream.

Parameters:

out
The output stream.
rhs
The string being output.

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