|
OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <topic_keys.h>
Classes | |
| class | Error |
| class | Iterator |
Public Types | |
| enum | RootType { PrimitiveType, StructureType, ArrayType, UnionType, SequenceType, InvalidType } |
Public Member Functions | |
| TopicKeys () | |
| TopicKeys (const TopicKeys &other) | |
| TopicKeys (AST_Structure *root, bool recursive=true) | |
| TopicKeys (AST_Union *root) | |
| ~TopicKeys () | |
| TopicKeys & | operator= (const TopicKeys &other) |
| AST_Decl * | root () const |
| RootType | root_type () const |
| Iterator | begin () |
| Iterator | end () |
| size_t | count () |
| bool | recursive () const |
Static Public Member Functions | |
| static RootType | root_type (AST_Type *type) |
Private Attributes | |
| AST_Decl * | root_ |
| RootType | root_type_ |
| bool | counted_ |
| size_t | count_ |
| bool | recursive_ |
| } More... | |
Find Keys in Topic Types
Use like this: AST_Structure* struct_node; // ... TopicKeys keys(struct_node); TopicKeys::Iterator end = keys.end(); for (TopicKeys::Iterator i = keys.begin(); i != end; ++i) { AST_Decl* key = *i; // ... }
The key AST_Decl will be a different type of node depending on the key:
Definition at line 34 of file topic_keys.h.
| enum TopicKeys::RootType |
| Enumerator | |
|---|---|
| PrimitiveType | |
| StructureType | |
| ArrayType | |
| UnionType | |
| SequenceType | |
| InvalidType | |
Definition at line 36 of file topic_keys.h.
| TopicKeys::TopicKeys | ( | ) |
Definition at line 447 of file topic_keys.cpp.
| TopicKeys::TopicKeys | ( | const TopicKeys & | other | ) |
Definition at line 456 of file topic_keys.cpp.
| TopicKeys::TopicKeys | ( | AST_Structure * | root, |
| bool | recursive = true |
||
| ) |
If recursive is false, do a shallow iteration.
Definition at line 461 of file topic_keys.cpp.
| TopicKeys::TopicKeys | ( | AST_Union * | root | ) |
Definition at line 471 of file topic_keys.cpp.
| TopicKeys::~TopicKeys | ( | ) |
Definition at line 481 of file topic_keys.cpp.
| TopicKeys::Iterator TopicKeys::begin | ( | void | ) |
Definition at line 495 of file topic_keys.cpp.
Referenced by count(), keys_generator::gen_struct(), marshal_generator::gen_typedef(), ts_generator::ts_generator(), and dds_visitor::visit_structure().
| size_t TopicKeys::count | ( | void | ) |
Count the keys in the topic type
Definition at line 515 of file topic_keys.cpp.
References begin(), count_, counted_, and end().
Referenced by metaclass_generator::gen_enum(), keys_generator::gen_struct(), marshal_generator::gen_typedef(), ts_generator::generate_ts(), and dds_visitor::visit_structure().
| TopicKeys::Iterator TopicKeys::end | ( | void | ) |
Definition at line 500 of file topic_keys.cpp.
References TopicKeys::Iterator::end_value().
Referenced by count(), TopicKeys::Iterator::end_value(), keys_generator::gen_struct(), marshal_generator::gen_typedef(), ts_generator::ts_generator(), and dds_visitor::visit_structure().
Definition at line 485 of file topic_keys.cpp.
References count_, counted_, recursive_, root_, and root_type_.
| bool TopicKeys::recursive | ( | ) | const |
| AST_Decl * TopicKeys::root | ( | void | ) | const |
Definition at line 505 of file topic_keys.cpp.
References root_.
Referenced by TopicKeys::Iterator::Iterator(), and TopicKeys().
|
static |
Get the RootType of the AST_Type
Definition at line 15 of file topic_keys.cpp.
References ArrayType, InvalidType, PrimitiveType, SequenceType, StructureType, and UnionType.
Referenced by marshal_generator::gen_typedef(), and TopicKeys::Iterator::Iterator().
| TopicKeys::RootType TopicKeys::root_type | ( | ) | const |
Definition at line 510 of file topic_keys.cpp.
References root_type_.
Referenced by TopicKeys::Iterator::Iterator().
|
private |
Definition at line 200 of file topic_keys.h.
Referenced by count(), and operator=().
|
private |
Cached Key Count {
Definition at line 199 of file topic_keys.h.
Referenced by count(), and operator=().
|
private |
}
Have iterators recurse into structures
Definition at line 204 of file topic_keys.h.
Referenced by operator=(), and recursive().
|
private |
Definition at line 194 of file topic_keys.h.
Referenced by operator=(), root(), and TopicKeys().
|
private |
Definition at line 195 of file topic_keys.h.
Referenced by operator=(), and root_type().
1.8.13