19.1.6.1.3. DynamicDataFactory
-
class DynamicDataFactory : public std::enable_shared_from_this<DynamicDataFactory>
Public Functions
-
virtual traits<DynamicData>::ref_type create_data(traits<DynamicType>::ref_type type) = 0
Creates a new DynamicData reference based on the given DynamicType reference. All objects returned by this operation should eventually be deleted by calling delete_data.
- Parameters:
type – [in] DynamicType reference associated.
- Returns:
new DynamicData reference
-
virtual ReturnCode_t delete_data(traits<DynamicData>::ref_type &data) = 0
Resets the internal reference if it is cached.
- Parameters:
data – [in] DynamicData reference whose internal cached reference to reset.
- Return values:
RETCODE_BAD_PARAMETER – if reference is nil.
RETCODE_OK – is otherwise returned.
- Returns:
standard ReturnCode_t
Public Static Functions
-
static traits<DynamicDataFactory>::ref_type get_instance()
Returns the singleton factory object.
Remark
This method is non thread-safe.
- Returns:
DynamicDataFactory reference.
-
static ReturnCode_t delete_instance()
Resets the singleton reference.
- Return values:
RETCODE_BAD_PARAMETER – if singleton reference is currently nil.
RETCODE_OK – otherwise.
- Returns:
ReturnCode_t
-
virtual traits<DynamicData>::ref_type create_data(traits<DynamicType>::ref_type type) = 0