ResultValuesBlock.h
1 //##################################################################################################
2 //
3 // Ceetron Export
4 // Component: VTFx
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2015, 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 "CeeVTFx/Base.h"
16 #include "CeeVTFx/Block.h"
17 
18 #include "CeeCore/Vec3f.h"
19 
20 #include <vector>
21 
22 class VTFxResultValuesBlock;
23 
24 namespace cee {
25 namespace vtfx {
26 
27 //=================================================================================================================================
28 //
29 //
30 //
31 //=================================================================================================================================
32 class CEE_VTFX_EXPORT ResultValuesBlock : public Block
33 {
34 public:
35  // Result value dimensions for ResultValuesBlock
36  // -----------------------------------------------------------------------------
38  SCALAR1D = 1,
39  VECTOR3D = 3,
40  TENSOR6D = 6
41  };
42 
43 public:
44  ResultValuesBlock(int blockId, ResultValueDimension dimension, bool mapToItemIds);
46 
47  int mapToBlockId() const;
48  bool setMapToBlockId(int blockId, BlockType blockType);
49  std::vector<int> mapToItemIds() const;
50  bool hasMapToItemIds() const;
51  ResultValueDimension dimension() const;
52 
53  std::vector<float> resultValues() const;
54  bool setResultValues(const std::vector<float>& resultValues, const std::vector<int>& mapToItemIds = std::vector<int>());
55 
56  bool allocateResultValues(int numResultValues);
57  bool addResultValue1d(float scalarResultValue, int mapToItemId = -1);
58  bool addResultValue3d(float vectorResultValueX, float vectorResultValueY, float vectorResultValueZ, int mapToItemId = -1);
59 
60  bool checkValidity() const;
61 
62 private:
63  ResultValuesBlock(VTFxResultValuesBlock* block, int blockId);
64 
65  VTFxBlock* internal_vtfxBlock() const;
66 
67 private:
68  friend class DatabasePrivate;
69 
70  CEE_PRIVATE_IMPL(ResultValuesBlock);
71  CEE_DISALLOW_COPY_AND_ASSIGN(ResultValuesBlock);
72 };
73 
74 }
75 }
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
A block containing the actual result values for a specific result.
Definition: ResultValuesBlock.h:32
ResultValueDimension
Global dimension constants used by Ceetron Export. These constants are used for various methods of Re...
Definition: ResultValuesBlock.h:37
Abstract base class for all VTFx blocks.
Definition: Block.h:29