OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::GraphicsScenePackage Class Reference

Package that will be used to add graphics items to an existing scene. Note that the request to the UI must be send manually by providing this object (serialized) as the package. More...

#include "GraphicsPackage.h"

Inheritance diagram for ot::GraphicsScenePackage:
ot::Serializable

Public Member Functions

 GraphicsScenePackage (const std::string &_editorName=std::string())
 
virtual ~GraphicsScenePackage ()
 
virtual void addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
void addItem (GraphicsItemCfg *_item)
 ///
 
const std::list< GraphicsItemCfg * > & items (void) const
 
void setName (const std::string &_name)
 
const std::string & name (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const =0
 Add the object contents to the provided JSON object.
 

Detailed Description

Package that will be used to add graphics items to an existing scene. Note that the request to the UI must be send manually by providing this object (serialized) as the package.

Constructor & Destructor Documentation

◆ GraphicsScenePackage()

ot::GraphicsScenePackage::GraphicsScenePackage ( const std::string & _editorName = std::string())

◆ ~GraphicsScenePackage()

ot::GraphicsScenePackage::~GraphicsScenePackage ( )
virtual

Member Function Documentation

◆ addItem()

void ot::GraphicsScenePackage::addItem ( GraphicsItemCfg * _item)

///

Takes over ownership.

◆ addToJsonObject()

void ot::GraphicsScenePackage::addToJsonObject ( JsonValue & _object,
JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_documentThe JSON document (used to get the allocator)
_objectThe JSON object to add the contents to

◆ items()

const std::list< GraphicsItemCfg * > & ot::GraphicsScenePackage::items ( void ) const
inline

◆ name()

const std::string & ot::GraphicsScenePackage::name ( void ) const
inline

◆ setFromJsonObject()

void ot::GraphicsScenePackage::setFromJsonObject ( const ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

◆ setName()

void ot::GraphicsScenePackage::setName ( const std::string & _name)
inline

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