VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
decoratorFactory.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 
10 #include <map>
11 
12 class DtSimObject;
13 class DtLocalObject;
14 
18 {
19 private:
21  DtDecoratorFactory& operator=(const DtDecoratorFactory&);
22 
23 public:
26 
28  virtual ~DtDecoratorFactory();
29 
31  static DtDecoratorFactory* instance();
32 
34  virtual bool addDecoratorCreator(DtDecoratorCreator*);
35 
37  virtual DtSimObjectDecorator* createDecorator(const std::string& Decorator, const DtSimObject*);
38 
40  virtual DtLocalObjectDecorator* createDecorator(const std::string& Decorator, DtLocalObject*);
41 
42 protected:
43  typedef std::map<std::string, DtDecoratorCreator*> DecoratorCreators;
45 };
46 
47 #define REGISTER_DECORATOR(DecoratorCreator) static bool Register##DecoratorCreator = DtDecoratorFactory::instance()->addDecoratorCreator(new DecoratorCreator);
The DtDecoratorFactory is a container for the creators for proxy logics (DtSimObject or DtLocalObject...
Definition: decoratorFactory.h:17
std::map< std::string, DtDecoratorCreator * > DecoratorCreators
Definition: decoratorFactory.h:43
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
Definition: decoratorBase.h:53
DecoratorCreators myDecoratorCreators
Definition: decoratorFactory.h:44
Definition: decoratorBase.h:30
Definition: decoratorBase.h:40
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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)