Debian Codegraph @

src/framework/System/CString.h

raw symbols SCIP
1 /***************************************************************************
2 CString.h - description
3 -------------------
4 begin : December 29th, 2008
5 copyright : (C) 2008 by Duong Khang NGUYEN
6 email : neoneurone @ gmail com
7
8 $Id: CString.h 442 2010-04-24 10:52:32Z neoneurone $
9 ***************************************************************************/
10
11 /***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * any later version. *
17 * *
18 ***************************************************************************/
19
20 #ifndef _SPF_SYSTEM_CSTRING_H_
21 #define _SPF_SYSTEM_CSTRING_H_ 1
22
23 // Framework headers
24 #include "CObject.h"
25
26 // Standard C++ headers
27 #include <string>
28 #include <ostream>
29
30 SPF_NAMESPACE_BEGIN(System)
31
32
33 /**
34 Represents text string instance.
35 */
36 class String : public Object
37 {
38 public:
39 /**
40 Represents an empty string.
41 */
42 static const String Empty;
43
44 // Constructors and destructor
45 String();
46 String(const char* const& value);
47 String(const unsigned char* const& value);
48 explicit String(std::string value);
49 virtual ~String();
50
51 // String[] Split(String[] separator, const int options = StringSplitOptions::None);
52
53 // Methods
54 virtual String ToString() const;
55
56 // Properties
57 /**
58 Gets the number of characters in the current String object.
59 */
60 int GetLength() const;
61
62 // Operators
63 operator const char*() const;
64 String& operator=(const char* const value);
65 String& operator=(const NullValue& null);
66
67 const String operator+(const char* const value) const;
68 const String operator+(const String& value) const;
69
70 String& operator+=(const String& value);
71
72 bool operator==(const char* const value) const;
73 bool operator==(const String& value) const;
74
75 String& operator<<(const unsigned char value);
76 String& operator<<(const int value);
77 String& operator<<(const char* const value);
78
79 friend std::ostream& operator<<(std::ostream& os, const String& value);
80
81 private:
82 std::string msString;
83
84 }; // class System::String
85
86
87 SPF_NAMESPACE_END
88
89 #endif