DataPartScalar.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, 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 "CeeUnstructGrid/Base.h"
16 
17 #include "CeeCore/RefCountedObject.h"
18 
19 #include <vector>
20 
21 namespace cee {
22 namespace ug {
23 
24 class DataPart;
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_UG_EXPORT DataPartScalar : public RefCountedObject
32 {
33 public:
35  virtual ~DataPartScalar();
36 
37  size_t count() const;
38 
39  double value(size_t index) const;
40  const double* rawValuePointer() const;
41  double* rawValuePointer();
42 
43  void resize(size_t count);
44  void setValue(size_t index, double value);
45 
46  void setValues(const std::vector<double>& values);
47  void setValues(const double values[], size_t count);
48  void setValuesFloat(const float values[], size_t count);
49 
50  bool valueRange(double* min, double* max) const;
51 
52  bool hasNodeAverageValues() const;
53  double nodeAverageValue(size_t nodeIndex) const;
54 
55  void updateMinMax();
56 
57 private:
58  CEE_PRIVATE_F(DataResultScalar);
59  CEE_PRIVATE_F(ElementsQuery);
60  CEE_PRIVATE_IMPL(DataPartScalar);
61  CEE_DISALLOW_COPY_AND_ASSIGN(DataPartScalar);
62 };
63 
64 
65 } // namespace ug
66 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A query object for extracting data and information from data elements.
Definition: ElementsQuery.h:33
Scalar result for all parts in the geometry.
Definition: DataResultScalar.h:28
Scalar result values for a part.
Definition: DataPartScalar.h:31
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34