Parts.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: App
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 "CeeApp/Base.h"
16 #include "CeeCore/RefCountedObject.h"
17 #include "CeeCore/Str.h"
18 
19 #include "CeeUnstructGrid/PartInfo.h"
20 
21 namespace cee {
22 
23 namespace ug
24 {
25  class DataPart;
26 }
27 
28 namespace app {
29 
30 
31 //==================================================================================================
32 //
33 // Class for simplified access to the parts in the currents state of the current unstructured grid model
34 //
35 //==================================================================================================
36 class CEE_APP_EXPORT Parts : public RefCountedObject
37 {
38 
39 public:
40  static Parts* instance();
41 
42  size_t count() const;
43 
44  cee::ug::DataPart* current() const;
45  cee::ug::PartInfo currentInfo() const;
46  void setCurrent(cee::ug::DataPart* part);
47 
48  size_t currentIndex() const;
49  void setCurrentIndex(size_t index);
50 
51  size_t indexOf(const cee::ug::DataPart* part) const;
52  cee::ug::DataPart* get(size_t index) const;
53  cee::ug::DataPart* get(const cee::Str& wildcard) const;
54 
55  cee::ug::PartInfo info(size_t index) const;
56  cee::ug::PartInfo info(cee::ug::DataPart* part) const;
57 
58  size_t geometryIndex(size_t index) const;
59  size_t geometryIndex(const cee::ug::DataPart* part) const;
60 
61 private:
62  Parts();
63  virtual ~Parts();
64  CEE_PRIVATE_IMPL(Parts);
65  CEE_DISALLOW_COPY_AND_ASSIGN(Parts);
66 
67 };
68 
69 
70 } // namespace cee
71 } // namespace app
A part in the geometry. Consists of a collection of node coordinates and a collection element connect...
Definition: DataPart.h:28
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Simple class containing metadata info for a part.
Definition: PartInfo.h:29
Class that provides access by index or by name pattern to all parts of the current UnstructGridModel...
Definition: Parts.h:36