Bifrost SDK
Bifrost SDK documentation
BifrostGraph::Executor::WatchpointLayoutComposite Class Reference

A composite layout, that contains sub layouts. More...

#include <WatchpointLayout.h>

Inheritance diagram for BifrostGraph::Executor::WatchpointLayoutComposite:
BifrostGraph::Executor::WatchpointLayout

Classes

class  Iterator
 Forward iterator on the sub layouts. More...
 

Public Member Functions

 ~WatchpointLayoutComposite () override
 Destructor. More...
 
bool hasFlattenedRepresentation () const
 Check whether or not the composite has a flattened string representation. More...
 
Amino::String const & flattenedRepresentation () const
 Get the template of the flattened string representation for the composite. More...
 
bool flattenedRepresentation (WatchpointLayoutFactory const &factory, Amino::Any const &value, Amino::String &out_value) const
 Get the flattened string representation of the value based on the composite's custom layout. More...
 
bool placeHolder () const
 Return whether or not this is a place holder for a custom layout. More...
 
bool empty () const
 Return whether or not the composite has no sub layouts. More...
 
std::size_t size () const
 Return the number of sub layouts. More...
 
Iterator begin () const
 Return an iterator on the first sub layout. More...
 
Iterator end () const
 Return an iterator past the last sub layout. More...
 
WatchpointLayoutPtr add (Amino::String const &name, WatchpointLayoutPtr const &layout)
 Add a sub layout. More...
 
WatchpointLayoutPtr const get (Amino::String const &name) const
 Get the sub layout of given name. More...
 
- Public Member Functions inherited from BifrostGraph::Executor::WatchpointLayout
virtual ~WatchpointLayout ()
 Destructor. More...
 
Amino::TypeId const & getTypeId () const
 Get the typeId the layout is based on. More...
 
Amino::Type const & getType () const
 Get the type the layout is based on. More...
 
Amino::String const & getTypeName () const
 Get the fully qualified type name the layout is based on. More...
 
Amino::String const & getTypeKind () const
 Get the layout's kind name. More...
 

Static Public Member Functions

static WatchpointLayoutPtr create (WatchpointLayoutFactory const &factory, Amino::TypeId const &typeId, bool placeHolder=false)
 Create a new WatchpointLayoutComposite. More...
 
static WatchpointLayoutPtr create (Amino::Type const &type, Amino::TypeId const &typeId, bool placeHolder=false)
 Create a new WatchpointLayoutComposite. More...
 
- Static Public Member Functions inherited from BifrostGraph::Executor::WatchpointLayout
static WatchpointLayoutPtr create (WatchpointLayoutFactory const &factory, Amino::TypeId const &typeId)
 Create a new WatchpointLayout. More...
 
static WatchpointLayoutPtr create (Amino::Type const &type, Amino::TypeId const &typeId)
 Create a new WatchpointLayout. More...
 

Protected Member Functions

 WatchpointLayoutComposite (Amino::Type const &type, Amino::TypeId const &typeId, bool placeHolder)
 Internal constructor. More...
 
- Protected Member Functions inherited from BifrostGraph::Executor::WatchpointLayout
 WatchpointLayout (Amino::Type const &type, Amino::TypeId const &typeId)
 Internal constructor. More...
 

Detailed Description

A composite layout, that contains sub layouts.

Definition at line 197 of file WatchpointLayout.h.

Constructor & Destructor Documentation

◆ ~WatchpointLayoutComposite()

BifrostGraph::Executor::WatchpointLayoutComposite::~WatchpointLayoutComposite ( )
override

Destructor.

◆ WatchpointLayoutComposite()

BifrostGraph::Executor::WatchpointLayoutComposite::WatchpointLayoutComposite ( Amino::Type const &  type,
Amino::TypeId const &  typeId,
bool  placeHolder 
)
protected

Internal constructor.

Member Function Documentation

◆ add()

WatchpointLayoutPtr BifrostGraph::Executor::WatchpointLayoutComposite::add ( Amino::String const &  name,
WatchpointLayoutPtr const &  layout 
)

Add a sub layout.

Parameters
nameThe name of the sub layout.
layoutThe sub layout.
Returns
The sub layout on success or an empty pointer otherwise.

◆ begin()

Iterator BifrostGraph::Executor::WatchpointLayoutComposite::begin ( ) const

Return an iterator on the first sub layout.

◆ create() [1/2]

static WatchpointLayoutPtr BifrostGraph::Executor::WatchpointLayoutComposite::create ( Amino::Type const &  type,
Amino::TypeId const &  typeId,
bool  placeHolder = false 
)
static

Create a new WatchpointLayoutComposite.

Parameters
typethe datamodel type of the layout
typeIdthe typeId of the layout
placeHolderWhether or not this is a place holder for a custom layout.
Returns
a smart pointer to the new layout.

◆ create() [2/2]

static WatchpointLayoutPtr BifrostGraph::Executor::WatchpointLayoutComposite::create ( WatchpointLayoutFactory const &  factory,
Amino::TypeId const &  typeId,
bool  placeHolder = false 
)
static

Create a new WatchpointLayoutComposite.

Parameters
factoryThe layout factory.
typeIdthe typeId of the layout
placeHolderWhether or not this is a place holder for a custom layout.
Returns
a smart pointer to the new layout.

◆ empty()

bool BifrostGraph::Executor::WatchpointLayoutComposite::empty ( ) const

Return whether or not the composite has no sub layouts.

◆ end()

Iterator BifrostGraph::Executor::WatchpointLayoutComposite::end ( ) const

Return an iterator past the last sub layout.

◆ flattenedRepresentation() [1/2]

Amino::String const & BifrostGraph::Executor::WatchpointLayoutComposite::flattenedRepresentation ( ) const

Get the template of the flattened string representation for the composite.

Note
This corresponds to the layout's type 'watchpoint_layout' metadata.
Returns
The flattened string representation's template.

◆ flattenedRepresentation() [2/2]

bool BifrostGraph::Executor::WatchpointLayoutComposite::flattenedRepresentation ( WatchpointLayoutFactory const &  factory,
Amino::Any const &  value,
Amino::String out_value 
) const

Get the flattened string representation of the value based on the composite's custom layout.

Parameters
factoryThe layout factory.
valueThe value.
[out]out_valueThe flattened representation.
Returns
The true if the layout has a flattened representation, false otherwise.
The flattened string representation.

◆ get()

WatchpointLayoutPtr const BifrostGraph::Executor::WatchpointLayoutComposite::get ( Amino::String const &  name) const

Get the sub layout of given name.

Parameters
nameThe name of the sub layout.
Returns
The layout or an empty pointer if not found.

◆ hasFlattenedRepresentation()

bool BifrostGraph::Executor::WatchpointLayoutComposite::hasFlattenedRepresentation ( ) const

Check whether or not the composite has a flattened string representation.

Returns
True if composite has a flattened string representation, false otherwise.

◆ placeHolder()

bool BifrostGraph::Executor::WatchpointLayoutComposite::placeHolder ( ) const

Return whether or not this is a place holder for a custom layout.

Note
A place holder should be excluded from an element path.

◆ size()

std::size_t BifrostGraph::Executor::WatchpointLayoutComposite::size ( ) const

Return the number of sub layouts.