ACF $AcfVersion:0$
Public Member Functions | Static Public Member Functions | List of all members
iattr::CStandardAttributesFactory Class Reference

Basic implementation of an property container. More...

#include <CStandardAttributesFactory.h>

Inheritance diagram for iattr::CStandardAttributesFactory:
istd::TIFactory< Interface > istd::IFactoryInfo istd::IPolymorphic

Public Member Functions

virtual istd::TUniqueInterfacePtr< iser::IObjectCreateInstance (const QByteArray &keyId="") const override
 Create an instance of the object, mapped to the keyId keyId.
 
virtual KeyList GetFactoryKeys () const override
 Returns all possible keys for this factory.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Static Public Member Functions

static const CStandardAttributesFactoryGetInstance ()
 

Additional Inherited Members

- Public Types inherited from istd::TIFactory< Interface >
typedef Interface InterfaceType
 
- Public Types inherited from istd::IFactoryInfo
typedef QSet< QByteArray > KeyList
 

Detailed Description

Basic implementation of an property container.

Definition at line 16 of file CStandardAttributesFactory.h.

Member Function Documentation

◆ CreateInstance()

virtual istd::TUniqueInterfacePtr< iser::IObject > iattr::CStandardAttributesFactory::CreateInstance ( const QByteArray &  keyId = "") const
overridevirtual

Create an instance of the object, mapped to the keyId keyId.

Parameters
keyId
Returns
unique pointer to created object or empty pointer if it was not possible to create it or keyId does not exist.

Implements istd::TIFactory< Interface >.

◆ GetFactoryKeys()

virtual KeyList iattr::CStandardAttributesFactory::GetFactoryKeys ( ) const
overridevirtual

Returns all possible keys for this factory.

Retrieves the complete set of keys (identifiers) that this factory can use to create objects. Each key corresponds to a specific object type or variant that the factory knows how to instantiate.

Returns
A QSet containing all valid factory keys. The set may be empty if the factory cannot currently create any objects, but typically contains at least one key for factories that are properly configured.
Note
The returned set represents a snapshot of available keys at the time of the call. For dynamic factories, the available keys may change over time (e.g., through plugin loading).
Keys are typically case-sensitive QByteArray values. Clients should use exact string matching when working with factory keys.
// Example usage
IFactoryInfo* factory = GetFactory();
IFactoryInfo::KeyList keys = factory->GetFactoryKeys();
// Check if a specific type is available
if (keys.contains("mytype")) {
// Create object using "mytype" key
}
// List all available types
for (const QByteArray& key : keys) {
qDebug() << "Available type:" << key;
}
See also
istd::IFactory::CreateInstance()

Implements istd::IFactoryInfo.

◆ GetInstance()

static const CStandardAttributesFactory & iattr::CStandardAttributesFactory::GetInstance ( )
static

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