Changeset 98263 in vbox for trunk/src/VBox/Main/include/AutoCaller.h
- Timestamp:
- Jan 24, 2023 1:52:49 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/AutoCaller.h
r98262 r98263 54 54 * destroyed). 55 55 * 56 * If # rc() returns a failure after the instance creation, it means that56 * If #hrc() returns a failure after the instance creation, it means that 57 57 * the managed VirtualBoxBase object is not Ready, or in any other invalid 58 58 * state, so that the caller must not use the object and can return this … … 97 97 * @param aObj Object to add a normal caller to. If NULL, this 98 98 * instance is effectively turned to no-op (where 99 * rc() will return S_OK).99 * hrc() will return S_OK). 100 100 */ 101 101 AutoCaller(VirtualBoxBase *aObj) … … 124 124 125 125 /** 126 * Returns the stored result code returned by ObjectState::addCaller() 127 * after instance creation or after the last #add() call. A successful 128 * result code means the number of callers was successfully increased. 129 * @deprecated use hrc() 130 */ 131 HRESULT rc() const { return mRC; } 132 133 /** 134 * Returns |true| if |SUCCEEDED(rc())| is |true|, for convenience. 135 * |true| means the number of callers was successfully increased. 126 * Returns |true| if |SUCCEEDED(hrc())| is |true|, for convenience. |true| means 127 * the number of callers was successfully increased. 136 128 */ 137 129 bool isOk() const { return SUCCEEDED(mRC); } 138 130 139 131 /** 140 * Returns |true| if |FAILED( rc())| is |true|, for convenience.141 * |true| meansthe number of callers was _not_ successfully increased.132 * Returns |true| if |FAILED(hrc())| is |true|, for convenience. |true| means 133 * the number of callers was _not_ successfully increased. 142 134 */ 143 135 bool isNotOk() const { return FAILED(mRC); } … … 145 137 /** 146 138 * Temporarily decreases the number of callers of the managed object. 147 * May only be called if #isOk() returns |true|. Note that # rc() will148 * returnE_FAIL after this method succeeds.139 * May only be called if #isOk() returns |true|. Note that #hrc() will return 140 * E_FAIL after this method succeeds. 149 141 */ 150 142 void release() … … 204 196 * 205 197 * @param aObj Object to add a caller to. If NULL, this 206 * instance is effectively turned to no-op (where 207 * r c() will return S_OK).198 * instance is effectively turned to no-op (where hrc() will 199 * return S_OK). 208 200 * @param aLimited If |false|, then it's a regular caller, otherwise a 209 201 * limited caller. … … 268 260 * 269 261 * @param aObj Object to add a limited caller to. If NULL, this 270 * instance is effectively turned to no-op (where 271 * r c() will return S_OK).262 * instance is effectively turned to no-op (where hrc() will 263 * return S_OK). 272 264 */ 273 265 AutoLimitedCaller(VirtualBoxBase *aObj)
Note:
See TracChangeset
for help on using the changeset viewer.