|
| Param (ParamsBase &Owner, const ManagerType &Manager, std::string ParamName, std::string_view ParamTitle, std::string_view ParamDescription, std::string_view IconResourcePath={}, bool Optional=false, bool NeedsResetToApplyChange=true) |
| Base constructor of any parameter to be used if a parameter should be displayed in a settings dialog (UserEditable is set to true). More...
|
|
const auto & | GetManager () const noexcept |
| Returns the manager instance containing the Object the link refers to. More...
|
|
bool | ContainsID () const noexcept |
| Checks whether an item has been assigned to this parameter. More...
|
|
const LinkType & | GetLink () const noexcept |
| Returns the link of type LinkType derived from ObjectLinkBase to the Object the parameter refers to. More...
|
|
void | MakeLink () |
| Retrives the linked resource using its ID stored in the parameter and establishes a link to the resource. Before using the resource, it has to be locked through the link by the owner of this parameter. This function is also called by ParamsConfigDialog::accept(). More...
|
|
const ParamType & | operator= (const ParamType &NewValue) |
| Assigns a new value to this parameter. The operator cannot be accessed by Object because this function is not const. More...
|
|
const ParamType & | operator= (const ParamType &NewValue) |
| Assigns a new value to this parameter. The operator cannot be accessed by Object because this function is not const. More...
|
|
| LinkBase (std::string_view IconResourcePath={}, bool Optional=false) |
| Constructs a LinkBase object. More...
|
|
void | EnsureReadyState () |
| Makes sure that the object where this link parameter points to is in a ready state. Only to be called by main thread. Otherwise, RunnableObject::Run() throws Util::InvalidCallException. More...
|
|
bool | IsReady () |
| Returns whether the object where this link parameter points to is in a ready state. More...
|
|
std::string_view | GetLinkTitle () const noexcept |
| Returns a reference to this link parameter's title. More...
|
|
ItemIDListType | GetLinkedIDs () const |
| Returns a list of all object IDs assigned to this parameter. More...
|
|
const CommonResourceManagerBase * | GetCommonManager () const noexcept |
| This function can be used to determine the object type the parameter is expecting by comparing the resource manager's address to resource managers owned by a DynExpCore instance. More...
|
|
std::string_view | GetIconResourcePath () const noexcept |
|
bool | IsOptional () const noexcept |
|
ParamType | GetDefaultValue () const noexcept |
| Returns this parameter's default value. Thread-safe since a const member variable is returned. More...
|
|
| operator ParamType () const noexcept |
| Converts the parameter implicitly to its underlying type returning its current value. More...
|
|
const ParamType & | Get () const noexcept |
| Returns the parameter's value. More...
|
|
const ParamType & | operator= (const ParamType &NewValue) |
| Assigns a new value to this parameter. The operator cannot be accessed by Object because this function is not const. More...
|
|
| ParamBase (const ParamBase &)=delete |
|
ParamBase & | operator= (const ParamBase &)=delete |
|
QDomElement | ToXMLNode (QDomDocument &Document) const |
| Converts this parameter to a Qt dom element (describing an XML node containing this parameter's name and value). More...
|
|
void | FromXMLNode (const QDomElement &XMLElement) |
| Restores this parameter's value from the given Qt dom element (describing an XML node) More...
|
|
bool | Validate () |
| Checks whether a valid value is assigned to this parameter. This function is not const since it is also intended to reset the parameter if it is invalid. More...
|
|
void | Reset () |
| Resets this parameter to its default value. More...
|
|
bool | IsUserEditable () const noexcept |
| Returns ParamBase::UserEditable. More...
|
|
std::string_view | GetParamName () const noexcept |
| Returns ParamBase::ParamName. More...
|
|
std::string_view | GetParamTitle () const noexcept |
| Returns ParamBase::ParamTitle. More...
|
|
std::string_view | GetParamDescription () const noexcept |
| Returns ParamBase::ParamDescription. More...
|
|
bool | GetNeedsResetToApplyChange () const noexcept |
| Returns ParamBase::NeedsResetToApplyChange. More...
|
|
|
virtual const CommonResourceManagerBase * | GetCommonManagerChild () const noexcept override |
| This function can be used to determine the object type the parameter is expecting by comparing the resource manager's address to resource managers owned by a DynExpCore instance. More...
|
|
virtual void | FromXMLNodeChild (const QDomElement &XMLElement) override |
| Restores this parameter's value from the given Qt dom element (describing an XML node) More...
|
|
virtual void | AddToDialogChild (ParamsConfigDialog &Dialog) override final |
| Appends this parameter to a settings dialog making it configurable by the user. More...
|
|
void | EnsureReadyStateChild () override final |
| Thread-safe since only main thread is allowed to change parameters and to call this funtion. More...
|
|
bool | IsReadyChild () override final |
| Returns whether the object where this link parameter points to is in a ready state. More...
|
|
|
ParamsBaseOnlyType | ParamsBaseOnly |
| Provides the class ParamsBase access to some private members of class ParamBase . More...
|
|
| LinkParamBase (ParamsBase &Owner, std::string ParamName, std::string_view ParamTitle, std::string_view ParamDescription, bool NeedsResetToApplyChange=true, std::string_view IconResourcePath={}, bool Optional=false) |
| Base constructor of any parameter to be used if a parameter should be displayed in a settings dialog (UserEditable is set to true). More...
|
|
virtual | ~LinkBase () |
|
template<typename ResourceManagerType > |
auto | ShareResource (const ResourceManagerType &Manager, ItemIDType ID) |
| Returns a shared_ptr pointing to the resource with the given ID contained in the given resource manager Manager . The returned pointer points to a non-const instance of class Object . Throws an exception of type Util::NotFoundException if the resource is not found. More...
|
|
template<typename ObjectType > |
auto | MakeObjectIDsWithLabels (const ManagerTypeOfObjectType_t< ObjectType > &Manager) const |
| Finds all resources managed by the given resource manager matching type ObjectTpye and returns a list of information about these objects. More...
|
|
| TypedParamBase (ParamsBase &Owner, std::string ParamName, std::string_view ParamTitle, std::string_view ParamDescription, bool NeedsResetToApplyChange=true, ParamType DefaultValue=ParamType()) |
| Base constructor of any parameter to be used if a parameter should be displayed in a settings dialog (UserEditable is set to true). More...
|
|
| TypedParamBase (ParamsBase &Owner, std::string ParamName, ParamType DefaultValue=ParamType()) |
| Base constructor of any parameter to be used if a parameter should not be displayed in a settings dialog (UserEditable is set to false). More...
|
|
virtual void | ToXMLNodeChild (QDomDocument &Document, QDomElement &XMLElement) const override |
| Converts this parameter to a Qt dom element (describing an XML node containing this parameter's name and value). More...
|
|
| ParamBase (ParamsBase &Owner, std::string ParamName, std::string_view ParamTitle, std::string_view ParamDescription, bool NeedsResetToApplyChange) |
| Base constructor of any parameter to be used if a parameter should be displayed in a settings dialog (UserEditable is set to true). More...
|
|
| ParamBase (ParamsBase &Owner, std::string ParamName) |
| Base constructor of any parameter to be used if a parameter should not be displayed in a settings dialog (UserEditable is set to false). More...
|
|
virtual | ~ParamBase ()=0 |
|
const auto & | GetOwner () const noexcept |
| Returns the ParamsBase instance owning this ParamBase instance. More...
|
|
auto & | GetOwner () noexcept |
| Returns the ParamsBase instance owning this ParamBase instance. More...
|
|
template<typename LinkType>
class DynExp::ParamsBase::Param< LinkType, std::enable_if_t< std::is_base_of_v< ObjectLinkBase, LinkType > > >
Parameter for links to a single Object
. If LinkType
is derived from ObjectLinkBase, then extend TypedParamBase's
functionality by providing link instantiation functionality and by overriding AddToDialogChild().
- Template Parameters
-
LinkType | Type derived from ObjectLinkBase (usually ObjectLink< ObjectT > instantiated with a type ObjectT derived from Object ). |
Definition at line 1150 of file Object.h.