Snapshot.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Report
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2013, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeCore/RefCountedObject.h"
16 
17 #include "CeeCore/Image.h"
18 #include "CeeReport/Table.h"
19 #include "CeeUnstructGrid/VTFxMemoryFile.h"
20 
21 #include <string>
22 #include <map>
23 
24 namespace cee {
25 namespace ug {
26  class UnstructGridModel;
27 }
28 namespace rep {
29 
30 
31 //==================================================================================================
32 //
33 //
34 //
35 //==================================================================================================
36 class CEE_REP_EXPORT Snapshot : public RefCountedObject
37 {
38 public:
40  {
41  OBJECT_IMAGE = 1, // Image file
42  OBJECT_VTFX = 2, // VTFx file
43  OBJECT_TABLE = 3 // Tabular data
44  };
45 
46 public:
47  Snapshot(SnapshotType type);
48  virtual ~Snapshot();
49 
50  // General attributes
51  Str name() const;
52  void setName(const Str& name);
53  SnapshotType type() const;
54  Str title() const;
55  void setTitle(const Str& title);
56  Str description() const;
57  void setDescription(const Str& description);
58  Str expandedDescription() const;
59  std::map<Str, Str> fieldValues() const;
60  void setFieldValues(const std::map<Str, Str>& fieldValues);
61  Str cloudViewerUrl() const;
62  void setCloudViewerUrl(const Str& url);
63  Str originalModelPath() const;
64  void setOriginalModelPath(const Str& path);
65 
66  // Media type attributes
67  const Image* image() const;
68  void setImage(Image* image);
69  const ug::VTFxMemoryFile* modelVTFx() const;
70  void setModelVTFx(ug::VTFxMemoryFile* memoryFile);
71  bool setModelVTFxFromFile(const Str& vtfxFileName);
72  const Table* table() const;
73  void setTable(Table* table);
74 
75 
76 private:
77  CEE_PRIVATE_IMPL(Snapshot);
78  CEE_DISALLOW_COPY_AND_ASSIGN(Snapshot);
79 };
80 
81 } // namespace rep
82 } // namespace cee
83 
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A VTFx model file existing in memory.
Definition: VTFxMemoryFile.h:31
A general unicode based string class.
Definition: Str.h:28
An image, 3D model or tabular data describing a snapshot.
Definition: Snapshot.h:36
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Data table structure for use in report generation.
Definition: Table.h:30
SnapshotType
Type of data for this snapshot. Can be either an image, a 3D model or a table.
Definition: Snapshot.h:39