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

Layout factory to build layouts for types and/or values. More...

#include <WatchpointLayout.h>

Public Member Functions

 ~WatchpointLayoutFactory () noexcept
 Destructor. More...
 
bool isValid () const noexcept
 Check if this WatchpointLayoutFactory has been successfully initialized. More...
 
Workspace const & getWorkspace () const
 Get the Workspace object this factory belongs to. More...
 
Amino::Type getType (Amino::String const &typeName) const
 Get the Type corresponding to given fully qualified type name. More...
 
WatchpointLayoutPtr add (WatchpointLayoutPtr const &layout)
 Register a fixed layout for given type. More...
 
bool exists (Amino::TypeId const &typeId) const
 Query if a layout is registered for given type. More...
 
WatchpointLayoutPtr get (Amino::TypeId const &typeId) const
 Get the layout for given type. More...
 
WatchpointLayoutPtr get (Amino::Any const &any) const
 Get the layout for given value. More...
 
WatchpointLayoutPtr get (Amino::Type const &type, Amino::Any const &any) const
 Get the layout for given value. More...
 
bool getValue (Amino::Any const &any, WatchpointLayoutPath &path, Amino::String &out_value) const
 Get the string representation of an element of a given value. More...
 

Static Public Member Functions

static WatchpointLayoutFactorygetInvalid () noexcept
 Get a statically allocated factory that is uninitialized and invalid. Any operation on this instance will always fail and WatchpointLayoutFactory::isValid will return false. More...
 

Friends

class BifrostGraph::Executor::Private::WorkspaceImpl
 Allow the WorkspaceImpl object to access the private constructors and setWorkspace. More...
 

Detailed Description

Layout factory to build layouts for types and/or values.

Definition at line 392 of file WatchpointLayout.h.

Constructor & Destructor Documentation

◆ ~WatchpointLayoutFactory()

BifrostGraph::Executor::WatchpointLayoutFactory::~WatchpointLayoutFactory ( )
noexcept

Destructor.

Member Function Documentation

◆ add()

WatchpointLayoutPtr BifrostGraph::Executor::WatchpointLayoutFactory::add ( WatchpointLayoutPtr const &  layout)

Register a fixed layout for given type.

Parameters
layoutThe layout
Returns
The added layout on success, or nullptr on failure.
Note
This will fail the layout is nullptr or another layout was already registered for layout's type.

◆ exists()

bool BifrostGraph::Executor::WatchpointLayoutFactory::exists ( Amino::TypeId const &  typeId) const

Query if a layout is registered for given type.

Parameters
typeIdThe typeId
Returns
True if a layout is registered, false otherwise.

◆ get() [1/3]

WatchpointLayoutPtr BifrostGraph::Executor::WatchpointLayoutFactory::get ( Amino::Any const &  any) const

Get the layout for given value.

Parameters
anyThe value
Returns
The layout of value on success, or nullptr otherwise.

◆ get() [2/3]

WatchpointLayoutPtr BifrostGraph::Executor::WatchpointLayoutFactory::get ( Amino::Type const &  type,
Amino::Any const &  any 
) const

Get the layout for given value.

Parameters
typeThe datamodel type of the value
anyThe value
Returns
The layout of value on success, or nullptr otherwise.

◆ get() [3/3]

WatchpointLayoutPtr BifrostGraph::Executor::WatchpointLayoutFactory::get ( Amino::TypeId const &  typeId) const

Get the layout for given type.

Parameters
typeIdThe typeId.
Returns
The layout if it existed or was successfuly created, nullptr otherwise.

◆ getInvalid()

static WatchpointLayoutFactory & BifrostGraph::Executor::WatchpointLayoutFactory::getInvalid ( )
staticnoexcept

Get a statically allocated factory that is uninitialized and invalid. Any operation on this instance will always fail and WatchpointLayoutFactory::isValid will return false.

◆ getType()

Amino::Type BifrostGraph::Executor::WatchpointLayoutFactory::getType ( Amino::String const &  typeName) const

Get the Type corresponding to given fully qualified type name.

Parameters
typeNameThe fully qualified type name.
Returns
The corresponding type.

◆ getValue()

bool BifrostGraph::Executor::WatchpointLayoutFactory::getValue ( Amino::Any const &  any,
WatchpointLayoutPath path,
Amino::String out_value 
) const

Get the string representation of an element of a given value.

Parameters
anyThe value
pathThe path to the element
[out]out_valueThe string representation
Note
The path is consumed (pop_front) until the final layout element is reached.
Returns
The true if the path was valid, false otherwise.

◆ getWorkspace()

Workspace const & BifrostGraph::Executor::WatchpointLayoutFactory::getWorkspace ( ) const

Get the Workspace object this factory belongs to.

◆ isValid()

bool BifrostGraph::Executor::WatchpointLayoutFactory::isValid ( ) const
noexcept

Check if this WatchpointLayoutFactory has been successfully initialized.

Friends And Related Function Documentation

◆ BifrostGraph::Executor::Private::WorkspaceImpl

friend class BifrostGraph::Executor::Private::WorkspaceImpl
friend

Allow the WorkspaceImpl object to access the private constructors and setWorkspace.

Definition at line 410 of file WatchpointLayout.h.