xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
Loading...
Searching...
No Matches
xentara::workbench::skill::Skill::Class Class Referenceabstract

A Xentara workbench skill. More...

#include <xentara/workbench/skill/Skill.hpp>

+ Inheritance diagram for xentara::workbench::skill::Skill::Class:

Classes

class  Registry
 

Public Member Functions

virtual ~Class ()=0
 Virtual destructor.
 
virtual auto name () const -> std::string_view=0
 Gets the name of the skill.
 
virtual auto uuid () const -> utils::core::Uuid=0
 Gets the UUID of the skill.
 
virtual auto registerElements (Registry &registry) const -> void=0
 Called by the framework to register all elements.
 
virtual auto createSkill () const -> std::unique_ptr< Skill >=0
 Called by the framework to create the runtime environment for the skill.
 
virtual auto allowElement (const Element::Class &elementClass) const -> bool=0
 Called by the framework to determine if it is allowed to create a top-level element.
 

Detailed Description

A Xentara workbench skill.

Constructor & Destructor Documentation

◆ ~Class()

xentara::workbench::skill::Skill::Class::~Class ( )
pure virtualdefault

Virtual destructor.

Member Function Documentation

◆ allowElement()

virtual auto xentara::workbench::skill::Skill::Class::allowElement ( const Element::Class elementClass) const -> bool
pure virtual

Called by the framework to determine if it is allowed to create a top-level element.

This function is called to check if an element can be created that is not a child of any other elements belonging to the same skill. To determine whether an element can be the child of another skill element, Element::allowChildElement() is called instead.

Parameters
elementClassThe class for the element the framework wishes to construct
Returns
Must return true if the element can be created, or false if the skill does not support top-level elements of the given class.

Implemented in xentara::workbench::skill::Skill::ConcreteClass< DerivedSkill, kName, kUuid, ElementClasses >.

◆ createSkill()

virtual auto xentara::workbench::skill::Skill::Class::createSkill ( ) const -> std::unique_ptr< Skill >
pure virtual

Called by the framework to create the runtime environment for the skill.

The implementation for this method must create the run time environment for the skill.

Returns
The newly created environment. Must never return nullptr.
Exceptions
std::runtime_exception

Implemented in xentara::workbench::skill::Skill::ConcreteClass< DerivedSkill, kName, kUuid, ElementClasses >.

◆ name()

virtual auto xentara::workbench::skill::Skill::Class::name ( ) const -> std::string_view
pure virtual

Gets the name of the skill.

Returns
The name of the class, in UTF-8 encoding.

Implemented in xentara::workbench::skill::Skill::ConcreteClass< DerivedSkill, kName, kUuid, ElementClasses >.

◆ registerElements()

virtual auto xentara::workbench::skill::Skill::Class::registerElements ( Registry registry) const -> void
pure virtual

Called by the framework to register all elements.

The element must register all element classes it provides.

Parameters
registryThe registry that should be used to register the classes

Implemented in xentara::workbench::skill::Skill::ConcreteClass< DerivedSkill, kName, kUuid, ElementClasses >.

◆ uuid()

virtual auto xentara::workbench::skill::Skill::Class::uuid ( ) const -> utils::core::Uuid
pure virtual