90 /** |
90 /** |
91 * \ingroup AttributeHelper |
91 * \ingroup AttributeHelper |
92 * \param type the name of the class |
92 * \param type the name of the class |
93 * |
93 * |
94 * This macro defines and generates the code for the implementation |
94 * This macro defines and generates the code for the implementation |
95 * of the MakeXXXAccessor template functions. This macro is typically |
95 * of the \c Make<type>Accessor template functions. This macro is typically |
96 * invoked in a class header to allow users of this class to view and |
96 * invoked in a class header to allow users of this class to view and |
97 * use the template functions defined here. This macro is implemented |
97 * use the template functions defined here. This macro is implemented |
98 * through the helper templates functions ns3::MakeAccessorHelper<>. |
98 * through the helper templates functions ns3::MakeAccessorHelper<>. |
99 */ |
99 */ |
100 #define ATTRIBUTE_ACCESSOR_DEFINE(type) \ |
100 #define ATTRIBUTE_ACCESSOR_DEFINE(type) \ |
132 |
132 |
133 /** |
133 /** |
134 * \ingroup AttributeHelper |
134 * \ingroup AttributeHelper |
135 * \param type the name of the class. |
135 * \param type the name of the class. |
136 * |
136 * |
137 * This macro defines the class XXXValue associated to class XXX. |
137 * This macro defines the class \c typeValue associated to class \c type. |
138 * This macro is typically invoked in a class header. |
138 * This macro is typically invoked in the class header file. |
139 */ |
139 */ |
140 #define ATTRIBUTE_VALUE_DEFINE(type) \ |
140 #define ATTRIBUTE_VALUE_DEFINE(type) \ |
141 ATTRIBUTE_VALUE_DEFINE_WITH_NAME (type,type) |
141 ATTRIBUTE_VALUE_DEFINE_WITH_NAME (type,type) |
142 |
142 |
143 |
143 |
144 /** |
144 /** |
145 * \ingroup AttributeHelper |
145 * \ingroup AttributeHelper |
146 * \param type the name of the class |
146 * \param type the name of the class |
147 * |
147 * |
148 * This macro defines the conversion operators for class XXX to and |
148 * This macro defines the conversion operators for class \c type to and |
149 * from instances of type Attribute. |
149 * from instances of type Attribute. |
150 * Typically invoked from xxx.h. |
150 * Typically invoked in the class header file. |
151 */ |
151 */ |
152 #define ATTRIBUTE_CONVERTER_DEFINE(type) |
152 #define ATTRIBUTE_CONVERTER_DEFINE(type) |
153 |
153 |
154 /** |
154 /** |
155 * \ingroup AttributeHelper |
155 * \ingroup AttributeHelper |
156 * \param type the name of the class |
156 * \param type the name of the class |
157 * |
157 * |
158 * This macro defines the XXXChecker class and the associated |
158 * This macro defines the \c typeChecker class and the associated |
159 * MakeXXXChecker function. |
159 * \c Make<type>Checker function. |
160 * Typically invoked from xxx.h. |
160 * Typically invoked in the class header file.. |
161 */ |
161 */ |
162 #define ATTRIBUTE_CHECKER_DEFINE(type) \ |
162 #define ATTRIBUTE_CHECKER_DEFINE(type) \ |
163 class type ## Checker : public AttributeChecker {}; \ |
163 class type ## Checker : public AttributeChecker {}; \ |
164 Ptr<const AttributeChecker> Make ## type ## Checker (void); \ |
164 Ptr<const AttributeChecker> Make ## type ## Checker (void); \ |
165 |
165 |
195 |
195 |
196 /** |
196 /** |
197 * \ingroup AttributeHelper |
197 * \ingroup AttributeHelper |
198 * \param type the name of the class. |
198 * \param type the name of the class. |
199 * |
199 * |
200 * This macro implements the XXXValue class (including the |
200 * This macro implements the \c typeValue class (including the |
201 * XXXValue::SerializeToString and XXXValue::DeserializeFromString |
201 * \c typeValue::SerializeToString and \c typeValue::DeserializeFromString |
202 * methods). |
202 * methods). |
203 * Typically invoked from xxx.cc. |
203 * Typically invoked in the source file. |
204 */ |
204 */ |
205 #define ATTRIBUTE_VALUE_IMPLEMENT(type) \ |
205 #define ATTRIBUTE_VALUE_IMPLEMENT(type) \ |
206 ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (type,type) |
206 ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (type,type) |
207 |
207 |
208 |
208 |
209 /** |
209 /** |
210 * \ingroup AttributeHelper |
210 * \ingroup AttributeHelper |
211 * \param type the name of the class |
211 * \param type the name of the class |
212 * |
212 * |
213 * This macro implements the MakeXXXChecker function. |
213 * This macro implements the \c Make<type>Checker function. |
214 * Typically invoked from xxx.cc. |
214 * Typically invoked in the source file.. |
215 */ |
215 */ |
216 #define ATTRIBUTE_CHECKER_IMPLEMENT(type) \ |
216 #define ATTRIBUTE_CHECKER_IMPLEMENT(type) \ |
217 Ptr<const AttributeChecker> Make ## type ## Checker (void) \ |
217 Ptr<const AttributeChecker> Make ## type ## Checker (void) \ |
218 { \ |
218 { \ |
219 return MakeSimpleAttributeChecker<type ## Value,type ## Checker> (# type "Value", # type); \ |
219 return MakeSimpleAttributeChecker<type ## Value,type ## Checker> (# type "Value", # type); \ |