OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Private Member Functions | List of all members
TopicAnnotation Class Reference

#include <annotations.h>

Inheritance diagram for TopicAnnotation:
Inheritance graph
[legend]
Collaboration diagram for TopicAnnotation:
Collaboration graph
[legend]

Public Member Functions

 TopicAnnotation ()
 
std::string definition () const
 
std::string name () const
 
- Public Member Functions inherited from AnnotationWithValue< TopicValue >
virtual bool node_value_exists (AST_Decl *node, TopicValue &value) const
 
- Public Member Functions inherited from Annotation
 Annotation ()
 
virtual ~Annotation ()
 
virtual std::string module () const
 
virtual std::string fullname () const
 
AST_Annotation_Decl * declaration () const
 
AST_Annotation_Appl * find_on (AST_Decl *node) const
 
void cache ()
 

Private Member Functions

TopicValue value_from_appl (AST_Annotation_Appl *appl) const
 

Additional Inherited Members

Detailed Description

Definition at line 180 of file annotations.h.

Constructor & Destructor Documentation

◆ TopicAnnotation()

TopicAnnotation::TopicAnnotation ( )

Definition at line 185 of file annotations.cpp.

186 {
187 }

Member Function Documentation

◆ definition()

std::string TopicAnnotation::definition ( ) const
virtual

Implements Annotation.

Definition at line 189 of file annotations.cpp.

190 {
191  return
192  "@annotation topic {\n"
193  " string name default \"\";\n"
194  " string platform default \"*\";\n"
195  "};\n";
196 }

◆ name()

std::string TopicAnnotation::name ( void  ) const
virtual

Implements Annotation.

Definition at line 198 of file annotations.cpp.

199 {
200  return "topic";
201 }

◆ value_from_appl()

TopicValue TopicAnnotation::value_from_appl ( AST_Annotation_Appl *  appl) const
privatevirtual

Reimplemented from AnnotationWithValue< TopicValue >.

Definition at line 203 of file annotations.cpp.

References get_str_annotation_member_value(), TopicValue::name, TopicValue::platform, and value.

204 {
206  value.name = get_str_annotation_member_value(appl, "name");
207  value.platform = get_str_annotation_member_value(appl, "platform");
208  return value;
209 }
const LogLevel::Value value
Definition: debug.cpp:61
std::string platform
Definition: annotations.h:172
std::string get_str_annotation_member_value(AST_Annotation_Appl *appl, const char *member_name)
std::string name
Definition: annotations.h:171

The documentation for this class was generated from the following files: