Changeset 225 for trunk/foundation/idl/nomstring.idl
- Timestamp:
- Feb 4, 2007, 3:17:09 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/foundation/idl/nomstring.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/foundation/idl/nomstring.idl
r209 r225 41 41 NOMCLASSNAME(NOMString); 42 42 43 /** \class NOMString 44 The NOMString class is used for strings which automatically grow or shrink. 45 Methods are provided for common tasks when dealing with strings like inserting or 46 appending strings. A string object never can be empty. It always is a string which may have a length of zero. 47 These methods are threadsafe by always working with copies. 48 49 Note that you don't have to delete a NOMString object. This is done by the garbage collector. Deleting 50 it doesn't hurt, though. 51 */ 43 52 interface NOMString : NOMObject 44 53 { 54 /** 55 The current version of this class is 1.0 56 */ 45 57 NOMCLASSVERSION(1, 0); 46 58 59 /** 60 Assign a string to this NOMString. An initially created NOMString object is empty. 61 This method can be used to assign some value to it. 62 63 \remark 64 This method does not work on a copy. So by assigning a value to the NOMString the 65 old contents is lost. This may have sideeffects in multithreaded environments if used without care. 66 67 \sa assignCString() 68 */ 47 69 PNOMString assign(in PNOMString nomString); 48 /* Assign a C string to this NOMString */ 70 71 /** 72 Assign a C string to this NOMString. An initially created NOMString object is empty. 73 This method can be used to assign some value to it. 74 75 \remark 76 This method does not work on a copy. So by assigning a value to the NOMString the old contents 77 is lost. This may have sideeffects in multithreaded environments if used without care. 78 79 \sa assign() 80 */ 49 81 PNOMString assignCString(in string chrString); 50 /* Returns the C string held by this NOMString*/ 82 83 /** 84 Returns the C string holding the info inside the string object. Use with care. 85 In most cases you rather want to use copyCString() instead. 86 87 \return The C string representing the contents of the string object. 88 89 \sa copyCString() 90 */ 51 91 string queryCString(); 52 PNOMString append(in PNOMString nomString); 92 93 /** 94 Add the NOMString nomString to the end of the string object. 95 96 \param nomString A NOMString object to be put at the end of the string. 97 \return 98 The returned NOMString object is a new object which is owned by the caller. 99 100 \sa appendCString(), prepend() 101 */ 102 PNOMString append(in PNOMString nomString); 103 104 /** 105 Prepend the NOMString \e nomString to the given string object and return a pointer to a 106 new string object. 107 108 \param nomString A NOMString object to be put in front of the string. 109 \return 110 The returned NOMString object is a new object which is owned by the caller. 111 112 \sa prependCString() 113 */ 53 114 PNOMString prepend(in PNOMString nomString); 54 PNOMString appendCString(in string chrString); 115 116 /** 117 Append the given C string to the end of the string held by the NOMString object. 118 119 \param chrString A null terminated string. 120 \return 121 The NOMString object is a new object which is owned by the caller. 122 123 \sa append(), prependCString() 124 */ 125 PNOMString appendCString(in string chrString); 126 127 /** 128 Prepend the C string to the string object. 129 130 \param chrString A null terminated string. 131 \return 132 The NOMString object is a new object which is owned by the caller. 133 134 \sa appendCString(), prepend() 135 */ 55 136 PNOMString prependCString(in string chrString); 137 138 /** 139 \return Returns the length of the string in characters. 140 */ 56 141 unsigned long length(); 142 143 /** 144 Cuts off the end of a string leaving the first ulNewLen characters. 145 146 \return 147 The returned NOMString object is a new object holding the truncated string 148 which is owned by the caller. 149 */ 57 150 PNOMString truncate(in unsigned long ulNewLen); 151 152 /** 153 Create a copy of the NOMString object this method is called on. The caller 154 owns the new NOMString object. 155 156 \return A new NOMString object 157 158 \sa copyCString() 159 */ 58 160 PNOMString copy(); 161 162 /** 163 Returns a copy of the C string holding the info inside the string object. 164 165 \return 166 The returned C string is owned by the caller. 167 168 \sa copy() 169 */ 59 170 string copyCString(); 60 171 61 /* Init and uninit the GString */ 172 /** 173 Override of nomInit() to initialize the GString */ 62 174 NOMOVERRIDE(nomInit); 63 175 64 /* The GString holding the data */ 176 /** 177 The GString holding the data 178 */ 65 179 NOMINSTANCEVAR(PGString gString); 66 180 };
Note:
See TracChangeset
for help on using the changeset viewer.
