VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
changeTimeOfDayCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrfplan/simCommand.h"
14 #include "vrfplan/vrfplanDefines.h"
15 #include <readerWriter/rwReal.h>
16 #include <readerWriter/rwBoolean.h>
17 
21 {
22 public:
23 
26 
28  DtChangeTimeOfDayCommand(const DtString& writeName,
29  DtReaderWriterRegistry* parentRegistry = NULL);
30 
32  DtChangeTimeOfDayCommand(const DtString & writeName, const DtChangeTimeOfDayCommand& orig,
33  DtReaderWriterRegistry* parentRegistry = NULL);
34 
36  virtual ~DtChangeTimeOfDayCommand() override;
37 
40 
42  virtual const DtSimCommandMessageType& type() const override;
43 
45  virtual DtSimCommand * clone(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0) const override;
46 
47  virtual int netRepSize() const override;
48  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
49  virtual bool setToNet() override;
50 
52 
53  virtual void setDateAndTimeOfDay(time_t secondsPastMidnight);
54  virtual time_t dateAndTimeOfDay() const;
55  virtual bool changeDateAndTimeOfDay() const;
57 
59 
60  virtual void setUseDayNightIlluminationModel(bool);
62  virtual bool useDayNightIlluminationModel() const;
63  virtual bool changeUseDayNightIlluminationModel() const;
65 
67 
68  virtual void setTimeOfDayAdvanceSpeed(double secondsPastMidnight);
69  virtual double timeOfDayAdvanceSpeed() const;
70  virtual bool changeTimeOfDayAdvanceSpeed() const;
72 
78 
79  virtual void setGeneratedByRemoteSetter(bool value);
80  virtual bool generatedByRemoteSetter() const;
82 
84  virtual DtString stringRep() const override;
85 
86  static DtSimCommand* creator();
87 
88 protected:
90  virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths = DtReaderWriter::SearchPaths(),
91  const DtVariableBindingsList& variableBindings = nullVariableReference()) override;
92 
93 protected:
94 
99 };
100 
DtRwBoolean myUseDayNightIlluminationModel
Definition: changeTimeOfDayCommand.h:98
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimSimCommand*...
virtual DtString stringRep() const =0
Returns a human-readable string representation of the command. This string representation is used to ...
Definition: readerWriterRegistry.h:39
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubsimCommand member from the incoming contentBuffer (cast to type DtNetSimSimCommand). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimCommand::netRepSize().
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DtRwReal myToDAdvanceSpeed
Definition: changeTimeOfDayCommand.h:96
const DtSimCommand & operator=(const DtSimCommand &orig)
assignment operator; same as copy constructor
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
static const DtVariableBindingsList & nullVariableReference()
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
virtual DtSimCommand * clone() const
Version of clone that preserves the existing name, and assigns a null parent registry.
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
virtual const DtSimCommandMessageType & type() const =0
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
DtRwBoolean myGeneratedByRemoteSetter
Definition: changeTimeOfDayCommand.h:97
DtRwReal mySecondsPastUTC
Definition: changeTimeOfDayCommand.h:95
A DtSimCommand subclass which specifies a change to the time of day settings in the simulation engine...
Definition: changeTimeOfDayCommand.h:20

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)