17 #ifndef OPENDDS_IDL_ANNOTATIONS_HEADER 18 #define OPENDDS_IDL_ANNOTATIONS_HEADER 20 #include "../Versioned_Namespace.h" 22 #include <ast_expression.h> 35 class AST_Annotation_Decl;
36 class AST_Annotation_Appl;
50 T* annotation =
new T;
51 map_[annotation->fullname()] = annotation;
56 typedef std::map<std::string, Annotation*>
MapType;
68 virtual std::string definition()
const = 0;
69 virtual std::string
name()
const = 0;
70 virtual std::string module()
const;
71 virtual std::string fullname()
const;
73 AST_Annotation_Decl* declaration()
const;
74 AST_Annotation_Appl* find_on(AST_Decl* node)
const;
82 const char* member_name,
83 AST_Expression::ExprType type);
86 const char* member_name);
89 const char* member_name);
92 const char* member_name);
101 : absent_value(value)
110 template <
typename T>
119 AST_Annotation_Appl* appl = find_on(node);
120 if (!appl) {
return false; }
122 value = value_from_appl(appl);
145 template <
typename T>
162 std::string definition()
const;
163 std::string
name()
const;
165 bool union_value(AST_Union* node)
const;
184 std::string definition()
const;
185 std::string
name()
const;
188 TopicValue value_from_appl(AST_Annotation_Appl* appl)
const;
195 std::string definition()
const;
196 std::string
name()
const;
203 std::string definition()
const;
204 std::string
name()
const;
211 std::string definition()
const;
212 std::string
name()
const;
228 std::string definition()
const;
229 std::string
name()
const;
236 std::string definition()
const;
237 std::string
name()
const;
248 std::string definition()
const;
249 std::string
name()
const;
260 std::string definition()
const;
261 std::string
name()
const;
272 std::string definition()
const;
273 std::string
name()
const;
286 std::string definition()
const;
287 std::string
name()
const;
294 std::string definition()
const;
295 std::string
name()
const;
302 std::string definition()
const;
303 std::string
name()
const;
310 std::string definition()
const;
311 std::string
name()
const;
330 std::string definition()
const;
331 std::string
name()
const;
357 xcdr1 |= other.
xcdr1;
358 xcdr2 |= other.
xcdr2;
373 return xcdr1 && !xcdr2 && !xml;
378 return xcdr1 && (xcdr2 || xml);
383 return !xcdr1 && xcdr2 && !xml;
388 return xcdr2 && (xcdr1 || xml);
393 return !xcdr1 && !xcdr2 && xml;
398 return xml && (xcdr1 || xcdr2);
409 std::string definition()
const;
410 std::string
name()
const;
411 std::string module()
const;
432 " module internal {\n" 433 " @annotation no_dynamic_data_adapter {\n" 441 return "no_dynamic_data_adapter";
446 return "::OpenDDS::internal::";
460 " module internal {\n" 461 " @annotation special_serialization {\n" 462 " string template_name default \"\";\n" 470 return "special_serialization";
475 return "::OpenDDS::internal::";
AST_Annotation_Decl * declaration_
std::string definition() const
const LogLevel::Value value
std::string value_from_appl(AST_Annotation_Appl *appl) const
bool get_bool_annotation_member_value(AST_Annotation_Appl *appl, const char *member_name)
void add(const DataRepresentation &other)
AbsentValue(const T &value)
ACE_UINT32 get_u32_annotation_member_value(AST_Annotation_Appl *appl, const char *member_name)
std::string module() const
Annotation * operator[](const std::string &annotation) const
AST_Expression::AST_ExprValue * get_annotation_member_ev(AST_Annotation_Appl *appl, const char *member_name, AST_Expression::ExprType type)
bool not_only_xcdr1() const
std::map< std::string, Annotation * > MapType
std::string definition() const
std::string get_str_annotation_member_value(AST_Annotation_Appl *appl, const char *member_name)
bool not_only_xcdr2() const
virtual T value_from_appl(AST_Annotation_Appl *) const
virtual bool node_value_exists(AST_Decl *node, T &value) const
T value_from_appl(AST_Annotation_Appl *appl) const
MustUnderstandAnnotation()
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
std::string module() const
The Internal API and Implementation of OpenDDS.
bool not_only_xml() const