OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <topic_keys.h>
Public Types | |
typedef AST_Decl * | value_type |
{ More... | |
typedef AST_Decl ** | pointer |
typedef AST_Decl *& | reference |
typedef std::input_iterator_tag | iterator_category |
Public Member Functions | |
Iterator () | |
} More... | |
Iterator (TopicKeys &parent) | |
Iterator (const Iterator &other) | |
~Iterator () | |
Iterator & | operator= (const Iterator &other) |
Iterator & | operator++ () |
Iterator | operator++ (int) |
AST_Decl * | operator* () const |
bool | operator== (const Iterator &other) const |
bool | operator!= (const Iterator &other) const |
std::string | path () |
std::string | canonical_path () |
size_t | level () const |
RootType | root_type () const |
RootType | parents_root_type () const |
AST_Type * | get_ast_type () const |
Static Public Member Functions | |
static Iterator | end_value () |
Private Member Functions | |
Iterator (AST_Type *root, Iterator *parent) | |
Iterator (AST_Field *root, Iterator *parent) | |
void | path_i (std::stringstream &ss, bool canonical=false) |
void | cleanup () |
Private Attributes | |
Iterator * | parent_ |
unsigned | pos_ |
Iterator * | child_ |
AST_Decl * | current_value_ |
Current value of the entire iterator stack. More... | |
AST_Decl * | root_ |
RootType | root_type_ |
size_t | level_ |
bool | recursive_ |
std::vector< size_t > | dimensions_ |
The Dimensions of the Array. More... | |
size_t | element_count_ |
Element Count in the Array. More... | |
bool | implied_keys_ |
Used in struct field key iteration. More... | |
Iterator for traversing the TAO_IDL AST, looking for nodes within a topic type node that are annotated with .
Definition at line 72 of file topic_keys.h.
typedef std::input_iterator_tag TopicKeys::Iterator::iterator_category |
Definition at line 81 of file topic_keys.h.
typedef AST_Decl** TopicKeys::Iterator::pointer |
Definition at line 79 of file topic_keys.h.
typedef AST_Decl*& TopicKeys::Iterator::reference |
Definition at line 80 of file topic_keys.h.
typedef AST_Decl* TopicKeys::Iterator::value_type |
TopicKeys::Iterator::Iterator | ( | ) |
}
Create new iterator equal to TopicKeys::end()
Definition at line 70 of file topic_keys.cpp.
Referenced by operator++(), and operator=().
TopicKeys::Iterator::Iterator | ( | TopicKeys & | parent | ) |
Create new iterator pointing to the first topic key or equal to TopicKeys::end() if there are no keys.
Definition at line 84 of file topic_keys.cpp.
References TopicKeys::root(), root_, TopicKeys::root_type(), and root_type_.
TopicKeys::Iterator::Iterator | ( | const Iterator & | other | ) |
Create a completely separate copy of another iterator
Definition at line 134 of file topic_keys.cpp.
TopicKeys::Iterator::~Iterator | ( | ) |
Definition at line 148 of file topic_keys.cpp.
References cleanup().
|
private |
Definition at line 99 of file topic_keys.cpp.
References TopicKeys::root(), root_, TopicKeys::root_type(), and root_type_.
|
private |
Definition at line 114 of file topic_keys.cpp.
References TopicKeys::PrimitiveType, TopicKeys::root(), root_, TopicKeys::root_type(), and root_type_.
std::string TopicKeys::Iterator::canonical_path | ( | ) |
Definition at line 342 of file topic_keys.cpp.
References path_i().
|
private |
Definition at line 392 of file topic_keys.cpp.
References child_.
Referenced by operator=(), and ~Iterator().
|
static |
Definition at line 533 of file topic_keys.cpp.
References TopicKeys::end().
Referenced by TopicKeys::end(), and operator++().
AST_Type * TopicKeys::Iterator::get_ast_type | ( | ) | const |
Get the AST_Type of the current value
Returns 0 if the iterator is invalid
Definition at line 412 of file topic_keys.cpp.
References TopicKeys::ArrayType, child_, current_value_, get_ast_type(), level_, parents_root_type(), recursive_, root_type(), TopicKeys::SequenceType, TopicKeys::StructureType, and TopicKeys::UnionType.
Referenced by get_ast_type().
size_t TopicKeys::Iterator::level | ( | ) | const |
bool TopicKeys::Iterator::operator!= | ( | const Iterator & | other | ) | const |
Definition at line 330 of file topic_keys.cpp.
AST_Decl * TopicKeys::Iterator::operator* | ( | void | ) | const |
Definition at line 308 of file topic_keys.cpp.
References current_value_.
TopicKeys::Iterator & TopicKeys::Iterator::operator++ | ( | void | ) |
Definition at line 169 of file topic_keys.cpp.
References TopicKeys::ArrayType, be_global, Fields::begin(), OpenDDS::DCPS::child(), child_, current_value_, dimensions_, element_count_, Fields::end(), end_value(), implied_keys_, TopicKeys::InvalidType, Iterator(), level_, pos_, TopicKeys::PrimitiveType, recursive_, root_, root_type_, TopicKeys::SequenceType, TopicKeys::StructureType, and TopicKeys::UnionType.
TopicKeys::Iterator TopicKeys::Iterator::operator++ | ( | int | ) |
Definition at line 301 of file topic_keys.cpp.
TopicKeys::Iterator & TopicKeys::Iterator::operator= | ( | const Iterator & | other | ) |
Definition at line 153 of file topic_keys.cpp.
References child_, cleanup(), current_value_, dimensions_, element_count_, Iterator(), level_, parent_, pos_, recursive_, root_, and root_type_.
bool TopicKeys::Iterator::operator== | ( | const Iterator & | other | ) | const |
Definition at line 313 of file topic_keys.cpp.
References child_, current_value_, dimensions_, element_count_, level_, parent_, pos_, recursive_, root_, and root_type_.
TopicKeys::RootType TopicKeys::Iterator::parents_root_type | ( | ) | const |
Get the final child's parent's root type
Returns InvalidType if it is the root or a invalid iterator
Definition at line 402 of file topic_keys.cpp.
References child_, TopicKeys::InvalidType, parent_, parents_root_type(), and root_type_.
Referenced by get_ast_type(), and parents_root_type().
std::string TopicKeys::Iterator::path | ( | ) |
Get the path of the key in reference to the root_
Definition at line 335 of file topic_keys.cpp.
References path_i().
Referenced by keys_generator::gen_struct(), and marshal_generator::gen_typedef().
|
private |
Internal Recursive Impl. of path()
Definition at line 349 of file topic_keys.cpp.
References TopicKeys::ArrayType, canonical_name(), child_, dimensions_, level_, path_i(), pos_, TopicKeys::PrimitiveType, recursive_, root_, root_type_, TopicKeys::StructureType, and TopicKeys::UnionType.
Referenced by canonical_path(), path(), and path_i().
TopicKeys::RootType TopicKeys::Iterator::root_type | ( | ) | const |
Get the root type of the final child
Definition at line 397 of file topic_keys.cpp.
References child_, root_type(), and root_type_.
Referenced by get_ast_type(), and root_type().
|
private |
Definition at line 147 of file topic_keys.h.
Referenced by cleanup(), get_ast_type(), level(), operator++(), operator=(), operator==(), parents_root_type(), path_i(), and root_type().
|
private |
Current value of the entire iterator stack.
Definition at line 149 of file topic_keys.h.
Referenced by get_ast_type(), operator*(), operator++(), operator=(), and operator==().
|
private |
The Dimensions of the Array.
Definition at line 155 of file topic_keys.h.
Referenced by operator++(), operator=(), operator==(), and path_i().
|
private |
Element Count in the Array.
Definition at line 157 of file topic_keys.h.
Referenced by operator++(), operator=(), and operator==().
|
private |
Used in struct field key iteration.
Definition at line 160 of file topic_keys.h.
Referenced by operator++().
|
private |
Definition at line 152 of file topic_keys.h.
Referenced by get_ast_type(), level(), operator++(), operator=(), operator==(), and path_i().
|
private |
Definition at line 145 of file topic_keys.h.
Referenced by operator=(), operator==(), and parents_root_type().
|
private |
Definition at line 146 of file topic_keys.h.
Referenced by operator++(), operator=(), operator==(), and path_i().
|
private |
Definition at line 153 of file topic_keys.h.
Referenced by get_ast_type(), operator++(), operator=(), operator==(), and path_i().
|
private |
Definition at line 150 of file topic_keys.h.
Referenced by Iterator(), operator++(), operator=(), operator==(), and path_i().
|
private |
Definition at line 151 of file topic_keys.h.
Referenced by Iterator(), operator++(), operator=(), operator==(), parents_root_type(), path_i(), and root_type().