Basic implementation of an property container.
More...
#include <CStandardAttributesFactory.h>
Basic implementation of an property container.
Definition at line 16 of file CStandardAttributesFactory.h.
◆ CreateInstance()
Create an instance of the object, mapped to the keyId keyId.
- Parameters
-
- 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.
IFactoryInfo* factory = GetFactory();
IFactoryInfo::KeyList keys = factory->GetFactoryKeys();
if (keys.contains("mytype")) {
}
for (const QByteArray& key : keys) {
qDebug() << "Available type:" << key;
}
- See also
- istd::IFactory::CreateInstance()
Implements istd::IFactoryInfo.
◆ GetInstance()
The documentation for this class was generated from the following file: