You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
The ConfigurableStack makes configuring stacks and arrays through the Settings Registry easier than using direct serialization to a container like AZStd::vector. It does this by using JSON Objects rather than JSON arrays, although arrays are supported for backwards compatibility. Two key words were added:
- $stack_before : Insert the new entry before the referenced entry. Referencing is done by name.
- $stack_after : Insert the new entry after the referenced entry. Referencing is done by name.
to allow inserting new entries at specific locations. An example of a .setreg file at updates existing settings would be:
// Original settings
{
"Settings in a stack":
{
"AnOriginalEntry":
{
"MyValue": "hello",
"ExampleValue": 84
},
"TheSecondEntry":
{
"MyValue": "world"
}
}
}
// Customized settings.
{
"Settings in a stack":
{
// Add a new entry before "AnOriginalEntry" in the original document.
"NewEntry":
{
"$stack_before": "AnOriginalEntry",
"MyValue": 42
},
// Add a second entry after "AnOriginalEntry" in the original document.
"SecondNewEntry":
{
"$stack_after": "AnOriginalEntry",
"MyValue": "FortyTwo".
},
// Update a value in "AnOriginalEntry".
"AnOriginalEntry":
{
"ExampleValue": 42
},
// Delete the "TheSecondEntry" from the settings.
"TheSecondEntry" : null,
}
}
The ConfigurableStack uses an AZStd::shared_ptr to store the values. This supports settings up a base class and specifying derived classes in the settings, but requires that the base and derived classes all have a memory allocator associated with them (i.e. by using the "AZ_CLASS_ALLOCATOR" macro) and that the relation of the classes is reflected. Loading a ConfigurableStack can be done using the GetObject call on the SettingsRegistryInterface.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
|
4 years ago | |
|---|---|---|
| .. | ||
| AZStd | 4 years ago | |
| AZTestShared | 5 years ago | |
| Asset | 4 years ago | |
| Console | 4 years ago | |
| DOM | 4 years ago | |
| Debug | 4 years ago | |
| EBus | 4 years ago | |
| IO | 4 years ago | |
| Math | 4 years ago | |
| Memory | 4 years ago | |
| Name | 4 years ago | |
| Platform | 4 years ago | |
| RTTI | 5 years ago | |
| Serialization/Json | 4 years ago | |
| Settings | 4 years ago | |
| Streamer | 4 years ago | |
| Time | 4 years ago | |
| AssetJsonSerializerTests.cpp | 4 years ago | |
| AssetManager.cpp | 4 years ago | |
| AssetSerializerTests.cpp | 5 years ago | |
| AzEnumTest.cpp | 5 years ago | |
| BehaviorContext.cpp | 5 years ago | |
| BehaviorContextFixture.h | 4 years ago | |
| Components.cpp | 4 years ago | |
| DLL.cpp | 5 years ago | |
| DLLMainTest.cpp | 5 years ago | |
| Debug.cpp | 4 years ago | |
| EBus.cpp | 4 years ago | |
| EntityIdTests.cpp | 5 years ago | |
| EntityTests.cpp | 5 years ago | |
| EnumTests.cpp | 5 years ago | |
| EventTests.cpp | 5 years ago | |
| FileIOBaseTestTypes.h | 4 years ago | |
| FixedWidthIntegers.cpp | 5 years ago | |
| GenericStreamMock.h | 5 years ago | |
| GenericStreamTests.cpp | 5 years ago | |
| Geometry2DUtils.cpp | 5 years ago | |
| IPC.cpp | 5 years ago | |
| Interface.cpp | 5 years ago | |
| IntersectPoint.cpp | 5 years ago | |
| JSON.cpp | 5 years ago | |
| Jobs.cpp | 4 years ago | |
| Main.cpp | 5 years ago | |
| Memory.cpp | 4 years ago | |
| Module.cpp | 5 years ago | |
| ModuleTestBus.h | 5 years ago | |
| OrderedEventBenchmarks.cpp | 5 years ago | |
| OrderedEventTests.cpp | 5 years ago | |
| Outcome.cpp | 5 years ago | |
| Patching.cpp | 5 years ago | |
| RemappableId.cpp | 5 years ago | |
| Rtti.cpp | 4 years ago | |
| Script.cpp | 5 years ago | |
| ScriptMath.cpp | 4 years ago | |
| ScriptProperty.cpp | 5 years ago | |
| Serialization.cpp | 4 years ago | |
| SerializeContextFixture.h | 5 years ago | |
| Slice.cpp | 5 years ago | |
| State.cpp | 5 years ago | |
| StatisticalProfiler.cpp | 4 years ago | |
| Statistics.cpp | 5 years ago | |
| StreamerTests.cpp | 4 years ago | |
| StringFunc.cpp | 4 years ago | |
| SystemFile.cpp | 5 years ago | |
| TaskTests.cpp | 4 years ago | |
| TestCatalog.cpp | 4 years ago | |
| TestCatalog.h | 4 years ago | |
| TickBusTest.cpp | 5 years ago | |
| UUIDTests.cpp | 4 years ago | |
| XML.cpp | 5 years ago | |
| azcoretestdll_files.cmake | 5 years ago | |
| azcoretests_files.cmake | 4 years ago | |
| aztestshared_files.cmake | 5 years ago | |