src/core/model/attribute-helper.h
changeset 11097 caafe12b0378
parent 11035 4c13b42eabcd
child 11136 03bf8fa63bda
equal deleted inserted replaced
11096:e57bfdb4f12c 11097:caafe12b0378
   156   }
   156   }
   157 
   157 
   158 /**
   158 /**
   159  * \ingroup attributehelper
   159  * \ingroup attributehelper
   160  *
   160  *
   161  * Declare the attribute value class \p <name>Value
   161  * Declare the attribute value class \p \<name>Value
   162  * for underlying class \p type.
   162  * for underlying class \p type.
   163  *
   163  *
   164  * \param type The underlying type name
   164  * \param type The underlying type name
   165  * \param name The token to use in defining the accessor name.
   165  * \param name The token to use in defining the accessor name.
   166  *
   166  *
   196 
   196 
   197 
   197 
   198 /**
   198 /**
   199  * \ingroup attributehelper
   199  * \ingroup attributehelper
   200  *
   200  *
   201  * Declare the attribute value class \p <Name>Value
   201  * Declare the attribute value class \p \<Name>Value
   202  * for the class \p Name
   202  * for the class \p Name
   203  *
   203  *
   204  * \param Name the name of the class.
   204  * \param Name the name of the class.
   205  *
   205  *
   206  * This macro declares the class \c NameValue associated to class \c Name.
   206  * This macro declares the class \c NameValue associated to class \c Name.
   228 #define ATTRIBUTE_CONVERTER_DEFINE(type)
   228 #define ATTRIBUTE_CONVERTER_DEFINE(type)
   229 
   229 
   230 /**
   230 /**
   231  * \ingroup attributehelper
   231  * \ingroup attributehelper
   232  *
   232  *
   233  * Declare the AttributeChecker class \p <type>Checker
   233  * Declare the AttributeChecker class \p \<type>Checker
   234  * and the \c MakeTypeChecker function for class \p type.
   234  * and the \c MakeTypeChecker function for class \p type.
   235  *
   235  *
   236  * \param type the name of the class
   236  * \param type the name of the class
   237  *
   237  *
   238  * This macro declares the \p <type>Checker class and the associated
   238  * This macro declares the \p \<type>Checker class and the associated
   239  * \c MakeTypeChecker function.
   239  * \c MakeTypeChecker function.
   240  *
   240  *
   241  * (Note that the \p <type>Checker class needs no implementation
   241  * (Note that the \p \<type>Checker class needs no implementation
   242  * since it just inherits all its implementation from AttributeChecker.)
   242  * since it just inherits all its implementation from AttributeChecker.)
   243  *
   243  *
   244  * Typically invoked in the class header file.
   244  * Typically invoked in the class header file.
   245  */
   245  */
   246 #define ATTRIBUTE_CHECKER_DEFINE(type)                                  \
   246 #define ATTRIBUTE_CHECKER_DEFINE(type)                                  \
   250 
   250 
   251 /**
   251 /**
   252  * \ingroup attributehelper
   252  * \ingroup attributehelper
   253  *
   253  *
   254  * Define the class methods belonging to
   254  * Define the class methods belonging to
   255  * the attribute value class \p <name>Value 
   255  * the attribute value class \p \<name>Value 
   256  * of the underlying class \p type.
   256  * of the underlying class \p type.
   257  *
   257  *
   258  * \param type The underlying type name
   258  * \param type The underlying type name
   259  * \param name The token to use in defining the accessor name.
   259  * \param name The token to use in defining the accessor name.
   260  *
   260  *
   261  * This macro implements the \p <type>Value class methods
   261  * This macro implements the \p \<type>Value class methods
   262  * (including the \p <type>Value::SerializeToString
   262  * (including the \p \<type>Value::SerializeToString
   263  * and \p <type>Value::DeserializeFromString methods).
   263  * and \p \<type>Value::DeserializeFromString methods).
   264  *
   264  *
   265  * Typically invoked in the source file.
   265  * Typically invoked in the source file.
   266  */
   266  */
   267 #define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type,name)                  \
   267 #define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type,name)                  \
   268   name ## Value::name ## Value ()                                       \
   268   name ## Value::name ## Value ()                                       \
   295 
   295 
   296 /**
   296 /**
   297  * \ingroup attributehelper
   297  * \ingroup attributehelper
   298  *
   298  *
   299  * Define the class methods belonging to
   299  * Define the class methods belonging to
   300  * attribute value class \p <type>Value for class \p type.
   300  * attribute value class \p \<type>Value for class \p type.
   301  *
   301  *
   302  * \param type the name of the class.
   302  * \param type the name of the class.
   303  *
   303  *
   304  * This macro implements the \p <type>Value class methods
   304  * This macro implements the \p \<type>Value class methods
   305  * (including the \p <type>Value::SerializeToString
   305  * (including the \p \<type>Value::SerializeToString
   306  * and \p <type>Value::DeserializeFromString methods).
   306  * and \p \<type>Value::DeserializeFromString methods).
   307  *
   307  *
   308  * Typically invoked in the source file.
   308  * Typically invoked in the source file.
   309  */
   309  */
   310 #define ATTRIBUTE_VALUE_IMPLEMENT(type)                                 \
   310 #define ATTRIBUTE_VALUE_IMPLEMENT(type)                                 \
   311   ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (type,type)
   311   ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (type,type)
   354  *
   354  *
   355  * \param type the name of the class
   355  * \param type the name of the class
   356  *
   356  *
   357  * This macro declares:
   357  * This macro declares:
   358  *
   358  *
   359  *   - The attribute value class \p <type>Value,
   359  *   - The attribute value class \p \<type>Value,
   360  *
   360  *
   361  *   - The attribute accessor functions \c MakeTypeAccessor,
   361  *   - The attribute accessor functions \c MakeTypeAccessor,
   362  *
   362  *
   363  *   - The AttributeChecker class \p <type>Checker
   363  *   - The AttributeChecker class \p \<type>Checker
   364  *     and the \c MakeTypeChecker function,
   364  *     and the \c MakeTypeChecker function,
   365  *
   365  *
   366  * for class \p type.
   366  * for class \p type.
   367  *
   367  *
   368  * This macro should be invoked outside of the class
   368  * This macro should be invoked outside of the class
   380  *
   380  *
   381  * \param type the name of the class
   381  * \param type the name of the class
   382  *
   382  *
   383  * This macro implements
   383  * This macro implements
   384  *
   384  *
   385  *   - The \p <type>Value class methods,
   385  *   - The \p \<type>Value class methods,
   386  *
   386  *
   387  *   - The \c MakeTypeChecker function,
   387  *   - The \c MakeTypeChecker function,
   388  *
   388  *
   389  * for class \p type.
   389  * for class \p type.
   390  *
   390  *