AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
Public Member Functions | List of all members
GitTpl::String Class Reference

A class which reads a a string item from an SDS structure. More...

#include <gittpl.h>

Inheritance diagram for GitTpl::String:

Public Member Functions

 String ()
 Create an empty Git::String.
 
 String (const char *s)
 Create a Git::String from a C character array.
 
 String (const char *s, size_type n)
 Create a Git::String from the first n characters a C string.
 
 String (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const char *Default=0, const int Flags=Git::KeepErr)
 Constructor with the initial value set from an SDS structure.
 
 String (const std::string &str)
 Create a Git::String from a std::string.
 
 String (const std::string &str, size_type pos, size_type n=std::string::npos)
 Create a Git::String from a std::string, initialised from s starting at index pos, maximum characters = n.
 
template<class InputIterator >
 String (InputIterator beg, InputIterator end)
 Create a Git::String that is initialised by all characters from beg to end.
 
 String (size_type n, char c)
 Create a Git::String intialised with n occurances of c.
 
void Get (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const char *Default=0, const int Flags=Git::KeepErr)
 Fetch the value of this item from an SDS structure.
 
Stringoperator= (char c)
 Set value to string of length 1.
 
Stringoperator= (const char *s)
 Copy contents of s into this string.
 
Stringoperator= (const std::string &str)
 Assign str to this string.
 
Stringoperator= (const String &str)
 Assign str to this string.
 

Detailed Description

A class which reads a a string item from an SDS structure.

This class is based on std::string and hence all the normal operations are possible. We have attempted to provide all the normal std::string style contructors and assignment operators - which should mean that this class could be used where-ever a std::string is used, but would provide the Get() function to get the value from an SDS structure, as well as a similar style contructors.


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