The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::app::ReportDescriptorCollection Class Reference

This collection of ReportDescriptors is designed to never deallocate memory once it has been allocated. References returned by the 'getDescriptorByName()' method are guaranteed to be valid for the life of this collection object. More...

#include <ReportDescriptor.hpp>

Public Member Functions

 ReportDescriptorCollection (const ReportDescriptorCollection &)=delete
 
ReportDescriptorCollectionoperator= (const ReportDescriptorCollection &)=delete
 
 ReportDescriptorCollection (ReportDescriptorCollection &&)=default
 
ReportDescriptorCollectionoperator= (ReportDescriptorCollection &&)=default
 
void push_back (const ReportDescriptor &rd)
 Add one report descriptor to this collection.
 
template<class... Args>
void emplace_back (Args &&... args)
 Add one report descriptor to this collection.
 
void clear ()
 Remove (disable) all descriptors from this collection.
 
size_t size () const
 Get the number of enabled descriptors in this collection.
 
bool empty () const
 See if there are any enabled descriptors in this collection.
 
bool contains (const std::string &desc_name) const
 
ReportDescriptorgetDescriptorByName (const std::string &desc_name)
 Access a descriptor by the app::ReportDescriptor's "dest_file".
 
void removeDescriptorByName (const std::string &desc_name)
 
std::vector< std::string > getAllDescriptorNames () const
 
std::deque< ReportDescriptor >::iterator begin ()
 Iterator access.
 
std::deque< ReportDescriptor >::const_iterator begin () const
 Iterator access.
 
std::deque< ReportDescriptor >::iterator end ()
 Iterator access.
 
std::deque< ReportDescriptor >::const_iterator end () const
 Iterator access.
 

Detailed Description

This collection of ReportDescriptors is designed to never deallocate memory once it has been allocated. References returned by the 'getDescriptorByName()' method are guaranteed to be valid for the life of this collection object.

If you want to "remove" a descriptor from the collection, call the 'removeDescriptorByName()' method.

Definition at line 647 of file ReportDescriptor.hpp.

Member Function Documentation

◆ begin() [1/2]

std::deque< ReportDescriptor >::iterator sparta::app::ReportDescriptorCollection::begin ( )
inline

Iterator access.

Definition at line 773 of file ReportDescriptor.hpp.

◆ begin() [2/2]

std::deque< ReportDescriptor >::const_iterator sparta::app::ReportDescriptorCollection::begin ( ) const
inline

Iterator access.

Definition at line 778 of file ReportDescriptor.hpp.

◆ clear()

void sparta::app::ReportDescriptorCollection::clear ( )
inline

Remove (disable) all descriptors from this collection.

Definition at line 704 of file ReportDescriptor.hpp.

◆ contains()

bool sparta::app::ReportDescriptorCollection::contains ( const std::string &  desc_name) const
inline

See if the given report descriptor name (ReportDescriptor::dest_file) exists in this collection

Definition at line 728 of file ReportDescriptor.hpp.

◆ emplace_back()

template<class... Args>
void sparta::app::ReportDescriptorCollection::emplace_back ( Args &&...  args)
inline

Add one report descriptor to this collection.

Definition at line 698 of file ReportDescriptor.hpp.

Here is the call graph for this function:

◆ empty()

bool sparta::app::ReportDescriptorCollection::empty ( ) const
inline

See if there are any enabled descriptors in this collection.

Definition at line 722 of file ReportDescriptor.hpp.

Here is the call graph for this function:

◆ end() [1/2]

std::deque< ReportDescriptor >::iterator sparta::app::ReportDescriptorCollection::end ( )
inline

Iterator access.

Definition at line 783 of file ReportDescriptor.hpp.

◆ end() [2/2]

std::deque< ReportDescriptor >::const_iterator sparta::app::ReportDescriptorCollection::end ( ) const
inline

Iterator access.

Definition at line 788 of file ReportDescriptor.hpp.

◆ getAllDescriptorNames()

std::vector< std::string > sparta::app::ReportDescriptorCollection::getAllDescriptorNames ( ) const
inline

Get all "dest_file" strings for the report descriptors that are enabled in this collection

Definition at line 762 of file ReportDescriptor.hpp.

◆ getDescriptorByName()

ReportDescriptor & sparta::app::ReportDescriptorCollection::getDescriptorByName ( const std::string &  desc_name)
inline

Access a descriptor by the app::ReportDescriptor's "dest_file".

Definition at line 749 of file ReportDescriptor.hpp.

◆ push_back()

void sparta::app::ReportDescriptorCollection::push_back ( const ReportDescriptor rd)
inline

Add one report descriptor to this collection.

Definition at line 661 of file ReportDescriptor.hpp.

◆ removeDescriptorByName()

void sparta::app::ReportDescriptorCollection::removeDescriptorByName ( const std::string &  desc_name)
inline

Remove (disable) one descriptor whose "dest_file" matches the given "desc_name" argument

Definition at line 756 of file ReportDescriptor.hpp.

Here is the call graph for this function:

◆ size()

size_t sparta::app::ReportDescriptorCollection::size ( ) const
inline

Get the number of enabled descriptors in this collection.

Definition at line 711 of file ReportDescriptor.hpp.


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