class
cPropManagerThe implementation of IPropManager; this should only be used for extending and detouring.
Base classes
- class IPropManager
- A manager that stores all the property lists in the game, used for most configurations.
- class Resource::IResourceFactory
- An interface that can be used to create resources of certain types.
- class IMessageListener
- An interface that can receive messages sent through the app.
Constructors, destructors, conversion operators
- cPropManager()
- ~cPropManager() virtual
Public functions
-
auto HandleMessage(uint32_
t messageID, void* msg) -> bool override - Called every time a message is received.
-
auto GetFactoryType() -> uint32_
t override -
auto CreateResource(Resource::
IRecord* pRecord, ResourceObjectPtr& pDst, void* extraData, uint32_ t typeID) -> bool override - Creates a new resource of the specified type, using the file record given.
-
auto CreateResourceAsync(IAsyncRequestPtr* ppDst,
int16_
t, Resource:: IRecord* pRecord, void* extraData, uint32_ t typeID, int) -> bool override -
auto ReadResource(Resource::
IRecord* pRecord, Resource:: ResourceObject* pResource, void* extraData, uint32_ t typeID) -> bool override - Reads the data into the resource given.
-
auto WriteResource(Resource::
ResourceObject* pResource, Resource:: IRecord* pRecord, void* extraData, uint32_ t typeID) -> bool override - Reads the resource into the file given.
-
auto GetSupportedTypes(uint32_
t* pDstTypes, size_ t count) const -> size_ t override - This method must tell all the type IDs that are accepted by this factory.
-
auto CanConvert(uint32_
t typeID, uint32_ t subTypeID) -> bool override - This method must tell whether this type ID (which might be a generic one, e.g.
- auto AddRef() -> int override
- auto Release() -> int override
- auto SetDevMode(bool value) -> void override
- auto Initialize() -> bool override
- auto PreloadPropertyLists() -> void override
- auto Dispose() -> bool override
-
auto GetIDFromName(const char* propertyName,
uint32_
t& result) -> bool override - Gets the ID that corresponds to the given property name.
-
auto GetNameFromID(uint32_
t propertyID) -> const char* override - Gets the name that is mapped to the given propertyID.
-
auto GetPropertyGroupIDFromName(const char* name,
uint32_
t& result) -> bool override -
auto GetNameFromPropertyGroupID(uint32_
t propertyGroupID) -> const char* override - Gets the name assigned to the given property group ID.
-
auto HasPropertyList(uint32_
t instanceID, uint32_ t groupID) -> bool override - Tells whether a PropertyList with the given instanceID and groupID is contained in this manager.
-
auto GetPropertyList(uint32_
t instanceID, uint32_ t groupID, PropertyListPtr& pDst) -> bool override - Gets the PropertyList stored in the given group and with the given instanceID.
-
auto GetGlobalPropertyList(uint32_
t instanceID, PropertyListPtr& pDst) -> bool override - Gets the PropertyList stored in the global (0x00000000) folder and with the given instanceID.
-
auto AddPropertyList(PropertyList* pList,
uint32_
t instanceID, uint32_ t groupID) -> void override - Adds this property list with the given instance and group ID, or replaces the existing one.
- auto RemovePropertyList(PropertyList* pList) -> void override
- auto RemovePropertyLists(int count, const ResourceKey* keys) -> void override
-
auto RemovePropertyLists2(uint32_
t groupID, int count, uint32_ t* instanceIDs) -> void override - auto AreAnyPropertyListsReferenced(int count, const ResourceKey* keys) -> bool override
-
auto GetPropertyListIDs(uint32_
t groupID, eastl::vector<uint32_ t>& result) -> bool override - Gets the instance IDs of all the PropertyList objects contained in the specified group.
- auto func4Ch(int arg_0, int arg_4) -> void* override
-
auto GetPropertyDefinition(uint32_
t propertyID) -> const Property* override - Gets the property definition of the property with the given ID.
-
auto GetPropertyGroupsCount() -> size_
t override - Gets the number of property groups contained in this manager.
-
auto GetPropertyGroupIDAt(size_
t index, uint32_ t& dst) -> bool override - Gets the ID of the property group at the given index.
Public variables
- int field_10
- bool mbIsInitialized
- bool mIsDevMode
-
Resource::
IResourceManager* mpResourceMgr - bool field_1C
-
eastl::map<uint32_
t, Property> field_20 - PropertyList mPropertyDefinitions
- eastl::hash_map<ResourceID, PropertyListPtr> mPropertyLists
-
eastl::hash_map<eastl::string, uint32_
t> mNamesToPropertyIDs -
eastl::hash_map<uint32_
t, eastl::string> mPropertyIDsToNames - eastl::hash_map<eastl::string, int> mPropertyGroupNamesToIDs
-
eastl::hash_map<uint32_
t, eastl::string> mPropertyGroupNames -
eastl::vector<uint32_
t> mPropertyGroupIDs - eastl::hash_map<int, int> field_128
- eastl::hash_map<int, int> field_148
- eastl::string mCurrentPropertyName
- int field_178
-
eastl::intrusive_ptr<ArgScript::
FormatParser> field_17C - eastl::string field_180
-
ArgScript::
Line field_190 - int field_1D4
- eastl::string field_1D8
- bool mbAddToAppProperties
Function documentation
bool App:: cPropManager:: HandleMessage(uint32_ t messageID,
void* msg) override
Called every time a message is received.
Parameters | |
---|---|
messageID | The ID of the message received. |
msg | The data of the message received, it might be nullptr. |
Returns | Whether the message was handled or not. |
Only the messages with an ID this listener signed up for will call this event.
bool App:: cPropManager:: CreateResource(Resource:: IRecord* pRecord,
ResourceObjectPtr& pDst,
void* extraData,
uint32_ t typeID) override
Creates a new resource of the specified type, using the file record given.
Parameters | |
---|---|
pRecord | The IPFRecord that points to the file used by the resource (either for reading or for writing). |
pDst out | A pointer where the ResourceObject created must be written. |
extraData | |
typeID | The type ID of the file to read, which might be used to differentiate between different file formats or resource types. |
bool App:: cPropManager:: ReadResource(Resource:: IRecord* pRecord,
Resource:: ResourceObject* pResource,
void* extraData,
uint32_ t typeID) override
Reads the data into the resource given.
Parameters | |
---|---|
pRecord | The IPFRecord that points to the file that must be read. |
pResource | The ResourceObject where the data must be loaded. |
extraData | |
typeID | The type ID of the file to read, which might be used to differentiate between different file formats. |
bool App:: cPropManager:: WriteResource(Resource:: ResourceObject* pResource,
Resource:: IRecord* pRecord,
void* extraData,
uint32_ t typeID) override
Reads the resource into the file given.
Parameters | |
---|---|
pResource | The ResourceObject that must be saved. |
pRecord | The IPFRecord that points to the file that must be written. |
extraData | |
typeID | The type ID of the file to write, which might be used to differentiate between different file formats. |
size_ t App:: cPropManager:: GetSupportedTypes(uint32_ t* pDstTypes,
size_ t count) const override
This method must tell all the type IDs that are accepted by this factory.
Parameters | |
---|---|
pDstTypes out | The uint32_t array where the type IDs must be written. |
count | The size of the pDstTypes array. |
Returns | How many type IDs are supported. |
The method must return how many type IDs are supported.
bool App:: cPropManager:: CanConvert(uint32_ t typeID,
uint32_ t subTypeID) override
This method must tell whether this type ID (which might be a generic one, e.g.
Parameters | |
---|---|
typeID | |
subTypeID |
.image) and the sub type ID (e.g. .png) are accepted by this factory. The subtypeID might be 0, in which case only the type ID matters.
bool App:: cPropManager:: GetIDFromName(const char* propertyName,
uint32_ t& result) override
Gets the ID that corresponds to the given property name.
Parameters | |
---|---|
propertyName | The name of the property. |
result out | The uint32_t that will receive the ID. |
Returns | Whether the name was found or not. |
This function will only work for those names that are mapped in this manager.
const char* App:: cPropManager:: GetNameFromID(uint32_ t propertyID) override
Gets the name that is mapped to the given propertyID.
Parameters | |
---|---|
propertyID | The ID of the property. |
Returns | The name of the property, or nullptr if it is not mapped. |
This function will only work for those names that are mapped in this manager.
const char* App:: cPropManager:: GetNameFromPropertyGroupID(uint32_ t propertyGroupID) override
Gets the name assigned to the given property group ID.
Parameters | |
---|---|
propertyGroupID | The ID of the property group. |
Returns | The name of the group, or nullptr if it is not mapped. |
This function will only work if that group is mapped in this manager.
bool App:: cPropManager:: HasPropertyList(uint32_ t instanceID,
uint32_ t groupID) override
Tells whether a PropertyList with the given instanceID and groupID is contained in this manager.
Parameters | |
---|---|
instanceID | The instance ID of the list. |
groupID | The group ID of the list. |
Returns | True if the list exists, false otherwise. |
bool App:: cPropManager:: GetPropertyList(uint32_ t instanceID,
uint32_ t groupID,
PropertyListPtr& pDst) override
Gets the PropertyList stored in the given group and with the given instanceID.
Parameters | |
---|---|
instanceID | The instance ID of the list. |
groupID | The group ID of the list. |
pDst | A PropertyListPtr that will receive the list. It must not be initialized or contain nullptr; the previous pointer won't be released. |
Returns | Whether the list was found or not. |
bool App:: cPropManager:: GetGlobalPropertyList(uint32_ t instanceID,
PropertyListPtr& pDst) override
Gets the PropertyList stored in the global (0x00000000) folder and with the given instanceID.
Parameters | |
---|---|
instanceID | The instance ID of the list. |
pDst | An PropertyListPtr that will receive the list. It must not be initialized or contain nullptr; the previous pointer won't be released. |
Returns | Whether the list was found or not. |
void App:: cPropManager:: AddPropertyList(PropertyList* pList,
uint32_ t instanceID,
uint32_ t groupID) override
Adds this property list with the given instance and group ID, or replaces the existing one.
Parameters | |
---|---|
pList | The new PropertyList. |
instanceID | The instance ID of the property list. |
groupID | The group ID of the property list. |
bool App:: cPropManager:: GetPropertyListIDs(uint32_ t groupID,
eastl::vector<uint32_ t>& result) override
Gets the instance IDs of all the PropertyList objects contained in the specified group.
Parameters | |
---|---|
groupID | The ID of the group where the lists are (i.e. the folder) |
result out | A uint32_t vector that will receive the instance IDs. |
const Property* App:: cPropManager:: GetPropertyDefinition(uint32_ t propertyID) override
Gets the property definition of the property with the given ID.
Parameters | |
---|---|
propertyID | The ID of the property. |
Returns | The Property that contains the type and default value, or nullptr if there is no definition for that property. |
The definition is a Property object that contains the type and default value of the property. Definitions are stored in the Properties.txt, AppProperties.txt, etc files.
bool App:: cPropManager:: GetPropertyGroupIDAt(size_ t index,
uint32_ t& dst) override
Gets the ID of the property group at the given index.
Parameters | |
---|---|
index | The index of the group inside this manager. |
dst out | The uint32_t that will receive the ID. |
Returns | Whether the index was valid or not. |