OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Protected Member Functions | List of all members
AnnotationWithValue< T > Class Template Reference

#include <annotations.h>

Inheritance diagram for AnnotationWithValue< T >:
Inheritance graph
[legend]
Collaboration diagram for AnnotationWithValue< T >:
Collaboration graph
[legend]

Public Member Functions

virtual bool node_value_exists (AST_Decl *node, T &value) const
 
- Public Member Functions inherited from Annotation
 Annotation ()
 
virtual ~Annotation ()
 
virtual std::string definition () const =0
 
virtual std::string name () const =0
 
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 ()
 

Protected Member Functions

virtual T value_from_appl (AST_Annotation_Appl *) const
 

Detailed Description

template<typename T>
class AnnotationWithValue< T >

Annotation with a Single Member Named "value"

Definition at line 111 of file annotations.h.

Member Function Documentation

◆ node_value_exists()

template<typename T>
virtual bool AnnotationWithValue< T >::node_value_exists ( AST_Decl *  node,
T &  value 
) const
inlinevirtual

If node has the annotation, this sets value to the annotation value and returns true. Returns false otherwise.

Definition at line 117 of file annotations.h.

Referenced by invalid_option(), and typeobject_generator::set_builtin_member_annotations().

118  {
119  AST_Annotation_Appl* appl = find_on(node);
120  if (!appl) { return false; }
121 
122  value = value_from_appl(appl);
123  return true;
124  }
AST_Annotation_Appl * find_on(AST_Decl *node) const
Definition: annotations.cpp:80
const LogLevel::Value value
Definition: debug.cpp:61
virtual T value_from_appl(AST_Annotation_Appl *) const
Definition: annotations.h:130

◆ value_from_appl()

template<typename T>
virtual T AnnotationWithValue< T >::value_from_appl ( AST_Annotation_Appl *  ) const
inlineprotectedvirtual

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