source: molecuilder/src/World.hpp@ 181488

Last change on this file since 181488 was 2e8296, checked in by Tillmann Crueger <crueger@…>, 16 years ago

Started development of World Class

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * World.hpp
3 *
4 * Created on: Feb 3, 2010
5 * Author: crueger
6 */
7
8#ifndef WORLD_HPP_
9#define WORLD_HPP_
10
11#include <boost/thread.hpp>
12
13#include "Patterns/Observer.hpp"
14#include "Patterns/Cacheable.hpp"
15
16// forward declarations
17class periodentafel;
18class MoleculeListClass;
19
20class World : public Observable
21{
22public:
23
24 /***** getter and setter *****/
25 periodentafel* getPeriode();
26private:
27 periodentafel *periode;
28
29
30 /***** singleton Stuff *****/
31public:
32 static World* get();
33 static void destroy();
34 static World* reset();
35
36private:
37 World();
38 virtual ~World();
39
40 static World *theWorld;
41 // this mutex only saves the singleton pattern...
42 // use other mutexes to protect internal data as well
43 // this mutex handles access to the pointer, not to the object!!!
44 static boost::mutex worldLock;
45
46 /*****
47 * some legacy stuff that is include for now but will be removed later
48 *****/
49public:
50 MoleculeListClass *getMolecules();
51private:
52 MoleculeListClass *molecules;
53};
54
55#endif /* WORLD_HPP_ */
Note: See TracBrowser for help on using the repository browser.