Open 3D Engine AzCore API Reference 26.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Locale::ScopedSerializationLocale Class Referencefinal

#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 ()
 

Detailed Description

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.

Member Function Documentation

◆ Activate()

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.


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