DDS-PSM-C++  1.0
ISO C++ API for OpenSplice DDS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
TStructType.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_CORE_XTYPES_T_STRUCT_TYPE_HPP_
2 #define OMG_DDS_CORE_XTYPES_T_STRUCT_TYPE_HPP_
3 
7 
8 namespace dds {
9  namespace core {
10  namespace xtypes {
11  template <typename DELEGATE>
12  class TStructType;
13 
14  template <typename T>
15  bool isFinal(const TStructType<T>& s);
16 
17  template <typename T>
18  bool isExtensible(const TStructType<T>& s);
19 
20  template <typename T>
21  bool isMutable(const TStructType<T>& s);
22 
23  template <typename T>
24  bool isNested(const TStructType<T>& s);
25  }
26  }
27 }
28 
34 template <typename DELEGATE>
36 public:
37 
38  TStructType(const std::string& name);
39 
41  const std::string& name,
42  const TStructType& parent,
43  const std::vector<MemberType>& members);
44 
45  template <typename MemberIter>
47  const std::string& name,
48  const TStructType& parent,
49  const MemberIter& begin,
50  const MemberIter& end);
51 
53  const std::string& name,
54  const TStructType& parent,
55  const std::vector<MemberType>& members,
56  const Annotation& annotation);
57 
59  const std::string& name,
60  const TStructType& parent,
61  const std::vector<MemberType>& members,
62  const std::vector<Annotation>& annotations);
63 
64  template <typename AnnotationIter, typename MemberIter>
66  const std::string& name,
67  const TStructType& parent,
68  const MemberIter& begin,
69  const MemberIter& end,
70  const AnnotationIter& begin,
71  const AnnotationIter& end);
72 public:
73  TStructType parent() const;
74  const std::vector<MemberType>& members() const;
75  const MemberType& member(uint32_t id) const;
76  const MemberType& member(const std::string& name) const;
77 
78  const std::vector<Annotation>& annotations() const;
79 
80  TStructType add_member(const MemberType& member) const ;
81  TStructType remove_member(const MemberType& member) const;
82 
83  TStructType add_annotation(const Annotation& annotation) const;
84  TStructType remove_annotation(const Annotation& annotation) const;
85 };
86 
87 
88 #endif /* OMG_DDS_CORE_XTYPES_T_STRUCT_TYPE_HPP_ */