VR-Forces 4.1.1 Class Documentation
spaceSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: spaceSR.h,v $ $Revision: 1.12 $ $State: Exp $
7 *******************************************************************************/
8 
9 
10 //
11 //File: spaceSR.h
12 //
13 //Class: DtSpaceEntityStateRepository
14 //
15 //Description: This repository holds all information that is common to all the
16 //forms of space entities within the system. It contains a pointer
17 //to the space entity parameters, and provides accessors and mutators
18 //for all parameter values. In this example, we add a single new parameter,
19 //myMaxHullTemperature, representing the maximum outer hull temperature that
20 //this entity can sustain (e.g. such as during reentry). Any future
21 //controller and actuator components we build to simulate the entity's
22 //behavior can view or set this new parameter as necessary.
23 //
24 
25 
26 #ifndef DtSpaceEntityStateRepository_H_
27 #define DtSpaceEntityStateRepository_H_
28 
29 
30 #include <vlutil/vlMachineTypes.h>
31 #include "vrfobjcore/vrfObject.h"
32 #include "vrfobjcore/groundInter.h"
33 #include "vrfobjcore/vrfMvObjSR.h"
34 #include "vrfobjcore/vrfObjSR.h"
35 
37 class DtVector;
38 
40 {
41 
42 public:
43 
44  //Constructor with parameters to set up read/writability correctly.
47  const DtString& name, DtReaderWriterRegistry* parentRegistry = 0);
48 
49  //copy constructor
51 
52  //assignment operator
54  const DtSpaceEntityStateRepository& orig);
55 
56  //destructor
58 
59  virtual bool init();
60 
61  //Returns a unique string identifying the type of component,
62  //DtSpaceVehicleSRType (defined in spacetypes.h). Used a key in
63  //the state repository factory.
64  virtual DtString type() const;
65 
66  //Override to create an instance DtSpaceEntityParameters and
67  //set it in myParameters data member.
68  virtual bool createParameters();
69 
70  //Override to initialize space entity specific parameters from
71  //our parameters object.
72  virtual void initializeFromParameters();
73 
74  //Implemented for convenience. Since we overrode createParameters()
75  //to create a DtSpaceEntityParameters object (a derived kind of
76  //DtSimObjectParameters), we provide an accessor casting it to the
77  //dervied type.
78  virtual const DtSpaceEntityParameters * spaceEntityParameters() const;
79 
80  //Accessor/mutator for our new parameter, myMaxHullTemperature.
81  //Set/get maximum hull temperature this entity can sustain (degrees C).
82  virtual void setMaxHullTemperature(DtReal temp);
83  virtual DtReal maxHullTemperature() const;
84 
85  //Returns a newly created instance of this class. To be registered
86  //with the state repository factory.
87  static DtVrfObjectStateRepository * creator(const DtString& name,
88  DtVrfObject* vrfObject,const DtObjectType& objectType,
89  DtVrfObjectParameters* parameters, DtReaderWriterRegistry* parentRegistry);
90 
91  //Returns a the pointer the repository, if the repository passed
92  //in is of type DtSpaceEntityStateRepository, 0 if not. Implmementation
93  //is optional - may be useful for safe type checking.
95  const DtVrfObjectStateRepository* repository);
96 
97 protected:
98 
99  //Maximum hull temperature (in degrees Celsius).
101 };
102 
103 #endif

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)