StateInfoBlock.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 "CeeCore/Str.h"
17 
18 #include "CeeVTFx/Block.h"
19 
20 class VTFxStateInfoBlock;
21 
22 namespace cee {
23 namespace vtfx {
24 
25 //=================================================================================================================================
26 //
27 //
28 //
29 //=================================================================================================================================
30 class CEE_VTFX_EXPORT StateInfoBlock : public Block
31 {
32 public:
33  // State reference value types for StateInfoBlock
34  // -----------------------------------------------------------------------------
36  TIME = 0,
37  FREQUENCY = 1,
38  LOADCASE = 2,
39  OTHER = 3
40  };
41 
42 public:
44  ~StateInfoBlock();
45 
46  bool addStateInfo(int stateId, const Str& stateName, float stateReferenceValue, ReferenceValueType referenceValueType);
47 
48  size_t stateCount() const;
49  size_t stateIndex(int stateId) const;
50 
51  int stateId(size_t stateIndex) const;
52  Str stateName(size_t stateIndex) const;
53  float stateReferenceValue(size_t stateIndex) const;
54  ReferenceValueType stateReferenceValueType(size_t stateIndex) const;
55 
56  bool addGroupInfo(int groupId, const Str& groupName, const std::vector<int>& stateIds);
57  size_t groupCount() const;
58  int groupId(size_t groupIndex) const;
59  Str groupName(size_t groupIndex) const;
60  std::vector<int> groupStateIds(size_t groupIndex) const;
61 
62  bool checkValidity() const;
63 
64 private:
65  StateInfoBlock(VTFxStateInfoBlock* block, int blockId);
66 
67  VTFxBlock* internal_vtfxBlock() const;
68 
69 private:
70  friend class DatabasePrivate;
71 
72  CEE_PRIVATE_IMPL(StateInfoBlock);
73  CEE_DISALLOW_COPY_AND_ASSIGN(StateInfoBlock);
74 };
75 
76 }
77 }
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
A general unicode based string class.
Definition: Str.h:28
A block defining the meta data of the states in the database.
Definition: StateInfoBlock.h:30
Abstract base class for all VTFx blocks.
Definition: Block.h:29
ReferenceValueType
Global state reference value types used by Ceetron Export. These constants are used for various metho...
Definition: StateInfoBlock.h:35