Situation.h
1 //##################################################################################################
2 //
3 // Ceetron Analyzer
4 //
5 // --------------------------------------------------------------------------------------------
6 // Copyright (C) 2018, Ceetron AS
7 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
8 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
9 // without the prior written permission of Ceetron AS.
10 //##################################################################################################
11 
12 
13 #pragma once
14 
15 #include "CeeCore/Base.h"
16 #include "CeeCore/PtrRef.h"
17 #include "CeeCore/RefCountedObject.h"
18 #include "CeeCore/Str.h"
19 #include "CeeCore/Variant.h"
20 
21 #include "CeeUnstructGrid/SetInfo.h"
22 
23 #include <map>
24 
25 
26 namespace cee {
27  class Image;
28  class PropertySetCollection;
29 
30 namespace vis { class View; }
31 
32 namespace ug {
33  class DataElementSet;
34  class UnstructGridModel;
35 
36 //==================================================================================================
37 //
38 //
39 //
40 //==================================================================================================
41 class CEE_UG_EXPORT Situation : public RefCountedObject
42 {
43 public:
44  Situation();
45  virtual ~Situation();
46 
47  const PropertySetCollection* propertyCollection() const;
48  void setPropertyCollection(PropertySetCollection* collection);
49 
50  void setName(const Str& name);
51  Str name() const;
52 
53  void setDescription(const Str& description);
54  Str description() const;
55 
56  void setSourceModelFile(const Str& modelfile);
57  Str sourceModelFile() const;
58 
59  void setSnapshot(Image* image);
60  const Image* snapshot() const;
61 
62  Str date() const;
63 
64  std::vector<const DataElementSet*> elementSets() const;
65  std::vector<SetInfo> elementSetInfos() const;
66  void addElementSetInfo(SetInfo setInfo);
67  void addElementSet(const DataElementSet* set);
68 
69  size_t userDataCount() const;
70  Str userData(const Str& name) const;
71  void setUserData(const Str& name, const Str& value);
72  void setAllUserData(std::map<Str, Str> ud);
73  const std::map<Str, Str>* allUserData() const;
74 
75  void capture(const UnstructGridModel& model, const vis::View& view);
76 
77  void updateModel(UnstructGridModel* model) const;
78  void updateView(vis::View* view) const;
79 
80 private:
81  void setDate(const Str& date);
82 
83  CEE_PRIVATE_IMPL(Situation);
84  CEE_BASE_F(SituationIo);
85  CEE_BASE_F(SituationIoPrivate);
86  CEE_DISALLOW_COPY_AND_ASSIGN(Situation);
87 };
88 
89 }
90 }
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
A class to read and write a Situation.
Definition: SituationIo.h:32
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
A situation stores the setup of the unstructgrid model and view.
Definition: Situation.h:41
A collection of property sets.
Definition: PropertySetCollection.h:29
Provides a render area in the user control/widget to enable visualization of the current model data a...
Definition: View.h:40
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72
A DataElementSet is a set of unique elements within a DataSource.
Definition: DataElementSet.h:31
Simple class containing metadata info for a set.
Definition: SetInfo.h:29