Topologic  0.8.9
Context.h
1 // This file is part of Topologic software library.
2 // Copyright(C) 2019, Cardiff University and University College London
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
13 //
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <https://www.gnu.org/licenses/>.
16 
17 #pragma once
18 
19 #include <TopologicalQuery.h>
20 #include <Topology.h>
21 
22 #include <TopologicCore/include/Context.h>
23 
24 #include <memory>
25 
26 namespace Topologic
27 {
28  ref class Topology;
29 
33 
34  public ref class Context : public TopologicalQuery
35  {
36  public:
41  property Topology^ Topology
42  {
43  Topologic::Topology^ get();
44  }
45 
50 #ifdef TOPOLOGIC_DYNAMO
51  [IsVisibleInDynamoLibrary(false)]
52 #endif
53  double U();
54 
59 #ifdef TOPOLOGIC_DYNAMO
60  [IsVisibleInDynamoLibrary(false)]
61 #endif
62  double V();
63 
68 #ifdef TOPOLOGIC_DYNAMO
69  [IsVisibleInDynamoLibrary(false)]
70 #endif
71  double W();
72 
73  public protected:
74  Context();
75 
76  Context(const std::shared_ptr<TopologicCore::Context>& kpCoreContext);
77 
78  virtual std::shared_ptr<TopologicCore::TopologicalQuery> GetCoreTopologicalQuery() override;
79 
80  protected:
81  virtual ~Context();
82 
83  std::shared_ptr<TopologicCore::Context>* m_pCoreContext;
84  };
85 }
A Topology is an abstract superclass that includes constructors, properties and methods used by other...
Definition: Topology.h:53
TopologicalQuery is the base class for Topology and Context classes.
Definition: TopologicalQuery.h:27
double V()
Returns the V parameter.
Definition: Context.cpp:35
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
double U()
Returns the U parameter.
Definition: Context.cpp:29
A Context defines a topological relationship between two otherwise independent Topologies.
Definition: Context.h:34
double W()
Returns the W parameter.
Definition: Context.cpp:41