Changeset 74425 in vbox for trunk/include/iprt
- Timestamp:
- Sep 23, 2018 3:41:48 PM (6 years ago)
- Location:
- trunk/include/iprt/cpp
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/restanyobject.h
r74402 r74425 53 53 public: 54 54 /** Default constructor. */ 55 RTCRestAnyObject() ;55 RTCRestAnyObject() RT_NOEXCEPT; 56 56 /** Destructor. */ 57 57 virtual ~RTCRestAnyObject(); … … 63 63 64 64 /** Safe copy assignment method. */ 65 int assignCopy(RTCRestAnyObject const &a_rThat) ;65 int assignCopy(RTCRestAnyObject const &a_rThat) RT_NOEXCEPT; 66 66 /** Safe copy assignment method, boolean variant. */ 67 int assignCopy(RTCRestBool const &a_rThat) ;67 int assignCopy(RTCRestBool const &a_rThat) RT_NOEXCEPT; 68 68 /** Safe copy assignment method, int64_t variant. */ 69 int assignCopy(RTCRestInt64 const &a_rThat) ;69 int assignCopy(RTCRestInt64 const &a_rThat) RT_NOEXCEPT; 70 70 /** Safe copy assignment method, int32_t variant. */ 71 int assignCopy(RTCRestInt32 const &a_rThat) ;71 int assignCopy(RTCRestInt32 const &a_rThat) RT_NOEXCEPT; 72 72 /** Safe copy assignment method, int16_t variant. */ 73 int assignCopy(RTCRestInt16 const &a_rThat) ;73 int assignCopy(RTCRestInt16 const &a_rThat) RT_NOEXCEPT; 74 74 /** Safe copy assignment method, double variant. */ 75 int assignCopy(RTCRestDouble const &a_rThat) ;75 int assignCopy(RTCRestDouble const &a_rThat) RT_NOEXCEPT; 76 76 /** Safe copy assignment method, string variant. */ 77 int assignCopy(RTCRestString const &a_rThat) ;77 int assignCopy(RTCRestString const &a_rThat) RT_NOEXCEPT; 78 78 /** Safe copy assignment method, array variant. */ 79 int assignCopy(RTCRestArray<RTCRestAnyObject> const &a_rThat) ;79 int assignCopy(RTCRestArray<RTCRestAnyObject> const &a_rThat) RT_NOEXCEPT; 80 80 /** Safe copy assignment method, string map variant. */ 81 int assignCopy(RTCRestStringMap<RTCRestAnyObject> const &a_rThat) ;81 int assignCopy(RTCRestStringMap<RTCRestAnyObject> const &a_rThat) RT_NOEXCEPT; 82 82 83 83 /** Safe value assignment method, boolean variant. */ 84 int assignValue(bool a_fValue) ;84 int assignValue(bool a_fValue) RT_NOEXCEPT; 85 85 /** Safe value assignment method, int64_t variant. */ 86 int assignValue(int64_t a_iValue) ;86 int assignValue(int64_t a_iValue) RT_NOEXCEPT; 87 87 /** Safe value assignment method, int32_t variant. */ 88 int assignValue(int32_t a_iValue) ;88 int assignValue(int32_t a_iValue) RT_NOEXCEPT; 89 89 /** Safe value assignment method, int16_t variant. */ 90 int assignValue(int16_t a_iValue) ;90 int assignValue(int16_t a_iValue) RT_NOEXCEPT; 91 91 /** Safe value assignment method, double variant. */ 92 int assignValue(double a_iValue) ;92 int assignValue(double a_iValue) RT_NOEXCEPT; 93 93 /** Safe value assignment method, string variant. */ 94 int assignValue(RTCString const &a_rValue) ;94 int assignValue(RTCString const &a_rValue) RT_NOEXCEPT; 95 95 /** Safe value assignment method, C-string variant. */ 96 int assignValue(const char *a_pszValue) ;96 int assignValue(const char *a_pszValue) RT_NOEXCEPT; 97 97 98 98 /** Make a clone of this object. */ 99 inline RTCRestAnyObject *clone() const { return (RTCRestAnyObject *)baseClone(); }99 inline RTCRestAnyObject *clone() const RT_NOEXCEPT { return (RTCRestAnyObject *)baseClone(); } 100 100 101 101 /* Overridden methods: */ 102 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;103 virtual int setNull(void) RT_ OVERRIDE;104 virtual int resetToDefault() RT_ OVERRIDE;105 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;106 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;107 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_ OVERRIDE;102 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 103 virtual int setNull(void) RT_NOEXCEPT RT_OVERRIDE; 104 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 105 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 106 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 107 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_NOEXCEPT RT_OVERRIDE; 108 108 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 109 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;110 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;111 virtual const char *typeName(void) const RT_ OVERRIDE;109 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 110 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 111 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 112 112 113 113 /** Factory method. */ 114 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;114 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 115 115 /** Deserialization w/ instantiation. */ 116 116 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson; -
trunk/include/iprt/cpp/restarray.h
r74402 r74425 42 42 public: 43 43 /** Default destructor. */ 44 RTCRestArrayBase() ;44 RTCRestArrayBase() RT_NOEXCEPT; 45 45 /** Destructor. */ 46 46 virtual ~RTCRestArrayBase(); 47 47 48 48 /* Overridden methods: */ 49 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;50 virtual int resetToDefault() RT_ OVERRIDE;51 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;52 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;53 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_ OVERRIDE;49 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 50 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 51 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 52 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 53 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_NOEXCEPT RT_OVERRIDE; 54 54 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 55 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;56 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;57 virtual const char *typeName(void) const RT_ OVERRIDE;55 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 56 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 57 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 58 58 59 59 /** 60 60 * Clear the content of the map. 61 61 */ 62 void clear() ;62 void clear() RT_NOEXCEPT; 63 63 64 64 /** … … 67 67 * @return True if there is more than zero items, false otherwise. 68 68 */ 69 inline bool isEmpty() const 69 inline bool isEmpty() const RT_NOEXCEPT 70 70 { 71 71 return m_cElements == 0; … … 75 75 * Gets the number of entries in the map. 76 76 */ 77 inline size_t size() const 77 inline size_t size() const RT_NOEXCEPT 78 78 { 79 79 return m_cElements; … … 86 86 * @param a_idx The array index. 87 87 */ 88 inline RTCRestObjectBase *atBase(size_t a_idx) 88 inline RTCRestObjectBase *atBase(size_t a_idx) RT_NOEXCEPT 89 89 { 90 90 if (a_idx < m_cElements) … … 99 99 * @param a_idx The array index. 100 100 */ 101 inline RTCRestObjectBase const *atBase(size_t a_idx) const 101 inline RTCRestObjectBase const *atBase(size_t a_idx) const RT_NOEXCEPT 102 102 { 103 103 if (a_idx < m_cElements) … … 112 112 * The value ~(size_t)0 is an alias for the final element. 113 113 */ 114 bool removeAt(size_t a_idx) ;114 bool removeAt(size_t a_idx) RT_NOEXCEPT; 115 115 116 116 /** … … 120 120 * @param a_cEnsureCapacity The number of elements to ensure capacity to hold. 121 121 */ 122 int ensureCapacity(size_t a_cEnsureCapacity) ;122 int ensureCapacity(size_t a_cEnsureCapacity) RT_NOEXCEPT; 123 123 124 124 … … 137 137 * @returns Pointer to new array on success, NULL if out of memory. 138 138 */ 139 virtual RTCRestArrayBase *createClone(void) const = 0;139 virtual RTCRestArrayBase *createClone(void) const RT_NOEXCEPT = 0; 140 140 141 141 /** … … 144 144 * @returns Pointer to new value object on success, NULL if out of memory. 145 145 */ 146 virtual RTCRestObjectBase *createValue(void) = 0;146 virtual RTCRestObjectBase *createValue(void) RT_NOEXCEPT = 0; 147 147 148 148 /** 149 149 * For accessing the static deserializeInstanceFromJson() method of the value. 150 150 */ 151 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) = 0;152 153 /** 154 * Worker for the copy constructor and the assignment operator.151 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT = 0; 152 153 /** 154 * Worker for the copy assignment method and copyArrayWorkerMayThrow(). 155 155 * 156 156 * This will use createEntryCopy to do the copying. … … 159 159 * @param a_rThat The array to copy. Caller makes 100% sure the it has 160 160 * the same type as the destination. 161 * @param a_fThrow Whether to throw error. 162 */ 163 int copyArrayWorker(RTCRestArrayBase const &a_rThat, bool a_fThrow); 161 */ 162 int copyArrayWorkerNoThrow(RTCRestArrayBase const &a_rThat) RT_NOEXCEPT; 163 164 /** 165 * Wrapper around copyArrayWorkerNoThrow for the copy constructor and the 166 * assignment operator. 167 */ 168 void copyArrayWorkerMayThrow(RTCRestArrayBase const &a_rThat); 164 169 165 170 /** … … 172 177 * @param a_fReplace Whether to replace existing entry rather than insert. 173 178 */ 174 int insertWorker(size_t a_idx, RTCRestObjectBase *a_pValue, bool a_fReplace) ;179 int insertWorker(size_t a_idx, RTCRestObjectBase *a_pValue, bool a_fReplace) RT_NOEXCEPT; 175 180 176 181 /** … … 183 188 * @param a_fReplace Whether to replace existing key-value pair with matching key. 184 189 */ 185 int insertCopyWorker(size_t a_idx, RTCRestObjectBase const &a_rValue, bool a_fReplace) ;190 int insertCopyWorker(size_t a_idx, RTCRestObjectBase const &a_rValue, bool a_fReplace) RT_NOEXCEPT; 186 191 187 192 private: … … 201 206 public: 202 207 /** Default constructor - empty array. */ 203 RTCRestArray() 208 RTCRestArray() RT_NOEXCEPT 204 209 : RTCRestArrayBase() 205 210 { … … 215 220 : RTCRestArrayBase() 216 221 { 217 copyArrayWorker (a_rThat, true /*fThrow*/);222 copyArrayWorkerMayThrow(a_rThat); 218 223 } 219 224 … … 221 226 inline RTCRestArray &operator=(RTCRestArray const &a_rThat) 222 227 { 223 copyArrayWorker (a_rThat, true /*fThrow*/);228 copyArrayWorkerMayThrow(a_rThat); 224 229 return *this; 225 230 } 226 231 227 232 /** Safe copy assignment method. */ 228 inline int assignCopy(RTCRestArray const &a_rThat) 229 { 230 return copyArrayWorker (a_rThat, false /*fThrow*/);233 inline int assignCopy(RTCRestArray const &a_rThat) RT_NOEXCEPT 234 { 235 return copyArrayWorkerNoThrow(a_rThat); 231 236 } 232 237 233 238 /** Make a clone of this object. */ 234 inline RTCRestArray *clone() const 239 inline RTCRestArray *clone() const RT_NOEXCEPT 235 240 { 236 241 return (RTCRestArray *)baseClone(); … … 238 243 239 244 /** Factory method. */ 240 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) 245 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT 241 246 { 242 247 return new (std::nothrow) RTCRestArray<ElementType>(); … … 244 249 245 250 /** Factory method for elements. */ 246 static DECLCALLBACK(RTCRestObjectBase *) createElementInstance(void) 251 static DECLCALLBACK(RTCRestObjectBase *) createElementInstance(void) RT_NOEXCEPT 247 252 { 248 253 return new (std::nothrow) ElementType(); … … 250 255 251 256 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 252 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) 257 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT 253 258 { 254 259 *a_ppInstance = new (std::nothrow) RTCRestArray<ElementType>(); … … 267 272 * @param a_pThat The object to insert. The array takes ownership of the object on success. 268 273 */ 269 inline int insert(size_t a_idx, ElementType *a_pThat) 274 inline int insert(size_t a_idx, ElementType *a_pThat) RT_NOEXCEPT 270 275 { 271 276 return insertWorker(a_idx, a_pThat, false /*a_fReplace*/); … … 280 285 * @param a_rThat The object to insert a copy of. 281 286 */ 282 inline int insertCopy(size_t a_idx, ElementType const &a_rThat) 287 inline int insertCopy(size_t a_idx, ElementType const &a_rThat) RT_NOEXCEPT 283 288 { 284 289 return insertCopyWorker(a_idx, a_rThat, false /*a_fReplace*/); … … 292 297 * @param a_pThat The object to insert. The array takes ownership of the object on success. 293 298 */ 294 inline int append(ElementType *a_pThat) 299 inline int append(ElementType *a_pThat) RT_NOEXCEPT 295 300 { 296 301 return insertWorker(~(size_t)0, a_pThat, false /*a_fReplace*/); … … 304 309 * @param a_rThat The object to insert a copy of. 305 310 */ 306 inline int appendCopy(ElementType const &a_rThat) 311 inline int appendCopy(ElementType const &a_rThat) RT_NOEXCEPT 307 312 { 308 313 return insertCopyWorker(~(size_t)0, a_rThat, false /*a_fReplace*/); … … 316 321 * @param a_pThat The object to insert. The array takes ownership of the object on success. 317 322 */ 318 inline int prepend(ElementType *a_pThat) 323 inline int prepend(ElementType *a_pThat) RT_NOEXCEPT 319 324 { 320 325 return insertWorker(0, a_pThat, false /*a_fReplace*/); … … 328 333 * @param a_rThat The object to insert a copy of. 329 334 */ 330 inline int prependCopy(ElementType const &a_rThat) 335 inline int prependCopy(ElementType const &a_rThat) RT_NOEXCEPT 331 336 { 332 337 return insertCopyWorker(0, a_rThat, false /*a_fReplace*/); … … 341 346 * @param a_pThat The replacement object. The array takes ownership of the object on success. 342 347 */ 343 inline int replace(size_t a_idx, ElementType *a_pThat) 348 inline int replace(size_t a_idx, ElementType *a_pThat) RT_NOEXCEPT 344 349 { 345 350 return insertWorker(a_idx, a_pThat, true /*a_fReplace*/); … … 354 359 * @param a_rThat The object to insert a copy of. 355 360 */ 356 inline int replaceCopy(size_t a_idx, ElementType const &a_rThat) 361 inline int replaceCopy(size_t a_idx, ElementType const &a_rThat) RT_NOEXCEPT 357 362 { 358 363 return insertCopyWorker(a_idx, a_rThat, true /*a_fReplace*/); … … 365 370 * @param a_idx The array index. 366 371 */ 367 inline ElementType *at(size_t a_idx) 372 inline ElementType *at(size_t a_idx) RT_NOEXCEPT 368 373 { 369 374 if (a_idx < m_cElements) … … 378 383 * @param a_idx The array index. 379 384 */ 380 inline ElementType const *at(size_t a_idx) const 385 inline ElementType const *at(size_t a_idx) const RT_NOEXCEPT 381 386 { 382 387 if (a_idx < m_cElements) … … 389 394 * @returns The first object, NULL if empty. 390 395 */ 391 inline ElementType *first() 396 inline ElementType *first() RT_NOEXCEPT 392 397 { 393 398 return at(0); … … 398 403 * @returns The first object, NULL if empty. 399 404 */ 400 inline ElementType const *first() const 405 inline ElementType const *first() const RT_NOEXCEPT 401 406 { 402 407 return at(0); … … 407 412 * @returns The last object, NULL if empty. 408 413 */ 409 inline ElementType *last() 414 inline ElementType *last() RT_NOEXCEPT 410 415 { 411 416 return at(m_cElements - 1); … … 416 421 * @returns The last object, NULL if empty. 417 422 */ 418 inline ElementType const *last() const 423 inline ElementType const *last() const RT_NOEXCEPT 419 424 { 420 425 return at(m_cElements - 1); … … 423 428 424 429 protected: 425 virtual RTCRestArrayBase *createClone(void) const RT_ OVERRIDE430 virtual RTCRestArrayBase *createClone(void) const RT_NOEXCEPT RT_OVERRIDE 426 431 { 427 432 return new (std::nothrow) RTCRestArray(); 428 433 } 429 434 430 virtual RTCRestObjectBase *createValue(void) RT_ OVERRIDE435 virtual RTCRestObjectBase *createValue(void) RT_NOEXCEPT RT_OVERRIDE 431 436 { 432 437 return new (std::nothrow) ElementType(); 433 438 } 434 439 435 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_ OVERRIDE440 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT RT_OVERRIDE 436 441 { 437 442 return ElementType::deserializeInstanceFromJson(a_rCursor, a_ppInstance); -
trunk/include/iprt/cpp/restbase.h
r74414 r74425 61 61 RTCRestJsonPrimaryCursor *m_pPrimary; 62 62 63 RTCRestJsonCursor(struct RTCRestJsonCursor const &a_rParent) 63 RTCRestJsonCursor(struct RTCRestJsonCursor const &a_rParent) RT_NOEXCEPT 64 64 : m_hValue(NIL_RTJSONVAL), m_pszName(NULL), m_pParent(&a_rParent), m_pPrimary(a_rParent.m_pPrimary) 65 65 { } 66 66 67 RTCRestJsonCursor(RTJSONVAL hValue, const char *pszName, struct RTCRestJsonCursor *pParent) 67 RTCRestJsonCursor(RTJSONVAL hValue, const char *pszName, struct RTCRestJsonCursor *pParent) RT_NOEXCEPT 68 68 : m_hValue(hValue), m_pszName(pszName), m_pParent(pParent), m_pPrimary(pParent->m_pPrimary) 69 69 { } 70 70 71 RTCRestJsonCursor(RTJSONVAL hValue, const char *pszName) 71 RTCRestJsonCursor(RTJSONVAL hValue, const char *pszName) RT_NOEXCEPT 72 72 : m_hValue(hValue), m_pszName(pszName), m_pParent(NULL), m_pPrimary(NULL) 73 73 { } … … 96 96 97 97 /** Creates a primary json cursor with optiona error info. */ 98 RTCRestJsonPrimaryCursor(RTJSONVAL hValue, const char *pszName, PRTERRINFO pErrInfo = NULL) 98 RTCRestJsonPrimaryCursor(RTJSONVAL hValue, const char *pszName, PRTERRINFO pErrInfo = NULL) RT_NOEXCEPT 99 99 : m_Cursor(hValue, pszName) 100 100 , m_pErrInfo(pErrInfo) … … 115 115 * @param ... Format string arguments. 116 116 */ 117 virtual int addError(RTCRestJsonCursor const &a_rCursor, int a_rc, const char *a_pszFormat, ...) ;117 virtual int addError(RTCRestJsonCursor const &a_rCursor, int a_rc, const char *a_pszFormat, ...) RT_NOEXCEPT; 118 118 119 119 /** … … 123 123 * @param a_rCursor The cursor for the field. 124 124 */ 125 virtual int unknownField(RTCRestJsonCursor const &a_rCursor) ;125 virtual int unknownField(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT; 126 126 127 127 /** … … 133 133 * @param a_cbDst Size of the destination buffer. 134 134 */ 135 virtual char *getPath(RTCRestJsonCursor const &a_rCursor, char *a_pszDst, size_t a_cbDst) const ;135 virtual char *getPath(RTCRestJsonCursor const &a_rCursor, char *a_pszDst, size_t a_cbDst) const RT_NOEXCEPT; 136 136 }; 137 137 … … 146 146 { 147 147 public: 148 RTCRestObjectBase() ;149 RTCRestObjectBase(RTCRestObjectBase const &a_rThat) ;148 RTCRestObjectBase() RT_NOEXCEPT; 149 RTCRestObjectBase(RTCRestObjectBase const &a_rThat) RT_NOEXCEPT; 150 150 virtual ~RTCRestObjectBase(); 151 151 … … 155 155 * @returns Pointer to copy. 156 156 */ 157 virtual RTCRestObjectBase *baseClone() const = 0;157 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT = 0; 158 158 159 159 /** … … 161 161 * @returns true if null, false if not. 162 162 */ 163 inline bool isNull(void) const { return m_fNullIndicator; };163 inline bool isNull(void) const RT_NOEXCEPT { return m_fNullIndicator; }; 164 164 165 165 /** … … 167 167 * @returns IPRT status code (from resetToDefault). 168 168 */ 169 virtual int setNull(void) ;169 virtual int setNull(void) RT_NOEXCEPT; 170 170 171 171 /** … … 173 173 * @remarks Only really important for strings. 174 174 */ 175 virtual void setNotNull(void) ;175 virtual void setNotNull(void) RT_NOEXCEPT; 176 176 177 177 /** … … 179 179 * @returns IPRT status code. 180 180 */ 181 virtual int resetToDefault() = 0;181 virtual int resetToDefault() RT_NOEXCEPT = 0; 182 182 183 183 /** … … 187 187 * @param a_rDst The destination for the serialization. 188 188 */ 189 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const = 0;189 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT = 0; 190 190 191 191 /** … … 195 195 * @param a_rCursor The JSON cursor. 196 196 */ 197 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) = 0;197 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT = 0; 198 198 199 199 /** … … 242 242 * @param a_fFlags kCollectionFormat_xxx. 243 243 */ 244 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const ;244 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_NOEXCEPT; 245 245 246 246 /** … … 263 263 */ 264 264 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 265 uint32_t a_fFlags = kCollectionFormat_Unspecified) ;265 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT; 266 266 267 267 /** Type classification */ … … 288 288 * Returns the object type class. 289 289 */ 290 virtual kTypeClass typeClass(void) const = 0;290 virtual kTypeClass typeClass(void) const RT_NOEXCEPT = 0; 291 291 292 292 /** 293 293 * Returns the object type name. 294 294 */ 295 virtual const char *typeName(void) const = 0;295 virtual const char *typeName(void) const RT_NOEXCEPT = 0; 296 296 297 297 protected: … … 314 314 public: 315 315 /** Default constructor. */ 316 RTCRestBool() ;316 RTCRestBool() RT_NOEXCEPT; 317 317 /** Copy constructor. */ 318 RTCRestBool(RTCRestBool const &a_rThat) ;318 RTCRestBool(RTCRestBool const &a_rThat) RT_NOEXCEPT; 319 319 /** From value constructor. */ 320 RTCRestBool(bool fValue) ;320 RTCRestBool(bool fValue) RT_NOEXCEPT; 321 321 /** Destructor. */ 322 322 virtual ~RTCRestBool(); 323 323 /** Copy assignment operator. */ 324 RTCRestBool &operator=(RTCRestBool const &a_rThat) ;325 /** Safe copy assignment method. */ 326 int assignCopy(RTCRestBool const &a_rThat) ;324 RTCRestBool &operator=(RTCRestBool const &a_rThat) RT_NOEXCEPT; 325 /** Safe copy assignment method. */ 326 int assignCopy(RTCRestBool const &a_rThat) RT_NOEXCEPT; 327 327 /** Assign value and clear null indicator. */ 328 void assignValue(bool a_fValue) ;328 void assignValue(bool a_fValue) RT_NOEXCEPT; 329 329 /** Make a clone of this object. */ 330 inline RTCRestBool *clone() const { return (RTCRestBool *)baseClone(); }330 inline RTCRestBool *clone() const RT_NOEXCEPT { return (RTCRestBool *)baseClone(); } 331 331 332 332 /* Overridden methods: */ 333 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;334 virtual int resetToDefault() RT_ OVERRIDE;335 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;336 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;337 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_ OVERRIDE;333 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 334 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 335 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 336 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 337 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_NOEXCEPT RT_OVERRIDE; 338 338 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 339 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;340 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;341 virtual const char *typeName(void) const RT_ OVERRIDE;339 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 340 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 341 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 342 342 343 343 /** Factory method. */ 344 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;345 /** Deserialization w/ instantiation.*/346 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;344 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 345 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 346 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 347 347 348 348 public: … … 359 359 public: 360 360 /** Default constructor. */ 361 RTCRestInt64() ;361 RTCRestInt64() RT_NOEXCEPT; 362 362 /** Copy constructor. */ 363 RTCRestInt64(RTCRestInt64 const &a_rThat) ;363 RTCRestInt64(RTCRestInt64 const &a_rThat) RT_NOEXCEPT; 364 364 /** From value constructor. */ 365 RTCRestInt64(int64_t a_iValue) ;365 RTCRestInt64(int64_t a_iValue) RT_NOEXCEPT; 366 366 /** Destructor. */ 367 367 virtual ~RTCRestInt64(); 368 368 /** Copy assignment operator. */ 369 RTCRestInt64 &operator=(RTCRestInt64 const &a_rThat) ;370 /** Safe copy assignment method. */ 371 int assignCopy(RTCRestInt64 const &a_rThat) ;369 RTCRestInt64 &operator=(RTCRestInt64 const &a_rThat) RT_NOEXCEPT; 370 /** Safe copy assignment method. */ 371 int assignCopy(RTCRestInt64 const &a_rThat) RT_NOEXCEPT; 372 372 /** Assign value and clear null indicator. */ 373 void assignValue(int64_t a_iValue) ;373 void assignValue(int64_t a_iValue) RT_NOEXCEPT; 374 374 /** Make a clone of this object. */ 375 inline RTCRestInt64 *clone() const { return (RTCRestInt64 *)baseClone(); }375 inline RTCRestInt64 *clone() const RT_NOEXCEPT { return (RTCRestInt64 *)baseClone(); } 376 376 377 377 /* Overridden methods: */ 378 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;379 virtual int resetToDefault() RT_ OVERRIDE;380 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;381 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;382 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_ OVERRIDE;378 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 379 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 380 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 381 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 382 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_NOEXCEPT RT_OVERRIDE; 383 383 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 384 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;385 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;386 virtual const char *typeName(void) const RT_ OVERRIDE;384 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 385 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 386 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 387 387 388 388 /** Factory method. */ 389 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;390 /** Deserialization w/ instantiation.*/391 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;389 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 390 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 391 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 392 392 393 393 public: … … 404 404 public: 405 405 /** Default constructor. */ 406 RTCRestInt32() ;406 RTCRestInt32() RT_NOEXCEPT; 407 407 /** Copy constructor. */ 408 RTCRestInt32(RTCRestInt32 const &a_rThat) ;408 RTCRestInt32(RTCRestInt32 const &a_rThat) RT_NOEXCEPT; 409 409 /** From value constructor. */ 410 RTCRestInt32(int32_t iValue) ;410 RTCRestInt32(int32_t iValue) RT_NOEXCEPT; 411 411 /** Destructor. */ 412 virtual ~RTCRestInt32() ;412 virtual ~RTCRestInt32() RT_NOEXCEPT; 413 413 /** Copy assignment operator. */ 414 RTCRestInt32 &operator=(RTCRestInt32 const &a_rThat) ;415 /** Safe copy assignment method. */ 416 int assignCopy(RTCRestInt32 const &a_rThat) ;414 RTCRestInt32 &operator=(RTCRestInt32 const &a_rThat) RT_NOEXCEPT; 415 /** Safe copy assignment method. */ 416 int assignCopy(RTCRestInt32 const &a_rThat) RT_NOEXCEPT; 417 417 /** Assign value and clear null indicator. */ 418 void assignValue(int32_t a_iValue) ;418 void assignValue(int32_t a_iValue) RT_NOEXCEPT; 419 419 /** Make a clone of this object. */ 420 420 inline RTCRestInt32 *clone() const { return (RTCRestInt32 *)baseClone(); } 421 421 422 422 /* Overridden methods: */ 423 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;424 virtual int resetToDefault() RT_ OVERRIDE;425 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;426 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;427 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_ OVERRIDE;423 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 424 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 425 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 426 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 427 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_NOEXCEPT RT_OVERRIDE; 428 428 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 429 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;430 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;431 virtual const char *typeName(void) const RT_ OVERRIDE;429 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 430 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 431 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 432 432 433 433 /** Factory method. */ 434 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;435 /** Deserialization w/ instantiation.*/436 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;434 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 435 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 436 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 437 437 438 438 public: … … 449 449 public: 450 450 /** Default constructor. */ 451 RTCRestInt16() ;451 RTCRestInt16() RT_NOEXCEPT; 452 452 /** Copy constructor. */ 453 RTCRestInt16(RTCRestInt16 const &a_rThat) ;453 RTCRestInt16(RTCRestInt16 const &a_rThat) RT_NOEXCEPT; 454 454 /** From value constructor. */ 455 RTCRestInt16(int16_t iValue) ;455 RTCRestInt16(int16_t iValue) RT_NOEXCEPT; 456 456 /** Destructor. */ 457 457 virtual ~RTCRestInt16(); 458 458 /** Copy assignment operator. */ 459 RTCRestInt16 &operator=(RTCRestInt16 const &a_rThat) ;460 /** Safe copy assignment method. */ 461 int assignCopy(RTCRestInt16 const &a_rThat) ;459 RTCRestInt16 &operator=(RTCRestInt16 const &a_rThat) RT_NOEXCEPT; 460 /** Safe copy assignment method. */ 461 int assignCopy(RTCRestInt16 const &a_rThat) RT_NOEXCEPT; 462 462 /** Assign value and clear null indicator. */ 463 void assignValue(int16_t a_iValue) ;463 void assignValue(int16_t a_iValue) RT_NOEXCEPT; 464 464 /** Make a clone of this object. */ 465 inline RTCRestInt16 *clone() const { return (RTCRestInt16 *)baseClone(); }465 inline RTCRestInt16 *clone() const RT_NOEXCEPT { return (RTCRestInt16 *)baseClone(); } 466 466 467 467 /* Overridden methods: */ 468 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;469 virtual int resetToDefault() RT_ OVERRIDE;470 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;471 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;472 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_ OVERRIDE;468 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 469 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 470 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 471 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 472 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_NOEXCEPT RT_OVERRIDE; 473 473 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 474 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;475 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;476 virtual const char *typeName(void) const RT_ OVERRIDE;474 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 475 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 476 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 477 477 478 478 /** Factory method. */ 479 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;480 /** Deserialization w/ instantiation.*/481 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;479 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 480 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 481 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 482 482 483 483 public: … … 494 494 public: 495 495 /** Default constructor. */ 496 RTCRestDouble() ;496 RTCRestDouble() RT_NOEXCEPT; 497 497 /** Copy constructor. */ 498 RTCRestDouble(RTCRestDouble const &a_rThat) ;498 RTCRestDouble(RTCRestDouble const &a_rThat) RT_NOEXCEPT; 499 499 /** From value constructor. */ 500 RTCRestDouble(double rdValue) ;500 RTCRestDouble(double rdValue) RT_NOEXCEPT; 501 501 /** Destructor. */ 502 502 virtual ~RTCRestDouble(); 503 503 /** Copy assignment operator. */ 504 RTCRestDouble &operator=(RTCRestDouble const &a_rThat) ;505 /** Safe copy assignment method. */ 506 int assignCopy(RTCRestDouble const &a_rThat) ;504 RTCRestDouble &operator=(RTCRestDouble const &a_rThat) RT_NOEXCEPT; 505 /** Safe copy assignment method. */ 506 int assignCopy(RTCRestDouble const &a_rThat) RT_NOEXCEPT; 507 507 /** Assign value and clear null indicator. */ 508 void assignValue(double a_rdValue) ;508 void assignValue(double a_rdValue) RT_NOEXCEPT; 509 509 /** Make a clone of this object. */ 510 inline RTCRestDouble *clone() const { return (RTCRestDouble *)baseClone(); }510 inline RTCRestDouble *clone() const RT_NOEXCEPT { return (RTCRestDouble *)baseClone(); } 511 511 512 512 /* Overridden methods: */ 513 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;514 virtual int resetToDefault() RT_ OVERRIDE;515 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;516 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;517 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_ OVERRIDE;513 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 514 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 515 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 516 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 517 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_NOEXCEPT RT_OVERRIDE; 518 518 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 519 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;520 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;521 virtual const char *typeName(void) const RT_ OVERRIDE;519 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 520 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 521 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 522 522 523 523 /** Factory method. */ 524 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;525 /** Deserialization w/ instantiation.*/526 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;524 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 525 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 526 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 527 527 528 528 public: … … 539 539 public: 540 540 /** Default constructor. */ 541 RTCRestString() ;541 RTCRestString() RT_NOEXCEPT; 542 542 /** Destructor. */ 543 543 virtual ~RTCRestString(); … … 550 550 RTCRestString(const char *a_pszSrc); 551 551 /** Safe copy assignment method. */ 552 int assignCopy(RTCRestString const &a_rThat) ;553 /** Safe copy assignment method. */ 554 int assignCopy(RTCString const &a_rThat) ;555 /** Safe copy assignment method. */ 556 int assignCopy(const char *a_pszThat) ;552 int assignCopy(RTCRestString const &a_rThat) RT_NOEXCEPT; 553 /** Safe copy assignment method. */ 554 int assignCopy(RTCString const &a_rThat) RT_NOEXCEPT; 555 /** Safe copy assignment method. */ 556 int assignCopy(const char *a_pszThat) RT_NOEXCEPT; 557 557 /** Make a clone of this object. */ 558 inline RTCRestString *clone() const { return (RTCRestString *)baseClone(); }558 inline RTCRestString *clone() const RT_NOEXCEPT { return (RTCRestString *)baseClone(); } 559 559 560 560 /* Overridden methods: */ 561 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;562 virtual int setNull(void) RT_ OVERRIDE; /* (ambigious, so overrider it to make sure.) */563 virtual int resetToDefault() RT_ OVERRIDE;564 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;565 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;566 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_ OVERRIDE;561 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 562 virtual int setNull(void) RT_NOEXCEPT RT_OVERRIDE; /* (ambigious, so overrider it to make sure.) */ 563 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 564 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 565 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 566 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_NOEXCEPT RT_OVERRIDE; 567 567 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 568 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;569 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;570 virtual const char *typeName(void) const RT_ OVERRIDE;568 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 569 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 570 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 571 571 572 572 /** Factory method. */ 573 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;574 /** Deserialization w/ instantiation.*/575 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;573 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 574 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 575 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 576 576 577 577 /** @name RTCString assignment methods we need to replace to manage the null indicator … … 615 615 /** Default constructor. 616 616 * @note The result is a null-object. */ 617 RTCRestDate() ;617 RTCRestDate() RT_NOEXCEPT; 618 618 /** Copy constructor. */ 619 619 RTCRestDate(RTCRestDate const &a_rThat); … … 623 623 RTCRestDate &operator=(RTCRestDate const &a_rThat); 624 624 /** Safe copy assignment method. */ 625 int assignCopy(RTCRestDate const &a_rThat) ;625 int assignCopy(RTCRestDate const &a_rThat) RT_NOEXCEPT; 626 626 /** Make a clone of this object. */ 627 inline RTCRestDate *clone() const { return (RTCRestDate *)baseClone(); }627 inline RTCRestDate *clone() const RT_NOEXCEPT{ return (RTCRestDate *)baseClone(); } 628 628 629 629 /* Overridden methods: */ 630 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;631 virtual int resetToDefault() RT_ OVERRIDE;632 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;633 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;634 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_ OVERRIDE;630 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 631 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 632 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 633 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 634 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = 0) const RT_NOEXCEPT RT_OVERRIDE; 635 635 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 636 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;637 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;638 virtual const char *typeName(void) const RT_ OVERRIDE;636 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 637 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 638 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 639 639 640 640 /** Factory method. */ 641 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;642 /** Deserialization w/ instantiation.*/643 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;641 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 642 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 643 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 644 644 645 645 /** Date formats. */ … … 664 664 * @param a_enmFormat The date format to use when formatting it. 665 665 */ 666 int assignValue(PCRTTIMESPEC a_pTimeSpec, kFormat a_enmFormat) ;667 int assignValueRfc2822(PCRTTIMESPEC a_pTimeSpec) ; /**< Convenience method for email/whatnot. */668 int assignValueRfc7131(PCRTTIMESPEC a_pTimeSpec) ; /**< Convenience method for HTTP date. */669 int assignValueRfc3339(PCRTTIMESPEC a_pTimeSpec) ; /**< Convenience method for ISO-8601 timstamp. */666 int assignValue(PCRTTIMESPEC a_pTimeSpec, kFormat a_enmFormat) RT_NOEXCEPT; 667 int assignValueRfc2822(PCRTTIMESPEC a_pTimeSpec) RT_NOEXCEPT; /**< Convenience method for email/whatnot. */ 668 int assignValueRfc7131(PCRTTIMESPEC a_pTimeSpec) RT_NOEXCEPT; /**< Convenience method for HTTP date. */ 669 int assignValueRfc3339(PCRTTIMESPEC a_pTimeSpec) RT_NOEXCEPT; /**< Convenience method for ISO-8601 timstamp. */ 670 670 671 671 /** … … 676 676 * @param a_enmFormat The date format to use when formatting it. 677 677 */ 678 int assignNow(kFormat a_enmFormat) ;679 int assignNowRfc2822() ; /**< Convenience method for email/whatnot. */680 int assignNowRfc7131() ; /**< Convenience method for HTTP date. */681 int assignNowRfc3339() ; /**< Convenience method for ISO-8601 timstamp. */678 int assignNow(kFormat a_enmFormat) RT_NOEXCEPT; 679 int assignNowRfc2822() RT_NOEXCEPT; /**< Convenience method for email/whatnot. */ 680 int assignNowRfc7131() RT_NOEXCEPT; /**< Convenience method for HTTP date. */ 681 int assignNowRfc3339() RT_NOEXCEPT; /**< Convenience method for ISO-8601 timstamp. */ 682 682 683 683 /** … … 688 688 * @param a_enmFormat The date format to try/set. 689 689 */ 690 int setFormat(kFormat a_enmFormat) ;690 int setFormat(kFormat a_enmFormat) RT_NOEXCEPT; 691 691 692 692 /** Check if the value is okay (m_TimeSpec & m_Exploded). */ 693 inline bool isOkay() const 693 inline bool isOkay() const RT_NOEXCEPT { return m_fTimeSpecOkay; } 694 694 /** Get the timespec value. */ 695 inline RTTIMESPEC const &getTimeSpec() const 695 inline RTTIMESPEC const &getTimeSpec() const RT_NOEXCEPT { return m_TimeSpec; } 696 696 /** Get the exploded time. */ 697 inline RTTIME const &getExploded() const 697 inline RTTIME const &getExploded() const RT_NOEXCEPT { return m_Exploded; } 698 698 /** Gets the format. */ 699 inline kFormat getFormat() const 699 inline kFormat getFormat() const RT_NOEXCEPT { return m_enmFormat; } 700 700 /** Get the formatted/raw string value. */ 701 inline RTCString const &getString() const 701 inline RTCString const &getString() const RT_NOEXCEPT { return m_strFormatted; } 702 702 703 703 /** Get nanoseconds since unix epoch. */ 704 inline int64_t getEpochNano() const 704 inline int64_t getEpochNano() const RT_NOEXCEPT { return RTTimeSpecGetNano(&m_TimeSpec); } 705 705 /** Get seconds since unix epoch. */ 706 inline int64_t getEpochSeconds() const 706 inline int64_t getEpochSeconds() const RT_NOEXCEPT { return RTTimeSpecGetSeconds(&m_TimeSpec); } 707 707 /** Checks if UTC time. */ 708 inline bool isUtc() const 708 inline bool isUtc() const RT_NOEXCEPT { return (m_Exploded.fFlags & RTTIME_FLAGS_TYPE_MASK) != RTTIME_FLAGS_TYPE_LOCAL; } 709 709 /** Checks if local time. */ 710 inline bool isLocal() const 710 inline bool isLocal() const RT_NOEXCEPT { return (m_Exploded.fFlags & RTTIME_FLAGS_TYPE_MASK) == RTTIME_FLAGS_TYPE_LOCAL; } 711 711 712 712 protected: … … 732 732 * @param a_enmFormat The format to use. 733 733 */ 734 int explodeAndFormat(kFormat a_enmFormat) ;734 int explodeAndFormat(kFormat a_enmFormat) RT_NOEXCEPT; 735 735 736 736 /** … … 742 742 * @param a_enmFormat The format to use. 743 743 */ 744 int format(kFormat a_enmFormat) ;744 int format(kFormat a_enmFormat) RT_NOEXCEPT; 745 745 746 746 /** … … 752 752 * @param enmFormat Specific format to try, kFormat_Invalid (default) to try guess it. 753 753 */ 754 int decodeFormattedString(kFormat enmFormat = kFormat_Invalid) ;754 int decodeFormattedString(kFormat enmFormat = kFormat_Invalid) RT_NOEXCEPT; 755 755 }; 756 756 … … 775 775 776 776 /** Default constructor. */ 777 RTCRestStringEnumBase() ;777 RTCRestStringEnumBase() RT_NOEXCEPT; 778 778 /** Destructor. */ 779 779 virtual ~RTCRestStringEnumBase(); … … 785 785 786 786 /** Safe copy assignment method. */ 787 int assignCopy(RTCRestStringEnumBase const &a_rThat) ;788 /** Safe copy assignment method. */ 789 inline int assignCopy(RTCString const &a_rThat) { return setByString(a_rThat); }790 /** Safe copy assignment method. */ 791 inline int assignCopy(const char *a_pszThat) { return setByString(a_pszThat); }787 int assignCopy(RTCRestStringEnumBase const &a_rThat) RT_NOEXCEPT; 788 /** Safe copy assignment method. */ 789 inline int assignCopy(RTCString const &a_rThat) RT_NOEXCEPT { return setByString(a_rThat); } 790 /** Safe copy assignment method. */ 791 inline int assignCopy(const char *a_pszThat) RT_NOEXCEPT { return setByString(a_pszThat); } 792 792 793 793 /* Overridden methods: */ 794 virtual int resetToDefault() RT_ OVERRIDE;795 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;796 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;797 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_ OVERRIDE;794 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 795 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 796 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 797 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_NOEXCEPT RT_OVERRIDE; 798 798 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 799 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;800 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;799 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 800 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 801 801 802 802 /** … … 809 809 * @param a_cchValue The string value length. Optional. 810 810 */ 811 int setByString(const char *a_pszValue, size_t a_cchValue = RTSTR_MAX) ;811 int setByString(const char *a_pszValue, size_t a_cchValue = RTSTR_MAX) RT_NOEXCEPT; 812 812 813 813 /** … … 819 819 * @param a_rValue The string value. 820 820 */ 821 int setByString(RTCString const &a_rValue) ;821 int setByString(RTCString const &a_rValue) RT_NOEXCEPT; 822 822 823 823 /** 824 824 * Gets the string value. 825 825 */ 826 const char *getString() const ;826 const char *getString() const RT_NOEXCEPT; 827 827 828 828 /** Maps the given string value to an enum. */ 829 int stringToEnum(const char *a_pszValue, size_t a_cchValue = RTSTR_MAX) ;829 int stringToEnum(const char *a_pszValue, size_t a_cchValue = RTSTR_MAX) RT_NOEXCEPT; 830 830 /** Maps the given string value to an enum. */ 831 int stringToEnum(RTCString const &a_rStrValue) ;831 int stringToEnum(RTCString const &a_rStrValue) RT_NOEXCEPT; 832 832 /** Maps the given string value to an enum. */ 833 const char *enumToString(int a_iEnumValue, size_t *a_pcchString) ;833 const char *enumToString(int a_iEnumValue, size_t *a_pcchString) RT_NOEXCEPT; 834 834 835 835 … … 847 847 * @param a_iEnumValue The enum value to set. 848 848 */ 849 bool setWorker(int a_iEnumValue) ;849 bool setWorker(int a_iEnumValue) RT_NOEXCEPT; 850 850 851 851 /** Helper for implementing RTCRestObjectBase::clone(). */ 852 RTCRestObjectBase *cloneWorker(RTCRestStringEnumBase *a_pDst) const ;852 RTCRestObjectBase *cloneWorker(RTCRestStringEnumBase *a_pDst) const RT_NOEXCEPT; 853 853 854 854 /** … … 858 858 * @param pcEntries Where to return the translation table size. 859 859 */ 860 virtual ENUMMAPENTRY const *getMappingTable(size_t *pcEntries) const = 0;860 virtual ENUMMAPENTRY const *getMappingTable(size_t *pcEntries) const RT_NOEXCEPT = 0; 861 861 }; 862 862 … … 874 874 875 875 /** Default constructor */ 876 RTCRestStringEnum() : RTCRestStringEnumBase() { }876 RTCRestStringEnum() RT_NOEXCEPT : RTCRestStringEnumBase() { } 877 877 /** Constructor with initial enum value. */ 878 RTCRestStringEnum(Type a_enmValue) : RTCRestStringEnumBase() { set(a_enmValue); }878 RTCRestStringEnum(Type a_enmValue) RT_NOEXCEPT : RTCRestStringEnumBase() { set(a_enmValue); } 879 879 /** Constructor with string default. */ 880 880 RTCRestStringEnum(const char *a_pszDefault) : RTCRestStringEnumBase() { setByString(a_pszDefault); } … … 882 882 RTCRestStringEnum(RTCRestStringEnum const &a_rThat) : RTCRestStringEnumBase(a_rThat) { } 883 883 /** Make a clone of this object. */ 884 inline RTCRestStringEnum *clone() const { return (RTCRestStringEnum *)baseClone(); } 885 886 virtual RTCRestObjectBase *baseClone() const RT_OVERRIDE { return cloneWorker(new (std::nothrow) RTCRestStringEnum()); } 884 inline RTCRestStringEnum *clone() const RT_NOEXCEPT { return (RTCRestStringEnum *)baseClone(); } 885 886 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE 887 { 888 return cloneWorker(new (std::nothrow) RTCRestStringEnum()); 889 } 887 890 888 891 /** … … 892 895 * no value has been assigned yet. 893 896 */ 894 Type get() const { return (Type)m_iEnumValue; }897 Type get() const RT_NOEXCEPT { return (Type)m_iEnumValue; } 895 898 896 899 /** … … 900 903 * @param a_enmType The new value. 901 904 */ 902 bool set(Type a_enmType) { return setWorker((int)a_enmType); }903 904 virtual const char *typeName(void) const RT_ OVERRIDE { return "RTCRestStringEnum<EnumType>"; }905 bool set(Type a_enmType) RT_NOEXCEPT { return setWorker((int)a_enmType); } 906 907 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE { return "RTCRestStringEnum<EnumType>"; } 905 908 906 909 /** Factory method. */ 907 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) 910 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT 908 911 { 909 912 return new (std::nothrow) RTCRestStringEnum(); … … 911 914 912 915 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 913 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) 916 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT 914 917 { 915 918 *a_ppInstance = new (std::nothrow) RTCRestStringEnum(); … … 925 928 static const size_t s_cMappingTable; 926 929 927 virtual ENUMMAPENTRY const *getMappingTable(size_t *pcEntries) const RT_ OVERRIDE930 virtual ENUMMAPENTRY const *getMappingTable(size_t *pcEntries) const RT_NOEXCEPT RT_OVERRIDE 928 931 { 929 932 *pcEntries = s_cMappingTable; … … 943 946 public: 944 947 /** Default constructor. */ 945 RTCRestBinary() ;948 RTCRestBinary() RT_NOEXCEPT; 946 949 /** Destructor. */ 947 950 virtual ~RTCRestBinary(); 948 951 949 952 /** Safe copy assignment method. */ 950 virtual int assignCopy(RTCRestBinary const &a_rThat) ;953 virtual int assignCopy(RTCRestBinary const &a_rThat) RT_NOEXCEPT; 951 954 /** Safe buffer copy method. */ 952 virtual int assignCopy(void const *a_pvData, size_t a_cbData) ;955 virtual int assignCopy(void const *a_pvData, size_t a_cbData) RT_NOEXCEPT; 953 956 954 957 /** Use the specified data buffer directly. */ 955 virtual int assignReadOnly(void const *a_pvData, size_t a_cbData) ;958 virtual int assignReadOnly(void const *a_pvData, size_t a_cbData) RT_NOEXCEPT; 956 959 /** Use the specified data buffer directly. */ 957 virtual int assignWriteable(void *a_pvBuf, size_t a_cbBuf) ;960 virtual int assignWriteable(void *a_pvBuf, size_t a_cbBuf) RT_NOEXCEPT; 958 961 /** Frees the data held by the object and resets it default state. */ 959 virtual void freeData() ;962 virtual void freeData() RT_NOEXCEPT; 960 963 961 964 /** Returns a pointer to the data blob. */ 962 inline const uint8_t *getPtr() const { return m_pbData; }965 inline const uint8_t *getPtr() const RT_NOEXCEPT { return m_pbData; } 963 966 /** Gets the size of the data. */ 964 inline size_t getSize() const { return m_cbData; }967 inline size_t getSize() const RT_NOEXCEPT { return m_cbData; } 965 968 966 969 /** Make a clone of this object. */ 967 inline RTCRestBinary *clone() const { return (RTCRestBinary *)baseClone(); }970 inline RTCRestBinary *clone() const RT_NOEXCEPT { return (RTCRestBinary *)baseClone(); } 968 971 969 972 /* Overridden methods: */ 970 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;971 virtual int setNull(void) RT_ OVERRIDE;972 virtual int resetToDefault(void) RT_ OVERRIDE;973 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;974 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;975 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_ OVERRIDE;973 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 974 virtual int setNull(void) RT_NOEXCEPT RT_OVERRIDE; 975 virtual int resetToDefault(void) RT_NOEXCEPT RT_OVERRIDE; 976 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 977 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 978 virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_NOEXCEPT RT_OVERRIDE; 976 979 virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 977 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;978 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;979 virtual const char *typeName(void) const RT_ OVERRIDE;980 uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 981 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 982 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 980 983 981 984 /** Factory method. */ 982 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;983 /** Deserialization w/ instantiation.*/984 static FNDESERIALIZEINSTANCEFROMJSON deserializeInstanceFromJson;985 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 986 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 987 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT; 985 988 986 989 protected: … … 1009 1012 { 1010 1013 public: 1011 RTCRestDataObject() ;1012 RTCRestDataObject(RTCRestDataObject const &a_rThat) ;1014 RTCRestDataObject() RT_NOEXCEPT; 1015 RTCRestDataObject(RTCRestDataObject const &a_rThat) RT_NOEXCEPT; 1013 1016 virtual ~RTCRestDataObject(); 1014 1017 1015 1018 /* Overridden methods:*/ 1016 virtual int resetToDefault() RT_ OVERRIDE;1017 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;1018 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;1019 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;1019 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 1020 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 1021 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 1022 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 1020 1023 1021 1024 /** … … 1025 1028 * @param a_rDst The destination for the serialization. 1026 1029 */ 1027 virtual RTCRestOutputBase &serializeMembersAsJson(RTCRestOutputBase &a_rDst) const ;1030 virtual RTCRestOutputBase &serializeMembersAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT; 1028 1031 1029 1032 /** … … 1037 1040 * @param a_cchName The length of a_rCursor.m_pszName. 1038 1041 */ 1039 virtual int deserializeMemberFromJson(RTCRestJsonCursor const &a_rCursor, size_t a_cchName) ;1042 virtual int deserializeMemberFromJson(RTCRestJsonCursor const &a_rCursor, size_t a_cchName) RT_NOEXCEPT; 1040 1043 1041 1044 protected: … … 1044 1047 1045 1048 /** Copy assignment operator. */ 1046 RTCRestDataObject &operator=(RTCRestDataObject const &a_rThat) ;1047 1048 /** Safe copy assignment method. */ 1049 virtual int assignCopy(RTCRestDataObject const &a_rThat) ;1049 RTCRestDataObject &operator=(RTCRestDataObject const &a_rThat) RT_NOEXCEPT; 1050 1051 /** Safe copy assignment method. */ 1052 virtual int assignCopy(RTCRestDataObject const &a_rThat) RT_NOEXCEPT; 1050 1053 }; 1051 1054 … … 1057 1060 { 1058 1061 public: 1059 RTCRestPolyDataObject() ;1060 RTCRestPolyDataObject(RTCRestPolyDataObject const &a_rThat) ;1062 RTCRestPolyDataObject() RT_NOEXCEPT; 1063 RTCRestPolyDataObject(RTCRestPolyDataObject const &a_rThat) RT_NOEXCEPT; 1061 1064 virtual ~RTCRestPolyDataObject(); 1062 1065 1063 1066 /* Overridden methods:*/ 1064 virtual int resetToDefault() RT_ OVERRIDE;1067 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 1065 1068 1066 1069 /** Checks if the instance is of a child class (@c true) or of the parent (@c false). */ 1067 virtual bool isChild() const ;1070 virtual bool isChild() const RT_NOEXCEPT; 1068 1071 1069 1072 protected: 1070 1073 1071 1074 /** Copy assignment operator. */ 1072 RTCRestPolyDataObject &operator=(RTCRestPolyDataObject const &a_rThat) ;1075 RTCRestPolyDataObject &operator=(RTCRestPolyDataObject const &a_rThat) RT_NOEXCEPT; 1073 1076 }; 1074 1077 -
trunk/include/iprt/cpp/restclient.h
r74414 r74425 46 46 public: 47 47 /** Default constructor. */ 48 RTCRestBinaryParameter() ;48 RTCRestBinaryParameter() RT_NOEXCEPT; 49 49 50 50 /** Safe copy assignment method. */ 51 virtual int assignCopy(RTCRestBinaryParameter const &a_rThat) ;51 virtual int assignCopy(RTCRestBinaryParameter const &a_rThat) RT_NOEXCEPT; 52 52 /** Safe copy assignment method. 53 53 * @note Resets callbacks and ASSUMES that @a a_cbData is the content length. */ 54 virtual int assignCopy(RTCRestBinary const &a_rThat) RT_ OVERRIDE;54 virtual int assignCopy(RTCRestBinary const &a_rThat) RT_NOEXCEPT RT_OVERRIDE; 55 55 /** Safe copy assignment method. 56 56 * @note Resets callbacks and ASSUMES that @a a_cbData is the content length. */ 57 virtual int assignCopy(void const *a_pvData, size_t a_cbData) RT_ OVERRIDE;57 virtual int assignCopy(void const *a_pvData, size_t a_cbData) RT_NOEXCEPT RT_OVERRIDE; 58 58 59 59 /** 60 60 * Use the specified data buffer directly. 61 61 * @note Resets callbacks and ASSUMES that @a a_cbData is the content length. */ 62 virtual int assignReadOnly(void const *a_pvData, size_t a_cbData) RT_ OVERRIDE;62 virtual int assignReadOnly(void const *a_pvData, size_t a_cbData) RT_NOEXCEPT RT_OVERRIDE; 63 63 /** 64 64 * Use the specified data buffer directly. 65 65 * @note This will assert and work like assignReadOnly. */ 66 virtual int assignWriteable(void *a_pvBuf, size_t a_cbBuf) RT_ OVERRIDE;66 virtual int assignWriteable(void *a_pvBuf, size_t a_cbBuf) RT_NOEXCEPT RT_OVERRIDE; 67 67 68 68 /** Make a clone of this object. */ 69 inline RTCRestBinaryParameter *clone() const { return (RTCRestBinaryParameter *)baseClone(); }69 inline RTCRestBinaryParameter *clone() const RT_NOEXCEPT { return (RTCRestBinaryParameter *)baseClone(); } 70 70 71 71 /* Overridden methods: */ 72 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;73 virtual int resetToDefault() RT_ OVERRIDE;74 virtual const char *typeName(void) const RT_ OVERRIDE;72 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 73 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 74 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 75 75 76 76 /** Factory method. */ 77 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;77 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 78 78 79 79 /** 80 80 * Retrieves the callback data. 81 81 */ 82 inline void *getCallbackData() const { return m_pvCallbackData; }82 inline void *getCallbackData() const RT_NOEXCEPT { return m_pvCallbackData; } 83 83 84 84 /** … … 89 89 * If NULL, no content type is set. 90 90 */ 91 int setContentType(const char *a_pszContentType) ;91 int setContentType(const char *a_pszContentType) RT_NOEXCEPT; 92 92 93 93 /** 94 94 * Gets the content type that was set. 95 95 */ 96 inline RTCString const &getContentType() const { return m_strContentType; }96 inline RTCString const &getContentType() const RT_NOEXCEPT { return m_strContentType; } 97 97 98 98 /** 99 99 * Gets the content-length value (UINT64_MAX if not available). 100 100 */ 101 inline uint64_t getContentLength() const { return m_cbContentLength; }101 inline uint64_t getContentLength() const RT_NOEXCEPT { return m_cbContentLength; } 102 102 103 103 /** … … 118 118 */ 119 119 typedef DECLCALLBACK(int) FNPRODUCER(RTCRestBinaryParameter *a_pThis, void *a_pvDst, size_t a_cbDst, 120 uint64_t a_offContent, size_t *a_pcbActual) ;120 uint64_t a_offContent, size_t *a_pcbActual) /*RT_NOEXCEPT*/; 121 121 /** Pointer to a byte producer callback. */ 122 122 typedef FNPRODUCER *PFNPRODUCER; … … 134 134 * @note This will drop any buffer previously registered using setUploadData(). 135 135 */ 136 void setProducerCallback(PFNPRODUCER a_pfnProducer, void *a_pvCallbackData = NULL, uint64_t a_cbContentLength = UINT64_MAX) ;136 void setProducerCallback(PFNPRODUCER a_pfnProducer, void *a_pvCallbackData = NULL, uint64_t a_cbContentLength = UINT64_MAX) RT_NOEXCEPT; 137 137 138 138 /** … … 143 143 * @internal 144 144 */ 145 virtual int xmitPrepare(RTHTTP a_hHttp) const ;145 virtual int xmitPrepare(RTHTTP a_hHttp) const RT_NOEXCEPT; 146 146 147 147 /** … … 151 151 * @internal 152 152 */ 153 virtual void xmitComplete(RTHTTP a_hHttp) const ;153 virtual void xmitComplete(RTHTTP a_hHttp) const RT_NOEXCEPT; 154 154 155 155 protected: … … 164 164 void *m_pvCallbackData; 165 165 166 /** Callback for use with RTHttpSetUploadCallback. */ 167 static FNRTHTTPUPLOADCALLBACK xmitHttpCallback; 166 /** @copydoc FNRTHTTPUPLOADCALLBACK */ 167 static DECLCALLBACK(int) xmitHttpCallback(RTHTTP hHttp, void *pvBuf, size_t cbBuf, uint64_t offContent, 168 size_t *pcbActual, void *pvUser) RT_NOEXCEPT; 168 169 169 170 private: … … 183 184 public: 184 185 /** Default constructor. */ 185 RTCRestBinaryResponse() ;186 RTCRestBinaryResponse() RT_NOEXCEPT; 186 187 187 188 /** Safe copy assignment method. */ 188 virtual int assignCopy(RTCRestBinaryResponse const &a_rThat) ;189 virtual int assignCopy(RTCRestBinaryResponse const &a_rThat) RT_NOEXCEPT; 189 190 /** Safe copy assignment method. */ 190 virtual int assignCopy(RTCRestBinary const &a_rThat) RT_ OVERRIDE;191 virtual int assignCopy(RTCRestBinary const &a_rThat) RT_NOEXCEPT RT_OVERRIDE; 191 192 /** Safe copy assignment method. 192 193 * @note This will assert and fail as it makes no sense for a download. */ 193 virtual int assignCopy(void const *a_pvData, size_t a_cbData) RT_ OVERRIDE;194 virtual int assignCopy(void const *a_pvData, size_t a_cbData) RT_NOEXCEPT RT_OVERRIDE; 194 195 195 196 /** … … 197 198 * @note This will assert and fail as it makes no sense for a download. 198 199 */ 199 virtual int assignReadOnly(void const *a_pvData, size_t a_cbData) RT_ OVERRIDE;200 virtual int assignReadOnly(void const *a_pvData, size_t a_cbData) RT_NOEXCEPT RT_OVERRIDE; 200 201 /** 201 202 * Use the specified data buffer directly. 202 203 * @note This will drop any previously registered producer callback and user data. 203 204 */ 204 virtual int assignWriteable(void *a_pvBuf, size_t a_cbBuf) RT_ OVERRIDE;205 virtual int assignWriteable(void *a_pvBuf, size_t a_cbBuf) RT_NOEXCEPT RT_OVERRIDE; 205 206 206 207 /** Make a clone of this object. */ 207 inline RTCRestBinaryResponse *clone() const { return (RTCRestBinaryResponse *)baseClone(); }208 inline RTCRestBinaryResponse *clone() const RT_NOEXCEPT { return (RTCRestBinaryResponse *)baseClone(); } 208 209 209 210 /* Overridden methods: */ 210 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;211 virtual int resetToDefault() RT_ OVERRIDE;212 virtual const char *typeName(void) const RT_ OVERRIDE;211 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 212 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 213 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 213 214 214 215 /** Factory method. */ 215 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) ;216 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT; 216 217 217 218 /** 218 219 * Retrieves the callback data. 219 220 */ 220 inline void *getCallbackData() const { return m_pvCallbackData; }221 inline void *getCallbackData() const RT_NOEXCEPT { return m_pvCallbackData; } 221 222 222 223 /** … … 230 231 * 32-bit hosts and 128MiB for 64-bit). 231 232 */ 232 void setMaxDownloadSize(size_t a_cbMaxDownload) ;233 void setMaxDownloadSize(size_t a_cbMaxDownload) RT_NOEXCEPT; 233 234 234 235 /** 235 236 * Gets the content-length value (UINT64_MAX if not available). 236 237 */ 237 inline uint64_t getContentLength() const { return m_cbContentLength; }238 inline uint64_t getContentLength() const RT_NOEXCEPT { return m_cbContentLength; } 238 239 239 240 /** … … 255 256 */ 256 257 typedef DECLCALLBACK(int) FNCONSUMER(RTCRestBinaryResponse *a_pThis, const void *a_pvSrc, size_t a_cbSrc, 257 uint32_t a_uHttpStatus, uint64_t a_offContent, uint64_t a_cbContent) ;258 uint32_t a_uHttpStatus, uint64_t a_offContent, uint64_t a_cbContent) /*RT_NOEXCEPT*/; 258 259 /** Pointer to a byte consumer callback. */ 259 260 typedef FNCONSUMER *PFNCONSUMER; … … 267 268 * using getCallbackData(). 268 269 */ 269 void setConsumerCallback(PFNCONSUMER a_pfnConsumer, void *a_pvCallbackData = NULL) ;270 void setConsumerCallback(PFNCONSUMER a_pfnConsumer, void *a_pvCallbackData = NULL) RT_NOEXCEPT; 270 271 271 272 /** … … 277 278 * @internal 278 279 */ 279 virtual int receivePrepare(RTHTTP a_hHttp, uint32_t a_fCallbackFlags) ;280 virtual int receivePrepare(RTHTTP a_hHttp, uint32_t a_fCallbackFlags) RT_NOEXCEPT; 280 281 281 282 /** … … 285 286 * @internal 286 287 */ 287 virtual void receiveComplete(RTHTTP a_hHttp) ;288 virtual void receiveComplete(RTHTTP a_hHttp) RT_NOEXCEPT; 288 289 289 290 protected: … … 300 301 size_t m_cbMaxDownload; 301 302 302 /** Callback for use with RTHttpSetDownloadCallback. */ 303 static FNRTHTTPDOWNLOADCALLBACK receiveHttpCallback; 303 /** @copydoc FNRTHTTPDOWNLOADCALLBACK. */ 304 static DECLCALLBACK(int) receiveHttpCallback(RTHTTP hHttp, void const *pvBuf, size_t cbBuf, uint32_t uHttpStatus, 305 uint64_t offContent, uint64_t cbContent, void *pvUser) RT_NOEXCEPT; 304 306 305 307 private: … … 331 333 { 332 334 public: 333 RTCRestClientRequestBase() ;335 RTCRestClientRequestBase() RT_NOEXCEPT; 334 336 virtual ~RTCRestClientRequestBase(); 335 RTCRestClientRequestBase(RTCRestClientRequestBase const &a_rThat) ;336 RTCRestClientRequestBase &operator=(RTCRestClientRequestBase const &a_rThat) ;337 RTCRestClientRequestBase(RTCRestClientRequestBase const &a_rThat) RT_NOEXCEPT; 338 RTCRestClientRequestBase &operator=(RTCRestClientRequestBase const &a_rThat) RT_NOEXCEPT; 337 339 338 340 /** … … 340 342 * @returns IPRT status code. 341 343 */ 342 virtual int resetToDefault() = 0;344 virtual int resetToDefault() RT_NOEXCEPT = 0; 343 345 344 346 /** … … 351 353 * @param a_pStrBody Where to set body parameters. 352 354 */ 353 virtual int xmitPrepare(RTCString *a_pStrPath, RTCString *a_pStrQuery, RTHTTP a_hHttp, RTCString *a_pStrBody) const = 0;355 virtual int xmitPrepare(RTCString *a_pStrPath, RTCString *a_pStrQuery, RTHTTP a_hHttp, RTCString *a_pStrBody) const RT_NOEXCEPT = 0; 354 356 355 357 /** … … 359 361 * @param a_hHttp The HTTP handle the request was performed on. 360 362 */ 361 virtual void xmitComplete(int a_rcStatus, RTHTTP a_hHttp) const = 0;363 virtual void xmitComplete(int a_rcStatus, RTHTTP a_hHttp) const RT_NOEXCEPT = 0; 362 364 363 365 /** 364 366 * Checks if there are were any assignment errors. 365 367 */ 366 inline bool hasAssignmentErrors() const { return m_fErrorSet != 0; }368 inline bool hasAssignmentErrors() const RT_NOEXCEPT { return m_fErrorSet != 0; } 367 369 368 370 protected: … … 400 402 */ 401 403 int doPathParameters(RTCString *a_pStrPath, const char *a_pszPathTemplate, size_t a_cchPathTemplate, 402 PATHPARAMDESC const *a_paPathParams, PATHPARAMSTATE *a_paPathParamStates, size_t a_cPathParams) const ;404 PATHPARAMDESC const *a_paPathParams, PATHPARAMSTATE *a_paPathParamStates, size_t a_cPathParams) const RT_NOEXCEPT; 403 405 404 406 /** Query parameter descriptor. */ … … 421 423 */ 422 424 int doQueryParameters(RTCString *a_pStrQuery, QUERYPARAMDESC const *a_paQueryParams, 423 RTCRestObjectBase const **a_papQueryParamObjs, size_t a_cQueryParams) const ;425 RTCRestObjectBase const **a_papQueryParamObjs, size_t a_cQueryParams) const RT_NOEXCEPT; 424 426 425 427 /** Header parameter descriptor. */ … … 443 445 */ 444 446 int doHeaderParameters(RTHTTP a_hHttp, HEADERPARAMDESC const *a_paHeaderParams, 445 RTCRestObjectBase const **a_papHeaderParamObjs, size_t a_cHeaderParams) const ;447 RTCRestObjectBase const **a_papHeaderParamObjs, size_t a_cHeaderParams) const RT_NOEXCEPT; 446 448 }; 447 449 … … 454 456 public: 455 457 /** Default constructor. */ 456 RTCRestClientResponseBase() ;458 RTCRestClientResponseBase() RT_NOEXCEPT; 457 459 /** Destructor. */ 458 460 virtual ~RTCRestClientResponseBase(); … … 465 467 * Resets the object state. 466 468 */ 467 virtual void reset(void) ;469 virtual void reset(void) RT_NOEXCEPT; 468 470 469 471 /** … … 477 479 * @param a_hHttp The HTTP handle to prepare for receiving. 478 480 */ 479 virtual int receivePrepare(RTHTTP a_hHttp) ;481 virtual int receivePrepare(RTHTTP a_hHttp) RT_NOEXCEPT; 480 482 481 483 /** … … 489 491 * @note Called before consumeBody() but after consumeHeader(). 490 492 */ 491 virtual void receiveComplete(int a_rcStatus, RTHTTP a_hHttp) ;493 virtual void receiveComplete(int a_rcStatus, RTHTTP a_hHttp) RT_NOEXCEPT; 492 494 493 495 /** … … 499 501 * @note Called after consumeHeader(). 500 502 */ 501 virtual void consumeBody(const char *a_pchData, size_t a_cbData) ;503 virtual void consumeBody(const char *a_pchData, size_t a_cbData) RT_NOEXCEPT; 502 504 503 505 /** … … 506 508 * @returns IPRT status code. 507 509 */ 508 virtual void receiveFinal() ;510 virtual void receiveFinal() RT_NOEXCEPT; 509 511 510 512 /** … … 512 514 * @returns Negative numbers are IPRT errors, positive are HTTP status codes. 513 515 */ 514 inline int getStatus() { return m_rcStatus; }516 inline int getStatus() const RT_NOEXCEPT { return m_rcStatus; } 515 517 516 518 /** … … 518 520 * @returns HTTP status code or VERR_NOT_AVAILABLE. 519 521 */ 520 inline int getHttpStatus() { return m_rcHttp; }522 inline int getHttpStatus() const RT_NOEXCEPT { return m_rcHttp; } 521 523 522 524 /** 523 525 * Getter for m_pErrInfo. 524 526 */ 525 inline PCRTERRINFO getErrInfo(void) const { return m_pErrInfo; }527 inline PCRTERRINFO getErrInfo(void) const RT_NOEXCEPT { return m_pErrInfo; } 526 528 527 529 /** 528 530 * Getter for m_strContentType. 529 531 */ 530 inline RTCString const &getContentType(void) const { return m_strContentType; }532 inline RTCString const &getContentType(void) const RT_NOEXCEPT { return m_strContentType; } 531 533 532 534 … … 541 543 RTCString m_strContentType; 542 544 543 PRTERRINFO getErrInfoInternal(void) ;544 void deleteErrInfo(void) ;545 void copyErrInfo(PCRTERRINFO pErrInfo) ;545 PRTERRINFO getErrInfoInternal(void) RT_NOEXCEPT; 546 void deleteErrInfo(void) RT_NOEXCEPT; 547 void copyErrInfo(PCRTERRINFO pErrInfo) RT_NOEXCEPT; 546 548 547 549 /** … … 556 558 * @param ... Message arguments. 557 559 */ 558 int addError(int a_rc, const char *a_pszFormat, ...) ;560 int addError(int a_rc, const char *a_pszFormat, ...) RT_NOEXCEPT; 559 561 560 562 /** … … 570 572 */ 571 573 int deserializeHeader(RTCRestObjectBase *a_pObj, const char *a_pchValue, size_t a_cchValue, 572 uint32_t a_fFlags, const char *a_pszErrorTag) ;574 uint32_t a_fFlags, const char *a_pszErrorTag) RT_NOEXCEPT; 573 575 574 576 /** … … 587 589 */ 588 590 int deserializeHeaderIntoMap(RTCRestStringMapBase *a_pMap, const char *a_pchField, size_t a_cchField, 589 const char *a_pchValue, size_t a_cchValue, uint32_t a_fFlags, const char *a_pszErrorTag) ;591 const char *a_pchValue, size_t a_cchValue, uint32_t a_fFlags, const char *a_pszErrorTag) RT_NOEXCEPT; 590 592 591 593 /** … … 597 599 * @param a_pszBodyName The name of the body parameter. 598 600 */ 599 void deserializeBody(const char *a_pchData, size_t a_cbData, const char *a_pszBodyName) ;601 void deserializeBody(const char *a_pchData, size_t a_cbData, const char *a_pszBodyName) RT_NOEXCEPT; 600 602 601 603 /** … … 604 606 * @param a_rCursor The JSON cursor. 605 607 */ 606 virtual void deserializeBodyFromJsonCursor(RTCRestJsonCursor const &a_rCursor) ;608 virtual void deserializeBodyFromJsonCursor(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT; 607 609 608 610 /** … … 613 615 public: 614 616 RTCRestClientResponseBase *m_pThat; /**< Pointer to response object. */ 615 PrimaryJsonCursorForBody(RTJSONVAL hValue, const char *pszName, RTCRestClientResponseBase *a_pThat) ;616 virtual int addError(RTCRestJsonCursor const &a_rCursor, int a_rc, const char *a_pszFormat, ...) RT_ OVERRIDE;617 virtual int unknownField(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;617 PrimaryJsonCursorForBody(RTJSONVAL hValue, const char *pszName, RTCRestClientResponseBase *a_pThat) RT_NOEXCEPT; 618 virtual int addError(RTCRestJsonCursor const &a_rCursor, int a_rc, const char *a_pszFormat, ...) RT_NOEXCEPT RT_OVERRIDE; 619 virtual int unknownField(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 618 620 }; 619 621 … … 634 636 */ 635 637 virtual int consumeHeader(uint32_t a_uMatchWord, const char *a_pchField, size_t a_cchField, 636 const char *a_pchValue, size_t a_cchValue) ;638 const char *a_pchValue, size_t a_cchValue) RT_NOEXCEPT; 637 639 638 640 private: 639 641 /** Callback for use with RTHttpSetHeaderCallback. */ 640 static FNRTHTTPHEADERCALLBACK receiveHttpHeaderCallback; 642 static DECLCALLBACK(int) receiveHttpHeaderCallback(RTHTTP hHttp, uint32_t uMatchWord, const char *pchField, size_t cchField, 643 const char *pchValue, size_t cchValue, void *pvUser) RT_NOEXCEPT; 641 644 }; 642 645 … … 648 651 { 649 652 public: 650 RTCRestClientApiBase() ;653 RTCRestClientApiBase() RT_NOEXCEPT; 651 654 virtual ~RTCRestClientApiBase(); 652 655 … … 656 659 * Gets the server URL. 657 660 */ 658 const char *getServerUrl(void) const ;661 const char *getServerUrl(void) const RT_NOEXCEPT; 659 662 660 663 /** … … 663 666 * @param a_pszUrl The new server URL. NULL/empty to reset to default. 664 667 */ 665 int setServerUrl(const char *a_pszUrl) ;668 int setServerUrl(const char *a_pszUrl) RT_NOEXCEPT; 666 669 667 670 /** … … 670 673 * @param a_pszScheme The new scheme. Does not accept NULL or empty string. 671 674 */ 672 int setServerScheme(const char *a_pszScheme) ;675 int setServerScheme(const char *a_pszScheme) RT_NOEXCEPT; 673 676 674 677 /** … … 677 680 * @param a_pszAuthority The new authority. Does not accept NULL or empty string. 678 681 */ 679 int setServerAuthority(const char *a_pszAuthority) ;682 int setServerAuthority(const char *a_pszAuthority) RT_NOEXCEPT; 680 683 681 684 /** … … 684 687 * @param a_pszBasePath The new base path. Does not accept NULL or empty string. 685 688 */ 686 int setServerBasePath(const char *a_pszBasePath) ;689 int setServerBasePath(const char *a_pszBasePath) RT_NOEXCEPT; 687 690 688 691 /** … … 690 693 * @returns Server URL. 691 694 */ 692 virtual const char *getDefaultServerUrl() const = 0;695 virtual const char *getDefaultServerUrl() const RT_NOEXCEPT = 0; 693 696 694 697 /** … … 696 699 * @returns Host string (start of URL). 697 700 */ 698 virtual const char *getDefaultServerBasePath() const = 0;701 virtual const char *getDefaultServerBasePath() const RT_NOEXCEPT = 0; 699 702 /** @} */ 700 703 … … 720 723 * @returns IPRT status code. 721 724 */ 722 virtual int reinitHttpInstance() ;725 virtual int reinitHttpInstance() RT_NOEXCEPT; 723 726 724 727 /** … … 735 738 */ 736 739 virtual int xmitReady(RTHTTP a_hHttp, RTCString const &a_rStrFullUrl, RTHTTPMETHOD a_enmHttpMethod, 737 RTCString const &a_rStrXmitBody, uint32_t a_fFlags) ;740 RTCString const &a_rStrXmitBody, uint32_t a_fFlags) RT_NOEXCEPT; 738 741 739 742 /** … … 748 751 */ 749 752 virtual int doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod, 750 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod, uint32_t a_fFlags) ;753 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod, uint32_t a_fFlags) RT_NOEXCEPT; 751 754 752 755 /** … … 766 769 */ 767 770 int ociSignRequest(RTHTTP a_hHttp, RTCString const &a_rStrFullUrl, RTHTTPMETHOD a_enmHttpMethod, 768 RTCString const &a_rStrXmitBody, uint32_t a_fFlags, RTCRKEY a_hKey, RTCString const &a_rStrKeyId) ;771 RTCString const &a_rStrXmitBody, uint32_t a_fFlags, RTCRKEY a_hKey, RTCString const &a_rStrKeyId) RT_NOEXCEPT; 769 772 770 773 /** … … 778 781 * @param a_cchSrc The length of the new component. 779 782 */ 780 int setServerUrlPart(const char *a_pszServerUrl, size_t a_offDst, size_t a_cchDst, const char *a_pszSrc, size_t a_cchSrc) ;783 int setServerUrlPart(const char *a_pszServerUrl, size_t a_offDst, size_t a_cchDst, const char *a_pszSrc, size_t a_cchSrc) RT_NOEXCEPT; 781 784 }; 782 785 -
trunk/include/iprt/cpp/restoutput.h
r74415 r74425 45 45 { 46 46 public: 47 RTCRestOutputBase() ;47 RTCRestOutputBase() RT_NOEXCEPT; 48 48 virtual ~RTCRestOutputBase(); 49 49 … … 55 55 * @param a_cchToWrite The length of the string 56 56 */ 57 virtual size_t output(const char *a_pchString, size_t a_cchToWrite) = 0;57 virtual size_t output(const char *a_pchString, size_t a_cchToWrite) RT_NOEXCEPT = 0; 58 58 59 59 /** … … 64 64 * @param ... Argument specfied in @a pszFormat. 65 65 */ 66 inline size_t printf(const char *pszFormat, ...) RT_ IPRT_FORMAT_ATTR(2, 3)66 inline size_t printf(const char *pszFormat, ...) RT_NOEXCEPT RT_IPRT_FORMAT_ATTR(2, 3) 67 67 { 68 68 va_list va; … … 80 80 * @param va Argument specfied in @a pszFormat. 81 81 */ 82 size_t vprintf(const char *pszFormat, va_list va) RT_ IPRT_FORMAT_ATTR(2, 0);82 size_t vprintf(const char *pszFormat, va_list va) RT_NOEXCEPT RT_IPRT_FORMAT_ATTR(2, 0); 83 83 84 84 /** … … 86 86 * @returns Previous output state. Pass to endArray() when done. 87 87 */ 88 virtual uint32_t beginArray() ;88 virtual uint32_t beginArray() RT_NOEXCEPT; 89 89 90 90 /** … … 92 92 * @param a_uOldState Previous output state (returned by beginArray()). 93 93 */ 94 virtual void endArray(uint32_t a_uOldState) ;94 virtual void endArray(uint32_t a_uOldState) RT_NOEXCEPT; 95 95 96 96 /** … … 98 98 * @returns Previous output state. Pass to endObject() when done. 99 99 */ 100 virtual uint32_t beginObject() ;100 virtual uint32_t beginObject() RT_NOEXCEPT; 101 101 102 102 /** … … 104 104 * @param a_uOldState Previous output state (returned by beginObject()). 105 105 */ 106 virtual void endObject(uint32_t a_uOldState) ;106 virtual void endObject(uint32_t a_uOldState) RT_NOEXCEPT; 107 107 108 108 /** … … 110 110 * This is called before a value, not after. 111 111 */ 112 virtual void valueSeparator() ;112 virtual void valueSeparator() RT_NOEXCEPT; 113 113 114 114 /** 115 115 * Outputs a value separator, name and name separator. 116 116 */ 117 virtual void valueSeparatorAndName(const char *a_pszName, size_t a_cchName) ;117 virtual void valueSeparatorAndName(const char *a_pszName, size_t a_cchName) RT_NOEXCEPT; 118 118 119 119 /** Outputs a null-value. */ 120 void nullValue() ;120 void nullValue() RT_NOEXCEPT; 121 121 122 122 protected: … … 125 125 126 126 /** @callback_method_impl{FNRTSTROUTPUT} */ 127 static DECLCALLBACK(size_t) printfOutputCallback(void *pvArg, const char *pachChars, size_t cbChars) ;127 static DECLCALLBACK(size_t) printfOutputCallback(void *pvArg, const char *pachChars, size_t cbChars) RT_NOEXCEPT; 128 128 }; 129 129 … … 135 135 { 136 136 public: 137 RTCRestOutputPrettyBase() ;137 RTCRestOutputPrettyBase() RT_NOEXCEPT; 138 138 virtual ~RTCRestOutputPrettyBase(); 139 139 … … 142 142 * @returns Previous output state. Pass to endArray() when done. 143 143 */ 144 virtual uint32_t beginArray() RT_ OVERRIDE;144 virtual uint32_t beginArray() RT_NOEXCEPT RT_OVERRIDE; 145 145 146 146 /** … … 148 148 * @param a_uOldState Previous output state (returned by beginArray()). 149 149 */ 150 virtual void endArray(uint32_t a_uOldState) RT_ OVERRIDE;150 virtual void endArray(uint32_t a_uOldState) RT_NOEXCEPT RT_OVERRIDE; 151 151 152 152 /** … … 154 154 * @returns Previous output state. Pass to endObject() when done. 155 155 */ 156 virtual uint32_t beginObject() RT_ OVERRIDE;156 virtual uint32_t beginObject() RT_NOEXCEPT RT_OVERRIDE; 157 157 158 158 /** … … 160 160 * @param a_uOldState Previous output state (returned by beginObject()). 161 161 */ 162 virtual void endObject(uint32_t a_uOldState) RT_ OVERRIDE;162 virtual void endObject(uint32_t a_uOldState) RT_NOEXCEPT RT_OVERRIDE; 163 163 164 164 /** … … 166 166 * This is called before a value, not after. 167 167 */ 168 virtual void valueSeparator() RT_ OVERRIDE;168 virtual void valueSeparator() RT_NOEXCEPT RT_OVERRIDE; 169 169 170 170 /** 171 171 * Outputs a value separator, name and name separator. 172 172 */ 173 virtual void valueSeparatorAndName(const char *a_pszName, size_t a_cchName) RT_ OVERRIDE;173 virtual void valueSeparatorAndName(const char *a_pszName, size_t a_cchName) RT_NOEXCEPT RT_OVERRIDE; 174 174 175 175 protected: 176 176 /** Helper for outputting the correct amount of indentation. */ 177 void outputIndentation() ;177 void outputIndentation() RT_NOEXCEPT; 178 178 }; 179 179 … … 192 192 * nuke the string content before starting the output. 193 193 */ 194 RTCRestOutputToString(RTCString *a_pDst, bool a_fAppend = false) ;194 RTCRestOutputToString(RTCString *a_pDst, bool a_fAppend = false) RT_NOEXCEPT; 195 195 virtual ~RTCRestOutputToString(); 196 196 197 virtual size_t output(const char *a_pchString, size_t a_cchToWrite) RT_ OVERRIDE;197 virtual size_t output(const char *a_pchString, size_t a_cchToWrite) RT_NOEXCEPT RT_OVERRIDE; 198 198 199 199 /** … … 206 206 * more output afterwards. 207 207 */ 208 virtual RTCString *finalize() ;208 virtual RTCString *finalize() RT_NOEXCEPT; 209 209 210 210 protected: … … 233 233 * nuke the string content before starting the output. 234 234 */ 235 RTCRestOutputPrettyToString(RTCString *a_pDst, bool a_fAppend = false) ;235 RTCRestOutputPrettyToString(RTCString *a_pDst, bool a_fAppend = false) RT_NOEXCEPT; 236 236 virtual ~RTCRestOutputPrettyToString(); 237 237 238 virtual size_t output(const char *a_pchString, size_t a_cchToWrite) RT_ OVERRIDE;238 virtual size_t output(const char *a_pchString, size_t a_cchToWrite) RT_NOEXCEPT RT_OVERRIDE; 239 239 240 240 /** … … 247 247 * more output afterwards. 248 248 */ 249 virtual RTCString *finalize() ;249 virtual RTCString *finalize() RT_NOEXCEPT; 250 250 251 251 protected: -
trunk/include/iprt/cpp/reststringmap.h
r74402 r74425 44 44 public: 45 45 /** Default destructor. */ 46 RTCRestStringMapBase() ;46 RTCRestStringMapBase() RT_NOEXCEPT; 47 47 /** Copy constructor. */ 48 48 RTCRestStringMapBase(RTCRestStringMapBase const &a_rThat); … … 53 53 54 54 /* Overridden methods: */ 55 virtual RTCRestObjectBase *baseClone() const RT_ OVERRIDE;56 virtual int resetToDefault() RT_ OVERRIDE;57 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_ OVERRIDE;58 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_ OVERRIDE;55 virtual RTCRestObjectBase *baseClone() const RT_NOEXCEPT RT_OVERRIDE; 56 virtual int resetToDefault() RT_NOEXCEPT RT_OVERRIDE; 57 virtual RTCRestOutputBase &serializeAsJson(RTCRestOutputBase &a_rDst) const RT_NOEXCEPT RT_OVERRIDE; 58 virtual int deserializeFromJson(RTCRestJsonCursor const &a_rCursor) RT_NOEXCEPT RT_OVERRIDE; 59 59 // later? 60 //virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_ OVERRIDE;60 //virtual int toString(RTCString *a_pDst, uint32_t a_fFlags = kCollectionFormat_Unspecified) const RT_NOEXCEPT RT_OVERRIDE; 61 61 //virtual int fromString(RTCString const &a_rValue, const char *a_pszName, PRTERRINFO a_pErrInfo = NULL, 62 // uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_ OVERRIDE;63 virtual kTypeClass typeClass(void) const RT_ OVERRIDE;64 virtual const char *typeName(void) const RT_ OVERRIDE;62 // uint32_t a_fFlags = kCollectionFormat_Unspecified) RT_NOEXCEPT RT_OVERRIDE; 63 virtual kTypeClass typeClass(void) const RT_NOEXCEPT RT_OVERRIDE; 64 virtual const char *typeName(void) const RT_NOEXCEPT RT_OVERRIDE; 65 65 66 66 /** 67 67 * Clear the content of the map. 68 68 */ 69 void clear() ;69 void clear() RT_NOEXCEPT; 70 70 71 71 /** 72 72 * Checks if the map is empty. 73 73 */ 74 inline bool isEmpty() const { return m_cEntries == 0; }74 inline bool isEmpty() const RT_NOEXCEPT { return m_cEntries == 0; } 75 75 76 76 /** 77 77 * Gets the number of entries in the map. 78 78 */ 79 size_t size() const ;79 size_t size() const RT_NOEXCEPT; 80 80 81 81 /** … … 84 84 * @param a_pszKey The key to check fo. 85 85 */ 86 bool containsKey(const char *a_pszKey) const ;86 bool containsKey(const char *a_pszKey) const RT_NOEXCEPT; 87 87 88 88 /** … … 91 91 * @param a_rStrKey The key to check fo. 92 92 */ 93 bool containsKey(RTCString const &a_rStrKey) const ;93 bool containsKey(RTCString const &a_rStrKey) const RT_NOEXCEPT; 94 94 95 95 /** … … 98 98 * @param a_pszKey The key to remove. 99 99 */ 100 bool remove(const char *a_pszKey) ;100 bool remove(const char *a_pszKey) RT_NOEXCEPT; 101 101 102 102 /** … … 105 105 * @param a_rStrKey The key to remove. 106 106 */ 107 bool remove(RTCString const &a_rStrKey) ;107 bool remove(RTCString const &a_rStrKey) RT_NOEXCEPT; 108 108 109 109 /** … … 117 117 * @param a_fReplace Whether to replace or fail on key collision. 118 118 */ 119 int putNewValue(RTCRestObjectBase **a_ppValue, const char *a_pszKey, size_t a_cchKey = RTSTR_MAX, bool a_fReplace = false) ;119 int putNewValue(RTCRestObjectBase **a_ppValue, const char *a_pszKey, size_t a_cchKey = RTSTR_MAX, bool a_fReplace = false) RT_NOEXCEPT; 120 120 121 121 /** … … 128 128 * @param a_fReplace Whether to replace or fail on key collision. 129 129 */ 130 int putNewValue(RTCRestObjectBase **a_ppValue, RTCString const &a_rStrKey, bool a_fReplace = false) ;130 int putNewValue(RTCRestObjectBase **a_ppValue, RTCString const &a_rStrKey, bool a_fReplace = false) RT_NOEXCEPT; 131 131 132 132 protected: … … 159 159 private: 160 160 MapEntry *m_pCur; 161 ConstIterator() ;161 ConstIterator() RT_NOEXCEPT; 162 162 protected: 163 ConstIterator(MapEntry *a_pEntry) : m_pCur(a_pEntry) { }163 ConstIterator(MapEntry *a_pEntry) RT_NOEXCEPT : m_pCur(a_pEntry) { } 164 164 public: 165 ConstIterator(ConstIterator const &a_rThat) : m_pCur(a_rThat.m_pCur) { }165 ConstIterator(ConstIterator const &a_rThat) RT_NOEXCEPT : m_pCur(a_rThat.m_pCur) { } 166 166 167 167 /** Gets the key string. */ 168 inline RTCString const &getKey() { return m_pCur->strKey; }168 inline RTCString const &getKey() RT_NOEXCEPT { return m_pCur->strKey; } 169 169 /** Gets poitner to the value object. */ 170 inline RTCRestObjectBase const *getValue() { return m_pCur->pValue; }170 inline RTCRestObjectBase const *getValue() RT_NOEXCEPT { return m_pCur->pValue; } 171 171 172 172 /** Advance to the next map entry. */ 173 inline ConstIterator &operator++() 173 inline ConstIterator &operator++() RT_NOEXCEPT 174 174 { 175 175 m_pCur = RTListNodeGetNextCpp(&m_pCur->ListEntry, MapEntry, ListEntry); … … 178 178 179 179 /** Advance to the previous map entry. */ 180 inline ConstIterator &operator--() 180 inline ConstIterator &operator--() RT_NOEXCEPT 181 181 { 182 182 m_pCur = RTListNodeGetPrevCpp(&m_pCur->ListEntry, MapEntry, ListEntry); … … 185 185 186 186 /** Compare equal. */ 187 inline bool operator==(ConstIterator const &a_rThat) { return m_pCur == a_rThat.m_pCur; }187 inline bool operator==(ConstIterator const &a_rThat) RT_NOEXCEPT { return m_pCur == a_rThat.m_pCur; } 188 188 /** Compare not equal. */ 189 inline bool operator!=(ConstIterator const &a_rThat) { return m_pCur != a_rThat.m_pCur; }189 inline bool operator!=(ConstIterator const &a_rThat) RT_NOEXCEPT { return m_pCur != a_rThat.m_pCur; } 190 190 191 191 /* Map class must be friend so it can use the MapEntry constructor. */ … … 194 194 195 195 /** Returns iterator for the first map entry (unless it's empty and it's also the end). */ 196 inline ConstIterator begin() const 196 inline ConstIterator begin() const RT_NOEXCEPT 197 197 { 198 198 if (!RTListIsEmpty(&m_ListHead)) … … 201 201 } 202 202 /** Returns iterator for the last map entry (unless it's empty and it's also the end). */ 203 inline ConstIterator last() const 203 inline ConstIterator last() const RT_NOEXCEPT 204 204 { 205 205 if (!RTListIsEmpty(&m_ListHead)) … … 208 208 } 209 209 /** Returns the end iterator. This does not ever refer to an actual map entry. */ 210 inline ConstIterator end() const 210 inline ConstIterator end() const RT_NOEXCEPT 211 211 { 212 212 return ConstIterator(RT_FROM_CPP_MEMBER(&m_ListHead, MapEntry, ListEntry)); … … 221 221 * @returns Pointer to new map object on success, NULL if out of memory. 222 222 */ 223 virtual RTCRestStringMapBase *createClone(void) const = 0;223 virtual RTCRestStringMapBase *createClone(void) const RT_NOEXCEPT = 0; 224 224 225 225 /** … … 228 228 * @returns Pointer to new value object on success, NULL if out of memory. 229 229 */ 230 virtual RTCRestObjectBase *createValue(void) = 0;230 virtual RTCRestObjectBase *createValue(void) RT_NOEXCEPT = 0; 231 231 232 232 /** 233 233 * For accessing the static deserializeInstanceFromJson() method of the value. 234 234 */ 235 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) = 0;236 237 /** 238 * Worker for the copy constructor and the assignment operator.235 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT = 0; 236 237 /** 238 * Worker for the copy assignment method and copyMapWorkerMayThrow. 239 239 * 240 240 * This will use createEntryCopy to do the copying. … … 243 243 * @param a_rThat The map to copy. Caller makes 100% sure the it has 244 244 * the same type as the destination. 245 * @param a_fThrow Whether to throw error. 246 */ 247 int copyMapWorker(RTCRestStringMapBase const &a_rThat, bool a_fThrow); 245 */ 246 int copyMapWorkerNoThrow(RTCRestStringMapBase const &a_rThat) RT_NOEXCEPT; 247 248 /** 249 * Wrapper around copyMapWorkerNoThrow() that throws allocation errors, making 250 * it suitable for copy constructors and assignment operators. 251 */ 252 void copyMapWorkerMayThrow(RTCRestStringMapBase const &a_rThat); 248 253 249 254 /** … … 257 262 * @param a_cchKey The key length, the whole string by default. 258 263 */ 259 int putWorker(const char *a_pszKey, RTCRestObjectBase *a_pValue, bool a_fReplace, size_t a_cchKey = RTSTR_MAX) ;264 int putWorker(const char *a_pszKey, RTCRestObjectBase *a_pValue, bool a_fReplace, size_t a_cchKey = RTSTR_MAX) RT_NOEXCEPT; 260 265 261 266 /** … … 269 274 * @param a_cchKey The key length, the whole string by default. 270 275 */ 271 int putCopyWorker(const char *a_pszKey, RTCRestObjectBase const &a_rValue, bool a_fReplace, size_t a_cchKey = RTSTR_MAX) ;276 int putCopyWorker(const char *a_pszKey, RTCRestObjectBase const &a_rValue, bool a_fReplace, size_t a_cchKey = RTSTR_MAX) RT_NOEXCEPT; 272 277 273 278 /** … … 277 282 * @param a_pszKey The key which value to look up. 278 283 */ 279 RTCRestObjectBase *getWorker(const char *a_pszKey) ;284 RTCRestObjectBase *getWorker(const char *a_pszKey) RT_NOEXCEPT; 280 285 281 286 /** … … 285 290 * @param a_pszKey The key which value to look up. 286 291 */ 287 RTCRestObjectBase const *getWorker(const char *a_pszKey) const ;292 RTCRestObjectBase const *getWorker(const char *a_pszKey) const RT_NOEXCEPT; 288 293 289 294 private: 290 static DECLCALLBACK(int) stringSpaceDestructorCallback(PRTSTRSPACECORE pStr, void *pvUser) ;295 static DECLCALLBACK(int) stringSpaceDestructorCallback(PRTSTRSPACECORE pStr, void *pvUser) RT_NOEXCEPT; 291 296 }; 292 297 … … 299 304 public: 300 305 /** Default constructor, creates emtpy map. */ 301 RTCRestStringMap() 306 RTCRestStringMap() RT_NOEXCEPT 302 307 : RTCRestStringMapBase() 303 308 {} … … 307 312 : RTCRestStringMapBase() 308 313 { 309 copyMapWorker (a_rThat, true /*a_fThrow*/);314 copyMapWorkerMayThrow(a_rThat); 310 315 } 311 316 … … 319 324 RTCRestStringMap &operator=(RTCRestStringMap const &a_rThat) 320 325 { 321 copyMapWorker (a_rThat, true /*a_fThrow*/);326 copyMapWorkerMayThrow(a_rThat); 322 327 return *this; 323 328 } 324 329 325 330 /** Safe copy assignment method. */ 326 int assignCopy(RTCRestStringMap const &a_rThat) 327 { 328 return copyMapWorker (a_rThat, false /*a_fThrow*/);331 int assignCopy(RTCRestStringMap const &a_rThat) RT_NOEXCEPT 332 { 333 return copyMapWorkerNoThrow(a_rThat); 329 334 } 330 335 331 336 /** Make a clone of this object. */ 332 inline RTCRestStringMap *clone() const 337 inline RTCRestStringMap *clone() const RT_NOEXCEPT 333 338 { 334 339 return (RTCRestStringMap *)baseClone(); … … 336 341 337 342 /** Factory method. */ 338 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) 343 static DECLCALLBACK(RTCRestObjectBase *) createInstance(void) RT_NOEXCEPT 339 344 { 340 345 return new (std::nothrow) RTCRestStringMap<ValueType>(); … … 342 347 343 348 /** Factory method for values. */ 344 static DECLCALLBACK(RTCRestObjectBase *) createValueInstance(void) 349 static DECLCALLBACK(RTCRestObjectBase *) createValueInstance(void) RT_NOEXCEPT 345 350 { 346 351 return new (std::nothrow) ValueType(); … … 348 353 349 354 /** @copydoc RTCRestObjectBase::FNDESERIALIZEINSTANCEFROMJSON */ 350 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) 355 static DECLCALLBACK(int) deserializeInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT 351 356 { 352 357 *a_ppInstance = new (std::nothrow) RTCRestStringMap<ValueType>(); … … 365 370 * @param a_fReplace Whether to replace existing key-value pair with matching key. 366 371 */ 367 inline int put(const char *a_pszKey, ValueType *a_pValue, bool a_fReplace = false) 372 inline int put(const char *a_pszKey, ValueType *a_pValue, bool a_fReplace = false) RT_NOEXCEPT 368 373 { 369 374 return putWorker(a_pszKey, a_pValue, a_fReplace); … … 379 384 * @param a_fReplace Whether to replace existing key-value pair with matching key. 380 385 */ 381 inline int put(RTCString const &a_rStrKey, ValueType *a_pValue, bool a_fReplace = false) 386 inline int put(RTCString const &a_rStrKey, ValueType *a_pValue, bool a_fReplace = false) RT_NOEXCEPT 382 387 { 383 388 return putWorker(a_rStrKey.c_str(), a_pValue, a_fReplace, a_rStrKey.length()); … … 393 398 * @param a_fReplace Whether to replace existing key-value pair with matching key. 394 399 */ 395 inline int putCopy(const char *a_pszKey, const ValueType &a_rValue, bool a_fReplace = false) 400 inline int putCopy(const char *a_pszKey, const ValueType &a_rValue, bool a_fReplace = false) RT_NOEXCEPT 396 401 { 397 402 return putCopyWorker(a_pszKey, a_rValue, a_fReplace); … … 407 412 * @param a_fReplace Whether to replace existing key-value pair with matching key. 408 413 */ 409 inline int putCopy(RTCString const &a_rStrKey, const ValueType &a_rValue, bool a_fReplace = false) 414 inline int putCopy(RTCString const &a_rStrKey, const ValueType &a_rValue, bool a_fReplace = false) RT_NOEXCEPT 410 415 { 411 416 return putCopyWorker(a_rStrKey.c_str(), a_rValue, a_fReplace, a_rStrKey.length()); … … 418 423 * @param a_pszKey The key which value to look up. 419 424 */ 420 inline ValueType *get(const char *a_pszKey) 425 inline ValueType *get(const char *a_pszKey) RT_NOEXCEPT 421 426 { 422 427 return (ValueType *)getWorker(a_pszKey); … … 429 434 * @param a_rStrKey The key which value to look up. 430 435 */ 431 inline ValueType *get(RTCString const &a_rStrKey) 436 inline ValueType *get(RTCString const &a_rStrKey) RT_NOEXCEPT 432 437 { 433 438 return (ValueType *)getWorker(a_rStrKey.c_str()); … … 440 445 * @param a_pszKey The key which value to look up. 441 446 */ 442 inline ValueType const *get(const char *a_pszKey) const 447 inline ValueType const *get(const char *a_pszKey) const RT_NOEXCEPT 443 448 { 444 449 return (ValueType const *)getWorker(a_pszKey); … … 451 456 * @param a_rStrKey The key which value to look up. 452 457 */ 453 inline ValueType const *get(RTCString const &a_rStrKey) const 458 inline ValueType const *get(RTCString const &a_rStrKey) const RT_NOEXCEPT 454 459 { 455 460 return (ValueType const *)getWorker(a_rStrKey.c_str()); … … 459 464 460 465 protected: 461 virtual RTCRestStringMapBase *createClone(void) const RT_ OVERRIDE466 virtual RTCRestStringMapBase *createClone(void) const RT_NOEXCEPT RT_OVERRIDE 462 467 { 463 468 return new (std::nothrow) RTCRestStringMap(); 464 469 } 465 470 466 virtual RTCRestObjectBase *createValue(void) RT_ OVERRIDE471 virtual RTCRestObjectBase *createValue(void) RT_NOEXCEPT RT_OVERRIDE 467 472 { 468 473 return new (std::nothrow) ValueType(); 469 474 } 470 475 471 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_ OVERRIDE476 virtual int deserializeValueInstanceFromJson(RTCRestJsonCursor const &a_rCursor, RTCRestObjectBase **a_ppInstance) RT_NOEXCEPT RT_OVERRIDE 472 477 { 473 478 return ValueType::deserializeInstanceFromJson(a_rCursor, a_ppInstance);
Note:
See TracChangeset
for help on using the changeset viewer.