VirtualBox

Changeset 14624 in vbox for trunk/src


Ignore:
Timestamp:
Nov 26, 2008 9:56:07 AM (16 years ago)
Author:
vboxsync
Message:

Main: typos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r14588 r14624  
    305305
    306306
    307 /** Special version of ComAssert that evaulates eval and breaks if expr fails */
     307/** Special version of ComAssert that evaluates eval and breaks if expr fails */
    308308#define ComAssertBreak(expr, eval)                \
    309309    if (1) { ComAssert (expr); if (!(expr)) { eval; break; } } else do {} while (0)
    310 /** Special version of ComAssertMsg that evaulates eval and breaks if expr fails */
     310/** Special version of ComAssertMsg that evaluates eval and breaks if expr fails */
    311311#define ComAssertMsgBreak(expr, a, eval)          \
    312312    if (1)  { ComAssertMsg (expr, a); if (!(expr)) { eval; break; } } else do {} while (0)
    313 /** Special version of ComAssertRC that evaulates eval and breaks if vrc does not succeed */
     313/** Special version of ComAssertRC that evaluates eval and breaks if vrc does not succeed */
    314314#define ComAssertRCBreak(vrc, eval)               \
    315315    if (1)  { ComAssertRC (vrc); if (!RT_SUCCESS (vrc)) { eval; break; } } else do {} while (0)
    316 /** Special version of ComAssertMsgRC that evaulates eval and breaks if vrc does not succeed */
     316/** Special version of ComAssertMsgRC that evaluates eval and breaks if vrc does not succeed */
    317317#define ComAssertMsgRCBreak(vrc, msg, eval)       \
    318318    if (1)  { ComAssertMsgRC (vrc, msg); if (!RT_SUCCESS (vrc)) { eval; break; } } else do {} while (0)
    319 /** Special version of ComAssertFailed that evaulates eval and breaks */
     319/** Special version of ComAssertFailed that evaluates eval and breaks */
    320320#define ComAssertFailedBreak(eval)                \
    321321    if (1)  { ComAssertFailed(); { eval; break; } } else do {} while (0)
    322 /** Special version of ComAssertMsgFailed that evaulates eval and breaks */
     322/** Special version of ComAssertMsgFailed that evaluates eval and breaks */
    323323#define ComAssertMsgFailedBreak(msg, eval)        \
    324324    if (1)  { ComAssertMsgFailed (msg); { eval; break; } } else do {} while (0)
    325 /** Special version of ComAssertComRC that evaulates eval and breaks if rc does not succeed */
     325/** Special version of ComAssertComRC that evaluates eval and breaks if rc does not succeed */
    326326#define ComAssertComRCBreak(rc, eval)             \
    327327    if (1)  { ComAssertComRC (rc); if (!SUCCEEDED (rc)) { eval; break; } } else do {} while (0)
     
    331331
    332332
    333 /** Special version of ComAssert that evaulates eval and throws it if expr fails */
     333/** Special version of ComAssert that evaluates eval and throws it if expr fails */
    334334#define ComAssertThrow(expr, eval)                \
    335335    if (1) { ComAssert (expr); if (!(expr)) { throw (eval); } } else do {} while (0)
    336 /** Special version of ComAssertMsg that evaulates eval and throws it if expr fails */
     336/** Special version of ComAssertMsg that evaluates eval and throws it if expr fails */
    337337#define ComAssertMsgThrow(expr, a, eval)          \
    338338    if (1)  { ComAssertMsg (expr, a); if (!(expr)) { throw (eval); } } else do {} while (0)
    339 /** Special version of ComAssertRC that evaulates eval and throws it if vrc does not succeed */
     339/** Special version of ComAssertRC that evaluates eval and throws it if vrc does not succeed */
    340340#define ComAssertRCThrow(vrc, eval)               \
    341341    if (1)  { ComAssertRC (vrc); if (!RT_SUCCESS (vrc)) { throw (eval); } } else do {} while (0)
    342 /** Special version of ComAssertMsgRC that evaulates eval and throws it if vrc does not succeed */
     342/** Special version of ComAssertMsgRC that evaluates eval and throws it if vrc does not succeed */
    343343#define ComAssertMsgRCThrow(vrc, msg, eval)       \
    344344    if (1)  { ComAssertMsgRC (vrc, msg); if (!RT_SUCCESS (vrc)) { throw (eval); } } else do {} while (0)
    345 /** Special version of ComAssertFailed that evaulates eval and throws it */
     345/** Special version of ComAssertFailed that evaluates eval and throws it */
    346346#define ComAssertFailedThrow(eval)                \
    347347    if (1)  { ComAssertFailed(); { throw (eval); } } else do {} while (0)
    348 /** Special version of ComAssertMsgFailed that evaulates eval and throws it */
     348/** Special version of ComAssertMsgFailed that evaluates eval and throws it */
    349349#define ComAssertMsgFailedThrow(msg, eval)        \
    350350    if (1)  { ComAssertMsgFailed (msg); { throw (eval); } } else do {} while (0)
    351 /** Special version of ComAssertComRC that evaulates eval and throws it if rc does not succeed */
     351/** Special version of ComAssertComRC that evaluates eval and throws it if rc does not succeed */
    352352#define ComAssertComRCThrow(rc, eval)             \
    353353    if (1)  { ComAssertComRC (rc); if (!SUCCEEDED (rc)) { throw (eval); } } else do {} while (0)
     
    361361 * Checks that the pointer argument is not NULL and returns E_INVALIDARG +
    362362 * extended error info on failure.
    363  * @param arg   Input pointer-type argument (strings, interace pointers...)
     363 * @param arg   Input pointer-type argument (strings, interface pointers...)
    364364 */
    365365#define CheckComArgNotNull(arg) \
     
    372372 * Checks that safe array argument is not NULL and returns E_INVALIDARG +
    373373 * extended error info on failure.
    374  * @param arg   Input safe array argument (strings, interace pointers...)
     374 * @param arg   Input safe array argument (strings, interface pointers...)
    375375 */
    376376#define CheckComArgSafeArrayNotNull(arg) \
     
    448448
    449449/**
    450  * Sets the extended error info and returns E_NOTIMIL.
     450 * Sets the extended error info and returns E_NOTIMPL.
    451451 * @param method    Method that is not implemented.
    452452 */
     
    462462 *  Checks whether this object is ready or not. Objects are typically ready
    463463 *  after they are successfully created by their parent objects and become
    464  *  not ready when the respective parent itsef becomes not ready or gets
     464 *  not ready when the respective parent itself becomes not ready or gets
    465465 *  destroyed while a reference to the child is still held by the caller
    466466 *  (which prevents it from destruction).
     
    481481
    482482/**
    483  *  Declares an empty construtor and destructor for the given class.
     483 *  Declares an empty constructor and destructor for the given class.
    484484 *  This is useful to prevent the compiler from generating the default
    485485 *  ctor and dtor, which in turn allows to use forward class statements
     
    488488 *  by constructors and by the destructor of the class).
    489489 *
    490  *  This macro is to be palced within (the public section of) the class
     490 *  This macro is to be placed within (the public section of) the class
    491491 *  declaration. Its counterpart, DEFINE_EMPTY_CTOR_DTOR, must be placed
    492492 *  somewhere in one of the translation units (usually .cpp source files).
     
    497497
    498498/**
    499  *  Defines an empty construtor and destructor for the given class.
     499 *  Defines an empty constructor and destructor for the given class.
    500500 *  See DECLARE_EMPTY_CTOR_DTOR for more info.
    501501 */
     
    547547 *
    548548 * This makes it possible to have intermediate base classes used by several
    549  * components that implement some common interface fuctionality but still let
    550  * the final component classe choose what VirtualBoxBase variant it wants to
     549 * components that implement some common interface functionality but still let
     550 * the final component classes choose what VirtualBoxBase variant it wants to
    551551 * use.
    552552 *
    553553 * Among the basic functionality implemented by this class is the primary object
    554554 * state that indicates if the object is ready to serve the calls, and if not,
    555  * what stage it is currently at. Here is the pirmary state diagram:
     555 * what stage it is currently at. Here is the primary state diagram:
    556556 *
    557557 *              +-------------------------------------------------------+
     
    594594 *
    595595 * 1) Use the above Auto*Span classes to perform state transitions. See the
    596  *    individual class doescriptions for details.
     596 *    individual class descriptions for details.
    597597 *
    598598 * 2) All public methods of subclasses (i.e. all methods that can be called
     
    600600 *    standard prolog as described in the AutoCaller and AutoLimitedCaller
    601601 *    documentation. Alternatively, they must use addCaller()/releaseCaller()
    602  *    directly (and therefire have both the prolog and the epilog), but this is
     602 *    directly (and therefore have both the prolog and the epilog), but this is
    603603 *    not recommended.
    604604 */
     
    668668     *                  used.
    669669     *
    670      * @note It is preferrable to use the AutoCaller and AutoLimitedCaller
     670     * @note It is preferable to use the AutoCaller and AutoLimitedCaller
    671671     *       classes than specify the @a aLimited argument, for better
    672672     *       self-descriptiveness.
     
    856856     * #setLimited() or to Result::Failed using #setFailed(). Please don't
    857857     * forget to set the correct success status before getting the AutoInitSpan
    858      * variable destryed (for example, by performing an early return from
     858     * variable destroyed (for example, by performing an early return from
    859859     * the init() method)!
    860860     *
     
    10321032     *     AutoUninitSpan autoUninitSpan (this);
    10331033     *     if (autoUninitSpan.uninitDone())
    1034      *         retrun;
     1034     *         return;
    10351035     *     ...
    10361036     * }
     
    12211221        { \
    12221222            if (state == VirtualBoxBaseProto::Limited) \
    1223                 rc = setError (rc, tr ("The object functonality is limited")); \
     1223                rc = setError (rc, tr ("The object functionality is limited")); \
    12241224            else \
    12251225                rc = setError (rc, tr ("The object is not ready")); \
     
    12541254     *  Virtual unintialization method. Called during parent object's
    12551255     *  uninitialization, if the given subclass instance is a dependent child of
    1256      *  a class dervived from VirtualBoxBaseWithChildren (@sa
     1256     *  a class derived from VirtualBoxBaseWithChildren (@sa
    12571257     *  VirtualBoxBaseWithChildren::addDependentChild). In this case, this
    1258      *  method's impelemtation must call setReady (false),
     1258     *  method's implementation must call setReady (false),
    12591259     */
    12601260    virtual void uninit() {}
     
    13471347     * @return Translated version of the source string in UTF-8 encoding, or
    13481348     *      the source string itself if the translation is not found in the
    1349      *      specifiecd context.
     1349     *      specified context.
    13501350     */
    13511351    inline static const char *tr (const char *aSourceText,
     
    14301430     * This way, error/warning objects are stacked together and form a chain of
    14311431     * errors where the most recent error is the first one retrieved by the
    1432      * calling party, the preceeding error is what the
     1432     * calling party, the preceding error is what the
    14331433     * IVirtualBoxErrorInfo::next attribute of the first error points to, and so
    1434      * on, upto the first error or warning occured which is the last in the
     1434     * on, up to the first error or warning occurred which is the last in the
    14351435     * chain. See IVirtualBoxErrorInfo documentation for more info.
    14361436     *
     
    14411441     * next error or warning object overwrites the previous one.
    14421442     *
    1443      * Note that the caller of a COM methid uses a non-S_OK result code to
     1443     * Note that the caller of a COM method uses a non-S_OK result code to
    14441444     * decide if the method has returned an error (negative codes) or a warning
    14451445     * (positive non-zero codes) and will query extended error info only in
     
    14481448     * error or warning but continues its execution, the functionality provided
    14491449     * by the base com::FWResult class becomes very useful because it allows to
    1450      * preseve the error or the warning result code even if it is later assigned
     1450     * preserve the error or the warning result code even if it is later assigned
    14511451     * a S_OK value multiple times. See com::FWResult for details.
    14521452     *
     
    15031503             * it in case of expressions like |MultiResult rc = E_FAIL;|. But
    15041504             * we assert since the optimizer should actually avoid the
    1505              * temporary and call the other constructor directly istead. */
     1505             * temporary and call the other constructor directly instead. */
    15061506            AssertFailed();
    15071507            init();
     
    15211521             * it in case of expressions like |MultiResult rc = E_FAIL;|. But
    15221522             * we assert since the optimizer should actually avoid the
    1523              * temporary and call the other constructor directly istead. */
     1523             * temporary and call the other constructor directly instead. */
    15241524            AssertFailed();
    15251525            com::FWResult::operator= (aThat);
     
    16721672     *
    16731673     *  @param  aResultCode result (error) code, must not be S_OK
    1674      *  @param  aIID        IID of the intrface that defines the error
     1674     *  @param  aIID        IID of the interface that defines the error
    16751675     *  @param  aComponent  name of the component that generates the error
    16761676     *  @param  aText       error message (must not be null), an RTStrPrintf-like
     
    16791679     *
    16801680     *  @return
    1681      *      the error argument, for convenience, If an error occures while
     1681     *      the error argument, for convenience, If an error occurs while
    16821682     *      creating error info itself, that error is returned instead of the
    16831683     *      error argument.
     
    16971697    /**
    16981698     *  This method is the same as #setError() except that it makes sure @a
    1699      *  aResultCode doesn't have the error severty bit (31) set when passed
     1699     *  aResultCode doesn't have the error severity bit (31) set when passed
    17001700     *  down to the created IVirtualBoxErrorInfo object.
    17011701     *
    1702      *  The error severity bit is always cleared by this call, thereofe you can
    1703      *  use ordinary E_XXX result code constancs, for convenience. However, this
    1704      *  behavior may be non-stanrard on some COM platforms.
     1702     *  The error severity bit is always cleared by this call, thereof you can
     1703     *  use ordinary E_XXX result code constants, for convenience. However, this
     1704     *  behavior may be non-standard on some COM platforms.
    17051705     */
    17061706    static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID,
     
    17511751    /**
    17521752     *  This method is the same as #setError() except that it makes sure @a
    1753      *  aResultCode doesn't have the error severty bit (31) set when passed
     1753     *  aResultCode doesn't have the error severity bit (31) set when passed
    17541754     *  down to the created IVirtualBoxErrorInfo object.
    17551755     *
    1756      *  The error severity bit is always cleared by this call, thereofe you can
    1757      *  use ordinary E_XXX result code constancs, for convenience. However, this
    1758      *  behavior may be non-stanrard on some COM platforms.
     1756     *  The error severity bit is always cleared by this call, thereof you can
     1757     *  use ordinary E_XXX result code constants, for convenience. However, this
     1758     *  behavior may be non-standard on some COM platforms.
    17591759     */
    17601760    static HRESULT setWarning (HRESULT aResultCode, const char *aText, ...)
     
    17871787    /**
    17881788     *  This method is the same as #setErrorV() except that it makes sure @a
    1789      *  aResultCode doesn't have the error severty bit (31) set when passed
     1789     *  aResultCode doesn't have the error severity bit (31) set when passed
    17901790     *  down to the created IVirtualBoxErrorInfo object.
    17911791     *
    1792      *  The error severity bit is always cleared by this call, thereofe you can
    1793      *  use ordinary E_XXX result code constancs, for convenience. However, this
    1794      *  behavior may be non-stanrard on some COM platforms.
     1792     *  The error severity bit is always cleared by this call, thereof you can
     1793     *  use ordinary E_XXX result code constants, for convenience. However, this
     1794     *  behavior may be non-standard on some COM platforms.
    17951795     */
    17961796    static HRESULT setWarningV (HRESULT aResultCode, const char *aText,
     
    18081808     *  (a value of C::getComponentName()).
    18091809     *
    1810      *  This method is preferred iy you have a ready (translated and formatted)
     1810     *  This method is preferred if you have a ready (translated and formatted)
    18111811     *  Bstr string, because it omits an extra conversion Utf8Str -> Bstr.
    18121812     *
     
    18231823    /**
    18241824     *  This method is the same as #setErrorBstr() except that it makes sure @a
    1825      *  aResultCode doesn't have the error severty bit (31) set when passed
     1825     *  aResultCode doesn't have the error severity bit (31) set when passed
    18261826     *  down to the created IVirtualBoxErrorInfo object.
    18271827     *
    1828      *  The error severity bit is always cleared by this call, thereofe you can
    1829      *  use ordinary E_XXX result code constancs, for convenience. However, this
    1830      *  behavior may be non-stanrard on some COM platforms.
     1828     *  The error severity bit is always cleared by this call, thereof you can
     1829     *  use ordinary E_XXX result code constants, for convenience. However, this
     1830     *  behavior may be non-standard on some COM platforms.
    18311831     */
    18321832    static HRESULT setWarningBstr (HRESULT aResultCode, const Bstr &aText)
     
    18591859    /**
    18601860     *  This method is the same as #setError() except that it makes sure @a
    1861      *  aResultCode doesn't have the error severty bit (31) set when passed
     1861     *  aResultCode doesn't have the error severity bit (31) set when passed
    18621862     *  down to the created IVirtualBoxErrorInfo object.
    18631863     *
    1864      *  The error severity bit is always cleared by this call, thereofe you can
    1865      *  use ordinary E_XXX result code constancs, for convenience. However, this
    1866      *  behavior may be non-stanrard on some COM platforms.
     1864     *  The error severity bit is always cleared by this call, thereof you can
     1865     *  use ordinary E_XXX result code constants, for convenience. However, this
     1866     *  behavior may be non-standard on some COM platforms.
    18671867     */
    18681868    static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID,
     
    19011901
    19021902/**
    1903  *  Base class to track VirtualBoxBase chlidren of the component.
    1904  *
    1905  *  This class is a preferrable VirtualBoxBase replacement for components
     1903 *  Base class to track VirtualBoxBase children of the component.
     1904 *
     1905 *  This class is a preferable VirtualBoxBase replacement for components
    19061906 *  that operate with collections of child components. It gives two useful
    19071907 *  possibilities:
     
    20332033 *      actual class of the child object (to get access to its "internal"
    20342034 *      non-interface methods) provided that no other child components implement
    2035  *      the same orignial COM interface IUnknown is queried from.
     2035 *      the same original COM interface IUnknown is queried from.
    20362036 * </li><li>
    20372037 *      When the parent object uninitializes itself, it can easily unintialize
     
    20532053 * it gets uninitialized, it must call uninit() methods of individual children
    20542054 * manually to disconnect them; a failure to do so will cause crashes in these
    2055  * methods when chidren get destroyed. The same applies to children not calling
    2056  * #removeDependentChild() when getting destrooyed.
     2055 * methods when children get destroyed. The same applies to children not calling
     2056 * #removeDependentChild() when getting destroyed.
    20572057 *
    20582058 * Note that children added by #addDependentChild() are <b>weakly</b> referenced
     
    20712071 *
    20722072 * @todo This is a VirtualBoxBaseWithChildren equivalent that uses the
    2073  *       VirtualBoxBaseNEXT implementation. Will completely supercede
     2073 *       VirtualBoxBaseNEXT implementation. Will completely supersede
    20742074 *       VirtualBoxBaseWithChildren after the old VirtualBoxBase implementation
    20752075 *       has gone.
     
    23592359
    23602360/**
    2361  * Base class to track component's chlidren of the particular type.
     2361 * Base class to track component's children of the particular type.
    23622362 *
    23632363 * This class is similar to VirtualBoxBaseWithChildrenNEXT with the exception
     
    23792379 *
    23802380 * @todo This is a VirtualBoxBaseWithChildren equivalent that uses the
    2381  *       VirtualBoxBaseNEXT implementation. Will completely supercede
     2381 *       VirtualBoxBaseNEXT implementation. Will completely supersede
    23822382 *       VirtualBoxBaseWithChildren after the old VirtualBoxBase implementation
    23832383 *       has gone.
     
    25082508     * these methods need to call the parent object during uninitialization,
    25092509     * #uninitDependentChildren() must be called before the relevant part of the
    2510      * parent is uninitialized: usually at the begnning of the parent
     2510     * parent is uninitialized: usually at the beginning of the parent
    25112511     * uninitialization sequence.
    25122512     *
     
    28292829
    28302830/**
    2831  * Settinsg API additions.
     2831 * Settings API additions.
    28322832 */
    28332833namespace settings
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette