VR-Forces 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() override;
35 
36  //assignment operator
38 
39  //returns a newly created copy of this object
41  const DtString& rwName = DtString::nullString(), DtReaderWriterRegistry* parentRegistry = 0) const override;
42 
43  //Returns the string type of this process state repository.
44  virtual DtString type() const override;
45 
46  //Get / Set the elapsed time state variable.
47  virtual void setElapsedTime(double time);
48  virtual double elapsedTime() const;
49 
50 public:
51 
52  //Returns a newly created instance of this class.
53  static DtVrfProcessStateRepository* creator (const DtString& rwName,
54  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
55 
56 protected:
57 
59 };
virtual ~DtTimeKeeperPSR() override
DtRwReal myElapsedTime
Definition: timeKeeperPSR.h:58
static DtVrfProcessStateRepository * creator(const DtString &rwName, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Definition: readerWriterRegistry.h:39
virtual void setElapsedTime(double time)
virtual DtString type() const override
Returns the string type of the repository, as defined in psrTypes.h.
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
DtTimeKeeperPSR & operator=(const DtTimeKeeperPSR &orig)
virtual double elapsedTime() const
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const override
const DtSimObject * vrfObject() const
Definition: vrfProcessStateRepository.h:98
Definition: timeKeeperPSR.h:19
A locally simulated VRF object.
Definition: localObject.h:98
DtTimeKeeperPSR(DtLocalObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)