GTIRB
v2.2.0
GrammaTech Intermediate Representation for Binaries: C++ API
|
Class gtirb::AuxDataContainer. More...
#include <gtirb/AuxData.hpp>
#include <gtirb/Node.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/range/iterator_range.hpp>
#include <type_traits>
Go to the source code of this file.
Classes | |
class | gtirb::AuxDataContainer |
Contains the AuxData Tables and serves as a base class. More... | |
struct | AuxDataRaw |
An interface for accessing the serialized form of an AuxData instance. More... | |
struct | gtirb::AuxDataContainer::AuxDataRaw |
An interface for accessing the serialized form of an AuxData instance. More... | |
Namespaces | |
gtirb | |
Main namespace for the GTIRB API. | |
Typedefs | |
using | AuxDataSet = std::map< std::string, std::unique_ptr< gtirb::AuxData > > |
Functions | |
gtirb::AuxDataContainer Node | gtirb::AuxDataContainer (Context &C, Kind knd) |
gtirb::AuxDataContainer (Context &C, Kind knd, const UUID &U) | |
AuxData Properties | |
template<typename Schema > | |
void | addAuxData (typename Schema::Type &&X) |
Add a new AuxData, transferring ownership. More... | |
const_aux_data_range | aux_data () const |
Return a constant range of the auxiliary data (AuxData). More... | |
const_aux_data_iterator | aux_data_begin () const |
Return a constant iterator to the first AuxData. More... | |
const_aux_data_iterator | aux_data_end () const |
Return a constant iterator to the element following the last AuxData. More... | |
void | clearAuxData () |
Clear all AuxData from the IR. More... | |
using | const_aux_data_iterator = boost::transform_iterator< AccessRawData, AuxDataSet::const_iterator > |
An iterator type for traversing the AuxData in this container. More... | |
using | const_aux_data_range = boost::iterator_range< const_aux_data_iterator > |
template<typename Schema > | |
Schema::Type * | getAuxData () |
Get a reference to the underlying type stored in the AuxData by name. More... | |
template<typename Schema > | |
const Schema::Type * | getAuxData () const |
Get a reference to the underlying type stored in the AuxData by name. More... | |
bool | getAuxDataEmpty () const |
Check: Is the number of AuxData objects in this IR zero? More... | |
size_t | getAuxDataSize () const |
Get the total number of AuxData objects in this IR. More... | |
template<typename Schema > | |
bool | removeAuxData () |
Remove an AuxData by schema. More... | |
bool | removeAuxData (std::string Name) |
Remove an AuxData by name. More... | |
Class gtirb::AuxDataContainer.
using AuxDataSet = std::map<std::string, std::unique_ptr<gtirb::AuxData> > |
using const_aux_data_iterator = boost::transform_iterator<AccessRawData, AuxDataSet::const_iterator> |
An iterator type for traversing the AuxData in this container.
The value type for this iterator is AuxDataRaw. The iterator provides access to the serialized form of all AuxData in this container (regardless of whether or not the AuxData's type is registered.) Note that the content is only valid with respect to the most recent unserialization operation. Entries for new or modified AuxData entities will contain empty or stale content.
using const_aux_data_range = boost::iterator_range<const_aux_data_iterator> |
void AuxDataContainer::addAuxData | ( | typename Schema::Type && | X | ) |
Add a new AuxData, transferring ownership.
X | The data itself. |
const_aux_data_range AuxDataContainer::aux_data | ( | ) | const |
Return a constant range of the auxiliary data (AuxData).
const_aux_data_iterator AuxDataContainer::aux_data_begin | ( | ) | const |
Return a constant iterator to the first AuxData.
const_aux_data_iterator AuxDataContainer::aux_data_end | ( | ) | const |
Return a constant iterator to the element following the last AuxData.
void AuxDataContainer::clearAuxData | ( | ) |
Clear all AuxData from the IR.
Schema::Type* AuxDataContainer::getAuxData | ( | ) |
Get a reference to the underlying type stored in the AuxData by name.
nullptr
otherwise.Note that this function can only be used for AuxData for which a type has been registered with registerAuxDataType().
const Schema::Type* AuxDataContainer::getAuxData | ( | ) | const |
Get a reference to the underlying type stored in the AuxData by name.
nullptr
otherwise.Note that this function can only be used for AuxData for which a type has been registered with registerAuxDataType().
bool AuxDataContainer::getAuxDataEmpty | ( | ) | const |
Check: Is the number of AuxData objects in this IR zero?
true
if this IR does not contain any AuxData, otherwise false
size_t AuxDataContainer::getAuxDataSize | ( | ) | const |
Get the total number of AuxData objects in this IR.
bool AuxDataContainer::removeAuxData | ( | ) |
Remove an AuxData by schema.
This will invalidate any pointers that may have been held externally.
true
on success, false
otherwise.Note that this function can only be used for AuxData for which a type has been registered with registerAuxDataType().
bool AuxDataContainer::removeAuxData | ( | std::string | Name | ) |
Remove an AuxData by name.
This will invalidate any pointers that may have been held externally.
true
on success, false
otherwise.Note that this function can be used for any AuxData regardless of whether or not it has a registered schema.