Lumiera  0.pre.03
»edit your freedom«
typed-id.hpp
Go to the documentation of this file.
1 /*
2  TYPED-ID.hpp - registration service for ID to type association
3 
4  Copyright (C) Lumiera.org
5  2010, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
46 #ifndef ASSET_TYPED_ID_H
47 #define ASSET_TYPED_ID_H
48 
49 
50 #include "lib/error.hpp"
51 //#include "steam/asset.hpp"
52 //#include "steam/asset/struct-scheme.hpp"
53 //#include "lib/hash-indexed.hpp"
54 //#include "lib/util.hpp"
55 #include "lib/symbol.hpp"
56 
57 //#include <boost/operators.hpp>
58 #include <memory>
59 
60 namespace lumiera{
61 namespace query {
62 
73  template<class TY>
75 
76 }}
77 
78 namespace steam {
79 namespace asset {
80 
81 // using std::string;
82 // using std::ostream;
83  using lib::Symbol;
84 
85 // using lumiera::error::LUMIERA_ERROR_WRONG_TYPE;
86 
87  LUMIERA_ERROR_DECLARE (MISSING_INSTANCE);
88 
89  namespace {
90 
91  }
92 
93 
94 
97  class TypedID
98  {
99 
100  public:
101 
102  template<typename TY>
103  class Link;
104  };
105 
106 
112  template<typename TY>
113  class TypedID::Link
114  {
115  protected:
116  Link (Symbol id =0)
117  {
118  TODO ("actually do a registration with TypedID");
119  }
120 
121  ~Link ()
122  {
123  TODO ("clean up any TypedID registration for this instance");
124  }
125 
126  public:
127  void
128  registerInstance (std::weak_ptr<TY> smart_ptr_instance)
129  {
130  TODO ("actually attach the smart-ptr to the existing TypedID registration");
131  }
132  };
133 
134 
135 
136 }} // namespace steam::asset
137 #endif
Adapter for using this type as a primary type within Lumiera&#39;s Steam-Layer.
Definition: typed-id.hpp:74
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Definition: error.h:71
Steam-Layer implementation namespace root.
Token or Atom with distinct identity.
Definition: symbol.hpp:126
Marker types to indicate a literal string and a Symbol.
Lumiera error handling (C++ interface).
Lumiera public interface.
Definition: advice.cpp:113
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:44