OpenLexocad  27.0
Group.h
Go to the documentation of this file.
1 // //
3 // LEXOCAD API //
4 // //
5 // ©2005-2016 Cadwork Informatik. All rights reserved. //
6 // //
7 // ONLY INCLUDE OTHER INTERFACES! //
8 // Lexocad provides API Classes for public use and //
9 // Implementation Classes for private use. //
10 // //
11 // - Do ONLY include and use the LEXOCAD API in this header. //
12 // - Do not change existing interfaces. //
13 // - Document your code! //
14 // //
15 // - All types from Base, Core, Geom, Topo are allowed here. //
16 // - In the Gui modules the use of Qt types is allowed. //
17 // //
19 
20 #pragma once
21 
22 #include <OpenLxApp/DocObject.h>
23 #include <OpenLxApp/Element.h>
25 
26 namespace App
27 {
28 class Group;
29 }
30 
31 namespace OpenLxApp
32 {
39 {
40  PROXY_HEADER(Group, App::Group, IFCGROUP)
41 public:
42  friend class Document;
43 
44  void addElement(std::shared_ptr<Element> aElem);
45  void addGroup(std::shared_ptr<Group> aGroupChild);
46  void removeElement(std::shared_ptr<Element> aElem);
47  void removeGroup(std::shared_ptr<Group> aGroupChild);
48  std::shared_ptr<Group> getTopGroup() const;
49  std::shared_ptr<Group> getParentGroup() const;
50  std::vector<std::shared_ptr<Element>> getAllElements() const;
51  std::vector<std::shared_ptr<Group>> getChildren() const;
52  virtual ~Group(void);
53 
54 private:
55  Group() {}
56 };
57 
58 } // namespace OpenLxApp
DocObject is the base class of all persistent objects. The DocObject belongs to exactly one Document.
Definition: DocObject.h:36
#define PROXY_HEADER(_openlexocadclass_, _corelexocadclass_, _type_)
Definition: Globals.h:149
Document holding all persistent DocObjects.
Definition: Document.h:62
#define OPENLXAPP_EXPORT
Definition: OpenLxApp_defines.h:12
Definition: ActiveScript.h:9
A class to group Elements.
Definition: Group.h:38