#include <Locale.h>
Inherits AZ::Locale::ScopedSerializationLocale_Platform.
Public Member Functions | |
| ScopedSerializationLocale (bool autoActivate=true) | |
| void | Activate () |
| void | Deactivate () |
| Deactivate the invariant serialization locale for this thread. | |
Public Member Functions inherited from AZ::Locale::ScopedSerializationLocale_Platform | |
| void | Activate () |
| void | Deactivate () |
| void | Activate () |
| void | Deactivate () |
This class allows you to activate a culture invariant locale for the current thread, so that numbers and currency serialize using the same format regardless of the machine locale.
Note that there are some cases in the engine where a serialization context object is created for serialize operations, which is a great place to store the scoped serialization locale object, but often such a context object is reserved/created on a different thread from where the serializing actually happens. This is why you can opt to not auto-activate the locale on construction.
You can repeatedly call Activate and Deactivate.
Platform-specific implementations will not allocate on the heap, so this object can be used before the heap is ready.
| void AZ::Locale::ScopedSerializationLocale::Activate | ( | ) |
Activate the invariant serialization locale for this thread. This does not happen automatically. You must call this to enter the invariant serialization locale.