OSRTString.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2003-2010 Objective Systems, Inc.
00003  *
00004  * This software is furnished under a license and may be used and copied
00005  * only in accordance with the terms of such license and with the
00006  * inclusion of the above copyright notice. This software or any other
00007  * copies thereof may not be provided or otherwise made available to any
00008  * other person. No title to and ownership of the software is hereby
00009  * transferred.
00010  *
00011  * The information in this software is subject to change without notice
00012  * and should not be construed as a commitment by Objective Systems, Inc.
00013  *
00014  * PROPRIETARY NOTICE
00015  *
00016  * This software is an unpublished work subject to a confidentiality agreement
00017  * and is protected by copyright and trade secret law.  Unauthorized copying,
00018  * redistribution or other use of this work is prohibited.
00019  *
00020  * The above notice of copyright on this source code product does not indicate
00021  * any actual or intended publication of such source code.
00022  *
00023  *****************************************************************************/
00031 #ifndef _OSRTSTRING_H_
00032 #define _OSRTSTRING_H_
00033 
00034 /* Disable MS VC++ Level 4 warning about unreferenced inline functions */
00035 #ifdef _MSC_VER
00036 #pragma warning(disable: 4514)
00037 #endif /* _MSC_VER */
00038 
00039 #include "rtxsrc/rtxCommon.h"
00040 #include "rtxsrc/rtxPrint.h"
00041 #include "rtxsrc/OSRTStringIF.h"
00042 
00049 class EXTRTCLASS OSRTString : public OSRTStringIF {
00050  protected:
00051    OSUTF8CHAR* mValue;
00052 
00053  public:
00057    EXTRTMETHOD OSRTString();
00058 
00065    EXTRTMETHOD OSRTString (const char* strval);
00066 
00073    EXTRTMETHOD OSRTString (const OSUTF8CHAR* strval);
00074 
00080    EXTRTMETHOD OSRTString (const OSRTString& str);
00081 
00086    virtual EXTRTMETHOD ~OSRTString();
00087 
00091    virtual OSRTStringIF* clone () { return new OSRTString (*this); }
00092 
00097    virtual const char* getValue () const {
00098       return (const char*) mValue;
00099    }
00100 
00105    virtual const OSUTF8CHAR* getUTF8Value () const {
00106       return mValue;
00107    }
00108 
00114    virtual void print (const char* name) {
00115       rtxPrintCharStr (name, (const char*)mValue);
00116    }
00117 
00123    virtual EXTRTMETHOD void setValue (const char* str);
00124 
00130    virtual EXTRTMETHOD void setValue (const OSUTF8CHAR* str);
00131 
00135    EXTRTMETHOD OSRTString& operator= (const OSRTString& original);
00136 } ;
00137 
00138 #endif