VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
timeKeeperPSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #include <readerWriter/rwReal.h>
10 
11 //class DtTimeKeeperPSR:
12 //
13 //This is a sample Process State Repository which has only one value
14 //which is elapsed time. This data will be written to and read from
15 //the OOB file when a scenario checkpoint is saved and loaded.
16 
17 extern const char* TimeKeeperPSRType;
18 
20 {
21 public:
22 
23  //constructor
25  const DtString& rwName = DtString::nullString(),
26  DtReaderWriterRegistry* parentRegistry = 0);
27 
28  //copy constructor
29  DtTimeKeeperPSR(const DtTimeKeeperPSR& orig,
30  const DtString& rwName = DtString::nullString(),
31  DtReaderWriterRegistry* parentRegistry = 0);
32 
33  //destructor
34  virtual ~DtTimeKeeperPSR();
35 
36  //assignment operator
38 
39  //returns a newly created copy of this object
41  const DtString& rwName = DtString::nullString(),
42  DtReaderWriterRegistry* parentRegistry = 0) const;
43 
44  //Returns the string type of this process state repository.
45  virtual DtString type() const;
46 
47  //Get / Set the elapsed time state variable.
48  virtual void setElapsedTime(double time);
49  virtual double elapsedTime() const;
50 
51 public:
52 
53  //Returns a newly created instance of this class.
54  static DtVrfProcessStateRepository* creator (const DtString& rwName,
55  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
56 
57 protected:
58 
60 };
DtRwReal myElapsedTime
Definition: timeKeeperPSR.h:59
static DtVrfProcessStateRepository * creator(const DtString &rwName, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Definition: readerWriterRegistry.h:39
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const
virtual void setElapsedTime(double time)
const char * TimeKeeperPSRType
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
virtual ~DtTimeKeeperPSR()
DtTimeKeeperPSR & operator=(const DtTimeKeeperPSR &orig)
virtual double elapsedTime() const
const DtSimObject * vrfObject() const
Definition: vrfProcessStateRepository.h:98
virtual DtString type() const
Returns the string type of the repository, as defined in procSRTypes.h.
Definition: timeKeeperPSR.h:19
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
DtTimeKeeperPSR(DtLocalObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)