(file) Return to String.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/String.h between version 1.15 and 1.19

version 1.15, 2001/04/11 19:53:22 version 1.19, 2001/04/26 01:34:11
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 // //
Line 17 
Line 17 
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
 // //
 //END_LICENSE  //==============================================================================
 //BEGIN_HISTORY  
 // //
 // Author:  // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // $Log$  // Modified By:
 // Revision 1.15  2001/04/11 19:53:22  mike  
 // More porting  
 // //
 // Revision 1.14  2001/04/10 23:01:52  mike  //%/////////////////////////////////////////////////////////////////////////////
 // Added new TimeValue class and regression tests for it.  
 // Modified Stopwatch class to use TimeValue class.  
 //  
 // Revision 1.13  2001/04/10 22:42:55  karl  
 // Correct error in String find  
 //  
 // Revision 1.12  2001/04/09 20:18:47  karl  
 // add find substring function  
 //  
 // Revision 1.11  2001/04/04 20:02:27  karl  
 // documentation update  
 //  
 // Revision 1.10  2001/03/29 16:40:31  karl  
 // add doc  
 //  
 // Revision 1.9  2001/02/26 04:33:28  mike  
 // Fixed many places where cim names were be compared with operator==(String,String).  
 // Changed all of these to use CIMName::equal()  
 //  
 // Revision 1.8  2001/02/20 14:05:24  karl  
 // Comments for Document  
 //  
 // Revision 1.7  2001/02/11 17:19:30  mike  
 // added reverseFind() method  
 //  
 // Revision 1.6  2001/02/11 05:42:33  mike  
 // new  
 //  
 // Revision 1.5  2001/01/30 08:00:43  karl  
 // DOC++ Documentation update for header files  
 //  
 // Revision 1.4  2001/01/28 07:05:18  mike  
 // added instance name/reference converters  
 //  
 // Revision 1.3  2001/01/28 04:11:03  mike  
 // fixed qualifier resolution  
 //  
 // Revision 1.2  2001/01/24 16:16:38  karl  
 // Incorporate Doc++ Comments as documentation into .h files  
 //  
 // Revision 1.1.1.1  2001/01/14 19:53:15  mike  
 // Pegasus import  
 //  
 //  
 //END_HISTORY  
  
 #ifndef Pegasus_String_h #ifndef Pegasus_String_h
 #define Pegasus_String_h #define Pegasus_String_h
Line 373 
Line 325 
     */     */
     Uint32 reverseFind(Char16 c) const;     Uint32 reverseFind(Char16 c) const;
  
       /** Converts all characters in this string to lower case.
       */
       void toLower();
   
     /** Compare the first n characters of the two strings.     /** Compare the first n characters of the two strings.
         @param s1 - First null-terminated string for the comparison         @param s1 - First null-terminated string for the comparison
         @param s2 - Second null-terminated string for the comparison         @param s2 - Second null-terminated string for the comparison
Line 530 
Line 486 
 */ */
 PEGASUS_COMMON_LINKAGE int CompareIgnoreCase(const char* s1, const char* s2); PEGASUS_COMMON_LINKAGE int CompareIgnoreCase(const char* s1, const char* s2);
  
   /** Get the next line from the input file.
   */
   PEGASUS_COMMON_LINKAGE Boolean GetLine(std::istream& is, String& line);
   
   /*  This is an internal class not to be used by the internal Pegasus
       components only. It provides an easy way to create an 8-bit string
       representation on the fly without calling allocateCString() and
       then worrying about deleting the string. The underscore before the
       class name denotes that this class is internal, unsupported, undocumented,
       and may be removed in future releases.
   */
   class _CString
   {
   public:
   
       _CString(const String& x)
       {
           _rep = x.allocateCString();
       }
   
       _CString(const _CString& x)
       {
           _rep = strcpy(new char[strlen(x._rep) + 1], x._rep);
       }
   
       ~_CString()
       {
           delete [] _rep;
       }
   
       _CString& operator=(const _CString& x)
       {
           if (this != &x)
               _rep = strcpy(new char[strlen(x._rep) + 1], x._rep);
   
           return *this;
       }
   
       operator const char*() const
       {
           return _rep;
       }
   
       const char* data() const
       {
           return _rep;
       }
   
   private:
   
       char* _rep;
   };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
 #endif /* Pegasus_String_h */ #endif /* Pegasus_String_h */
   


Legend:
Removed from v.1.15  
changed lines
  Added in v.1.19

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2