FME Server C++ API 3.0

ifmeserverstring.h

Go to the documentation of this file.
00001 #ifndef _IFMESERVERSTRING_H
00002 #define _IFMESERVERSTRING_H
00003 
00062 #include <fmeservertypes.h>
00063 
00064 
00065 //===========================================================================
00066 // Abstract Interface Class -- all methods are virtual and it has no data
00067 class IFMEServerString
00068 {
00069 public:
00070 
00071    // -----------------------------------------------------------------------
00075    virtual const char* operator=(const char* stringValue) = 0;
00076 
00077    // -----------------------------------------------------------------------
00082    virtual operator const char*() const = 0;
00083 
00084    // -----------------------------------------------------------------------
00086    virtual FME_Boolean operator==(const char* other) = 0;
00087 
00088    // -----------------------------------------------------------------------
00091    virtual void set(const char* stringValue, const FME_UInt32 length) = 0;
00092 
00093    // -----------------------------------------------------------------------
00098    virtual const char* data() const = 0;
00099 
00100    // -----------------------------------------------------------------------
00103    virtual FME_UInt32 length() const = 0;
00104 
00105 protected:
00106    // -----------------------------------------------------------------------
00107    /* Constructor                                                          */
00108    IFMEServerString() {}; 
00109 
00110    // -----------------------------------------------------------------------
00111    /* Destructor                                                           */
00112    virtual ~IFMEServerString() {};
00113 
00114 private:
00115    // Hide methods that we don't want called -- but we leave the door
00116    // open if subclasses want to implement these
00117 
00118    // -----------------------------------------------------------------------
00119    /* copy constructor                                                     */
00120    IFMEServerString(const IFMEServerString&);
00121 
00122    // -----------------------------------------------------------------------
00123    /* assignment operator.                                                 */
00124    IFMEServerString& operator=(const IFMEServerString&);
00125 
00126 };
00127 
00128 //===========================================================================
00129 // Abstract Interface Class -- all methods are virtual and it has no data
00130 class IFMEServerStringArray
00131 {
00132 public:
00133 
00134    // -----------------------------------------------------------------------
00136    virtual void append(const char* stringValue) = 0;
00137 
00138    // -----------------------------------------------------------------------
00140    virtual void append(const IFMEServerString& stringValue) = 0;
00141 
00142    // -----------------------------------------------------------------------
00145    virtual const char* operator()(FME_UInt32 index) const = 0;
00146 
00147    // -----------------------------------------------------------------------
00150    virtual FME_MsgNum getElement(const FME_UInt32 index,
00151                                  IFMEServerString& element) const = 0;
00152 
00153    // -----------------------------------------------------------------------
00156    virtual FME_MsgNum setElement(const FME_UInt32 index,
00157                                  const IFMEServerString& element) = 0;
00158 
00159    // -----------------------------------------------------------------------
00161    virtual FME_UInt32 entries() const = 0;
00162 
00163    // -----------------------------------------------------------------------
00165    virtual void clear() = 0;
00166 
00167    // -----------------------------------------------------------------------
00169    virtual FME_Boolean contains(const char* stringValue) const = 0;
00170 
00171    // -----------------------------------------------------------------------
00173    virtual FME_Boolean contains(const IFMEServerString& stringValue) const = 0;
00174 
00175    // -----------------------------------------------------------------------
00178    virtual void appendCSVString(const char* csvString, 
00179       const char* delimiter) = 0;
00180 
00181    // -----------------------------------------------------------------------
00184    virtual void appendTokenizeString(const char* tokenString, 
00185       const char* tokenSeparators) = 0;
00186 
00187    // -----------------------------------------------------------------------
00190    virtual FME_UInt32 removeAll(const char* stringValue) = 0;
00191 
00192    // -----------------------------------------------------------------------
00195    virtual FME_UInt32 removeAll(const IFMEServerString& stringValue) = 0;  
00196 
00197 protected:
00198    // -----------------------------------------------------------------------
00199    // No one should be creating an instance of this directly, so we
00200    // make the constructor protected.
00201    IFMEServerStringArray() {}; 
00202 
00203    // -----------------------------------------------------------------------
00204    // Destructor 
00205    virtual ~IFMEServerStringArray() {};
00206 
00207 private:
00208    // Hide methods that we don't want called -- but we leave the door
00209    // open if subclasses want to implement these
00210 
00211    //---------------------------------------------------------------
00212    // copy constructor
00213    IFMEServerStringArray(const IFMEServerStringArray&);
00214 
00215    //---------------------------------------------------------------
00216    // assignment operator.
00217    IFMEServerStringArray& operator=(const IFMEServerStringArray&);
00218 };
00219 
00220 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines