DataNodeSet.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2016, 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 #include "CeeUnstructGrid/DataNodeSetItem.h"
17 #include "CeeCore/RefCountedObject.h"
18 
19 #include <vector>
20 
21 namespace cee {
22 namespace ug {
23 
24 class DataSourcePrivate;
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_UG_EXPORT DataNodeSet : public RefCountedObject
32 {
33 public:
34  DataNodeSet(int setId);
35  virtual ~DataNodeSet();
36 
37  bool isEqual(const DataNodeSet& rhs) const;
38 
39  int id() const;
40 
41  size_t itemCount() const;
42  size_t itemIndex(const DataNodeSetItem& item) const;
43  DataNodeSetItem item(size_t index) const;
44  void addItem(const DataNodeSetItem& item);
45  void addItems(int geometryId, int partId, const std::vector<size_t>& nodeIndices);
46 
47  void removeItem(const DataNodeSetItem& item);
48  void removeAllItems();
49 
50  void unionWith(const DataNodeSet& other);
51  void intersect(const DataNodeSet& other);
52  void subtract(const DataNodeSet& other);
53 
54 private:
55  CEE_PRIVATE_F(DataSource);
56  CEE_PRIVATE_F(DataNodeSetGenerator);
57  CEE_PRIVATE_IMPL(DataNodeSet);
58  CEE_DISALLOW_COPY_AND_ASSIGN(DataNodeSet);
59 };
60 
61 } // namespace ug
62 } // namespace cee
The data source of the model. For instance a file interface or custom built by the user...
Definition: DataSource.h:35
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
This class is used to generate DataNodeSet&#39;s from the current DataSource of an UnstructGridModel.
Definition: DataNodeSetGenerator.h:31
This class identifies a node within an UnstructGrid model and is used as an item in a DataNodeSet...
Definition: DataNodeSetItem.h:25
A DataNodeSet is a set of unique nodes within a DataSource.
Definition: DataNodeSet.h:31