qthighway/xqservice/src/xqserviceipcmarshal.cpp
changeset 24 9d760f716ca8
parent 1 2b40d63a9c3d
equal deleted inserted replaced
19:46686fb6258c 24:9d760f716ca8
    20 */
    20 */
    21 
    21 
    22 #include "xqserviceipcmarshal.h"
    22 #include "xqserviceipcmarshal.h"
    23 
    23 
    24 /*!
    24 /*!
    25     \macro Q_DECLARE_USER_METATYPE(TYPE)
    25     \file xqserviceipcmarshal.h
       
    26 */
       
    27 
       
    28 /*!
       
    29     \def Q_DECLARE_USER_METATYPE_NO_OPERATORS(TYPE)
       
    30 
       
    31     This macro declares \a TYPE as a user-defined type within the Qt
       
    32     metatype system. It should be used in header files, just after
       
    33     the declaration of TYPE. A corresponding invocation of
       
    34     Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE) should appear in
       
    35     a source file. This macro should be used instead of
       
    36     Q_DECLARE_USER_METATYPE when no need to declare datastream operators.
       
    37     
       
    38     This example declares the class MyClass that doesn't need to declare
       
    39     datastream operators:
       
    40     
       
    41     \code
       
    42         Q_DECLARE_USER_METATYPE(MyClass)
       
    43     \endcode
       
    44     
       
    45     \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
       
    46 */
       
    47 
       
    48 /*!
       
    49     \def Q_DECLARE_USER_METATYPE(TYPE)
    26 
    50 
    27     This macro declares \a TYPE as a user-defined type within the
    51     This macro declares \a TYPE as a user-defined type within the
    28     Qt metatype system.  It should be used in header files, just
    52     Qt metatype system.  It should be used in header files, just
    29     after the declaration of \a TYPE.  A corresponding invocation
    53     after the declaration of \a TYPE.  A corresponding invocation
    30     of Q_IMPLEMENT_USER_METATYPE should appear in a source file.
    54     of Q_IMPLEMENT_USER_METATYPE should appear in a source file.
    37 
    61 
    38     \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
    62     \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
    39 */
    63 */
    40 
    64 
    41 /*!
    65 /*!
    42     \macro Q_DECLARE_USER_METATYPE_TYPEDEF(TAG,TYPE)
    66     \def Q_DECLARE_USER_METATYPE_TYPEDEF(TAG,TYPE)
    43 
    67 
    44     This macro declares \a TYPE as a user-defined type within the
    68     This macro declares \a TYPE as a user-defined type within the
    45     Qt metatype system, but declares it as a typedef for a pre-existing
    69     Qt metatype system, but declares it as a typedef for a pre-existing
    46     metatype.  The \a TAG is an identifier that will usually be the same
    70     metatype.  The \a TAG is an identifier that will usually be the same
    47     as \a TYPE, but may be slightly different if \a TYPE is nested.
    71     as \a TYPE, but may be slightly different if \a TYPE is nested.
    51     This macro should be used in header files, just after the declaration
    75     This macro should be used in header files, just after the declaration
    52     of \a TYPE.  A corresponding invocation of
    76     of \a TYPE.  A corresponding invocation of
    53     Q_IMPLEMENT_USER_METATYPE_TYPEDEF should appear in a source file.
    77     Q_IMPLEMENT_USER_METATYPE_TYPEDEF should appear in a source file.
    54 
    78 
    55     This example declares the types \c{Foo} and \c{Bar} as typedef aliases.
    79     This example declares the types \c{Foo} and \c{Bar} as typedef aliases.
    56 s
    80 
    57     \code
    81     \code
    58         typedef Foo Bar;
    82         typedef Foo Bar;
    59         Q_DECLARE_USER_METATYPE(Foo)
    83         Q_DECLARE_USER_METATYPE(Foo)
    60         Q_DECLARE_USER_METATYPE_TYPEDEF(Bar, Bar)
    84         Q_DECLARE_USER_METATYPE_TYPEDEF(Bar, Bar)
    61     \endcode
    85     \endcode
    62 
    86 
    63     \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
    87     \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
    64 */
    88 */
    65 
    89 
    66 /*!
    90 /*!
    67     \macro Q_DECLARE_USER_METATYPE_ENUM(TYPE)
    91     \def Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE)
       
    92 
       
    93     This macro implements the code necessary to register \a TYPE as a user-defined
       
    94     type within the Qt metatype system.
       
    95     
       
    96     This example implements the registration, logic for the class MyClass that
       
    97     doesn't need to declare datastream operators:
       
    98     
       
    99     \code
       
   100         Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(MyClass)
       
   101     \endcode
       
   102     
       
   103     On most systems, this macro will arrange for registration to be performed at program
       
   104     startup. On systems that don't support global constructors properly, it may be
       
   105     necessary to manually call Q_REGISTER_USER_METATYPE().
       
   106 
       
   107     \sa Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_DECLARE_METATYPE(), Q_REGISTER_USER_METATYPE()
       
   108 */
       
   109 
       
   110 /*!
       
   111     \def Q_DECLARE_USER_METATYPE_ENUM(TYPE)
    68 
   112 
    69     This macro declares \a TYPE as a user-defined enumerated type within
   113     This macro declares \a TYPE as a user-defined enumerated type within
    70     the Qt metatype system.  It should be used in header files, just
   114     the Qt metatype system.  It should be used in header files, just
    71     after the declaration of \a TYPE.  A corresponding invocation
   115     after the declaration of \a TYPE.  A corresponding invocation
    72     of Q_IMPLEMENT_USER_METATYPE_ENUM should appear in a source file.
   116     of Q_IMPLEMENT_USER_METATYPE_ENUM should appear in a source file.
    82 
   126 
    83     \sa Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_DECLARE_METATYPE(), Q_REGISTER_USER_METATYPE()
   127     \sa Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_DECLARE_METATYPE(), Q_REGISTER_USER_METATYPE()
    84 */
   128 */
    85 
   129 
    86 /*!
   130 /*!
    87     \macro Q_IMPLEMENT_USER_METATYPE(TYPE)
   131     \def Q_IMPLEMENT_USER_METATYPE(TYPE)
    88 
   132 
    89     This macro implements the code necessary to register \a TYPE
   133     This macro implements the code necessary to register \a TYPE
    90     as a user-defined type within the Qt metatype system.
   134     as a user-defined type within the Qt metatype system.
    91 
   135 
    92     This example implements the registration logic for the class \c{MyClass}:
   136     This example implements the registration logic for the class \c{MyClass}:
   102 
   146 
   103     \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
   147     \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
   104 */
   148 */
   105 
   149 
   106 /*!
   150 /*!
   107     \macro Q_IMPLEMENT_USER_METATYPE_TYPEDEF(TAG,TYPE)
   151     \def Q_IMPLEMENT_USER_METATYPE_TYPEDEF(TAG,TYPE)
   108 
   152 
   109     This macro implements the code necessary to register \a TYPE
   153     This macro implements the code necessary to register \a TYPE
   110     as a user-defined typedef alias within the Qt metatype system.
   154     as a user-defined typedef alias within the Qt metatype system.
   111     The \a TAG should be the same as the tag used in the
   155     The \a TAG should be the same as the tag used in the
   112     corresponding invocation of Q_DECLARE_USER_METATYPE_TYPEDEF.
   156     corresponding invocation of Q_DECLARE_USER_METATYPE_TYPEDEF.
   127 
   171 
   128     \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
   172     \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
   129 */
   173 */
   130 
   174 
   131 /*!
   175 /*!
   132     \macro Q_IMPLEMENT_USER_METATYPE_ENUM(TYPE)
   176     \def Q_IMPLEMENT_USER_METATYPE_ENUM(TYPE)
   133 
   177 
   134     This macro implements the code necessary to register \a TYPE
   178     This macro implements the code necessary to register \a TYPE
   135     as a user-defined type within the Qt metatype system.  \a TYPE
   179     as a user-defined type within the Qt metatype system.  \a TYPE
   136     is assumed to be an enumerated type.  Using this macro relieves
   180     is assumed to be an enumerated type.  Using this macro relieves
   137     the need to manually declare \c{operator<<} and \c{operator>>}
   181     the need to manually declare \c{operator<<} and \c{operator>>}
   151 
   195 
   152     \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_DECLARE_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE(), Q_REGISTER_USER_METATYPE()
   196     \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_DECLARE_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE(), Q_REGISTER_USER_METATYPE()
   153 */
   197 */
   154 
   198 
   155 /*!
   199 /*!
   156     \macro Q_REGISTER_USER_METATYPE(TYPE)
   200     \def Q_REGISTER_USER_METATYPE(TYPE)
   157 
   201 
   158     This macro can be called as a function to manually register \a TYPE
   202     This macro can be called as a function to manually register \a TYPE
   159     as a user-defined type within the Qt metatype system.  It is only
   203     as a user-defined type within the Qt metatype system.  It is only
   160     needed if the system does not support global constructors properly.
   204     needed if the system does not support global constructors properly.
   161 
   205