Topologic  0.8.9
AttributeFactory.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 using namespace System;
20 #ifdef TOPOLOGIC_DYNAMO
21 using namespace Autodesk::DesignScript::Runtime;
22 #endif
23 
24 #include <Attribute.h>
25 
26 namespace TopologicUtilities
27 {
28  class Attribute;
29 }
30 
31 namespace Topologic
32 {
33  namespace Attributes
34  {
38  public ref class AttributeFactory abstract
39  {
40  public:
47 #ifdef TOPOLOGIC_DYNAMO
48  [IsVisibleInDynamoLibrary(false)]
49 #endif
50  virtual Attribute^ Create(String^ key, Object^ value) abstract;
51 
57 #ifdef TOPOLOGIC_DYNAMO
58  [IsVisibleInDynamoLibrary(false)]
59 #endif
60  virtual bool CheckType(Type^ type) abstract;
61 
62  public protected:
63  virtual bool CheckType(const std::shared_ptr<TopologicCore::Attribute>& kpUtilitiesAttribute) abstract;
64 
65  virtual Object^ CreateValue(const std::shared_ptr<TopologicCore::Attribute>& kpUtilitiesAttribute) abstract;
66 
67  protected:
68  AttributeFactory() {}
69  };
70  }
71 }
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
Definition: AttributeFactory.h:26