IBM Content Manager, Version 8.5          

Supporting classes

These classes are used to provide support objects and functions for using the other IBM® Information Integrator for Content C++ classes.

DKConstant.h

DKConstant.h contains some constant values. DKConstant.h includes DKConstant2.h, and DKConstant2.h contains the other constants that the C++ OO API uses.

DKString
Class summary:
For AIX

 #define DKString IString

For Windows

 class DKString : public CString
 {
  public:
       DKString();
       DKString (const char* s);
       DKString (const DKString &s);
       DKString (void *pBuffer, unsigned long lenBuffer);
       DKString (char * pc);
       DKString (char c);
       DKString (int v);
       DKString (unsigned int v);
       DKString (short v);
       DKString (long v);
       DKString (unsigned short v);     
       DKString (unsigned long v);
       DKString (double v);
       virtual DKString();


       const DKString operator = (const DKString &cst) const;
       const DKString operator = (const CString &cst) const;
       const DKString operator = (const char * cst) const;
       const DKString operator = (const char c) const;
       const DKString operator + (const DKString &cst) const;
       const DKString operator + (const CString &cst) const;
       const DKString operator + (const char * cst) const;
       const DKString operator + (const char c) const;
       const DKString operator += (const DKString &cst) const;
       const DKString operator += (const CString &cst) const;
       const DKString operator += (const char * cst) const;
       const DKString operator += (const char c) const;

       dkBoolean operator==(char *s) const;
       dkBoolean operator==(const char *s) const;
       dkBoolean operator==(const DKString *s) const;

       dkBoolean operator!=(char *s) const;
       dkBoolean operator!=(const char *s) const;
       dkBoolean operator!=(const DKString *s) const;
       unsigned long size() const;
       dkString subString (unsigned long position, 
                           unsigned long len) const;
       void strip();
       unsigned long length() const;
       unsigned long indexOf (char ch) const;
       unsigned long indexOf (const DKString str, 
                              unsigned long position) const;
       unsigned long indexOf (char ch, 
                              unsigned long position) const;

       dkString& remove (unsigned long position, 
                         unsigned long len);
       dkString& insert (const DKString str, 
                         unsigned long position);
       dkString& leftJustify (unsigned long len)
       dkBoolean isDigits();
       long asInt();
       unsigned long asUnsigned();
       operator CString();
       operator char *();
       char operator [](unsigned long index);
       DKString& upperCase();
};
          
Members:
Constructor

The inputs to this class are listed as follows:

  DKString();
  DKString (const char* s);
  DKString (const DKString &s);
  DKString (void *pBuffer, 
            unsigned long lenBuffer);
  DKString (char * pc);
  DKString (char c);
  DKString (int v);
  DKString (unsigned int v);
  DKString (short v);
  DKString (long v);
  DKString (unsigned short v);
  DKString (unsigned long v);
  DKString (double v);
Member functions
operator=
The assignment operator allows a new value to be assigned to the string.
const DKString operator = (const DKString &cst) const;
const DKString operator = (const char * cst) const;
const DKString operator = (const char c) const;
// only on MSVC
const DKString operator = (const CString &cst) const;
operator+
This operator allows concatenation to the string.
const DKString operator + (const DKString &cst) const;
const DKString operator + (const char * cst) const;
const DKString operator + (const char c) const;
// only on MSVC
const DKString operator + (const CString &cst) const;
operator+=
This operator allows concatenation to the string, and to assign it a new value.
const DKString operator += (const DKString &cst) const;
const DKString operator += (const char * cst) const;
const DKString operator += (const char c) const;
// only on MSVC
const DKString operator += (const CString &cst) const;
operator==
This operator is used for comparing strings for equality.
dkBoolean operator==(char *s) const;
dkBoolean operator==(const char *s) const;
dkBoolean operator==(const DKString *s) const;
operator!=
This operator is used for testing strings for inequality.
dkBoolean operator!=(char *s) const;
dkBoolean operator!=(const char *s) const;
dkBoolean operator!=(const DKString *s) const;
size
Returns the size of the string.
unsigned long size() const;
subString
Gets a substring of the subject string. position 1 represents the first character of the string.
dkString subString (unsigned long position,
unsigned long len) const;
strip
Strips the leading and trailing blanks in a string.
void strip();
length
Returns the length of a string.
unsigned long length() const;
indexOf
Returns the starting position of the input string within a given string. position 1 represents the first character of the string. If the input string is not found, a zero value is returned.
unsigned long indexOf (char ch) const;
unsigned long indexOf (const DKString str, 
unsigned long position) const;
unsigned long indexOf (char ch, 
unsigned long position) const;
remove
Removes a specified portion of the string. position 1 represents the first character of the string.
dkString& remove (unsigned long position, unsigned long len);
insert
Inserts the input string into the given string. position 1 represents the first character of the string. If the specified string length is longer than the current string length, the string is extended by the pad character, which is a blank character.
dkString& insert (const DKString& str, unsigned long position);
leftJustify
Left-justifies the subject string of the specified length. If the specified string length is longer than the current string length, the string is extended by the pad character, which is a blank character.
dkString& leftJustify (unsigned long len);
isDigits
Returns a TRUE value if the string content is digits.
dkBoolean isDigits();
asInt
Converts a string to long.
unsigned long asInt();
asUnsigned
Converts a string to unsigned long.
unsigned long asUnsigned();
operator CString
Returns the CString of a string's content.Restriction: this operator is only valid for Microsoft Visual C++.
operator CString();
operator char *
Returns the char* of a string's content.
operator char *();
operator []
position 1 represents the first character of the string.
char operator []( unsigned long index );
upperCase
Creates a new string with all uppercase characters.
DKString& upperCase();


Feedback

Last updated: December 2013
supportingclasses.htm

© Copyright IBM Corporation 2013.