VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
myObjectManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #include "mySettingsManager.h"
10 
11 class DtTestSettings;
12 
14 {
15 public:
16 
17  //The constructor takes a DtSimulationServices and entityAdvisory which get passed
18  //to the base class
20 
21  //destructor
22  virtual ~MyObjectManager();
23 
24  //Adds to the existing settings file as well as creating a new one
25  virtual bool init();
26 
27  //Callback registered as a consumer for the test setting. This will be
28  //called when settingsManagerRemote changes the setting.
29  static void testSettingsChangedCallback(
30  const DtSettingsObject* settings, void* usr);
31  //Stores the values from the settings in myDoubleValue and myBoolValue
32  virtual void processTestSettingsChanged(const DtTestSettings* settings);
33 
34  //Callback registered as a producer for the test setting. This will be
35  //called any time the settings manager looks up the setting, including
36  //when the settings file is written out.
37  static void updateTestSettingsCallback(
38  DtSettingsObject* settings, void* usr);
39  //Copies myDoubleValue and myBoolValue into the setting object
40  virtual void processUpdateTestSettings(DtTestSettings* settings);
41 
42 public:
43 
44  //Creator function to be registered with the DtDefaultVrfCreator from
45  //main.cxx
47 
48 public:
49  //Settings manager for the new settings file
51 
52  //Example data which needs to be saved out to the settings files. This
53  //class is the "owner" of this data, the settings manager only asks for
54  //it when it needs to write out the settings file by calling
55  //updateTestSettingsCallback.
56  double myDoubleValue;
58 };
class DtLocalObjectManager:
Definition: localObjectManager.h:151
Definition: mySettingsManager.h:11
Definition: testSettings.h:24
MySettingsManager * mySettingsManager
Definition: myObjectManager.h:50
static void updateTestSettingsCallback(DtSettingsObject *settings, void *usr)
Definition: settingsObject.h:27
virtual ~MyObjectManager()
virtual void processUpdateTestSettings(DtTestSettings *settings)
virtual void processTestSettingsChanged(const DtTestSettings *settings)
double myDoubleValue
Definition: myObjectManager.h:56
virtual bool init()
Initialization - must be called before any other member functions are called. Sets the type of object...
bool myBoolValue
Definition: myObjectManager.h:57
static DtLocalObjectManager * creator(DtSimulationServices *simManager)
MyObjectManager(DtSimulationServices *simManager)
static void testSettingsChangedCallback(const DtSettingsObject *settings, void *usr)
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
Definition: myObjectManager.h:10
VRF4API_METHOD const DtSimulationServices * simManager() const
Deprecated methods. Please see the localObjectManager.inl file for how you would convert your code...

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)