OpenLexocad  27.1
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>
24 
25 namespace App
26 {
27 class Group;
28 }
29 
30 namespace OpenLxApp
31 {
37 class LX_OPENLXAPP_EXPORT Group : public DocObject
38 {
39  PROXY_HEADER(Group, App::Group, IFCGROUP)
40 public:
41  friend class Document;
42 
43  void addElement(std::shared_ptr<Element> aElem);
44  void addGroup(std::shared_ptr<Group> aGroupChild);
45  void removeElement(std::shared_ptr<Element> aElem);
46  void removeGroup(std::shared_ptr<Group> aGroupChild);
47  std::shared_ptr<Group> getTopGroup() const;
48  std::shared_ptr<Group> getParentGroup() const;
49  std::vector<std::shared_ptr<Element>> getAllElements() const;
50  std::vector<std::shared_ptr<Group>> getChildren() const;
51  virtual ~Group(void);
52 
53 private:
54  Group() {}
55 };
56 
57 } // namespace OpenLxApp
DocObject is the base class of all persistent objects. The DocObject belongs to exactly one Document.
Definition: DocObject.h:25
#define PROXY_HEADER(_openlexocadclass_, _corelexocadclass_, _type_)
Definition: Globals.h:146
Document holding all persistent DocObjects.
Definition: Document.h:60
Definition: ActiveScript.h:7
A class to group Elements.
Definition: Group.h:37