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)
5  2010, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
37 #ifndef ASSET_TYPED_ID_H
38 #define ASSET_TYPED_ID_H
39 
40 
41 #include "lib/error.hpp"
42 //#include "steam/asset.hpp"
43 //#include "steam/asset/struct-scheme.hpp"
44 //#include "lib/hash-indexed.hpp"
45 //#include "lib/util.hpp"
46 #include "lib/symbol.hpp"
47 
48 //#include <boost/operators.hpp>
49 #include <memory>
50 
51 namespace lumiera{
52 namespace query {
53 
64  template<class TY>
66 
67 }}
68 
69 namespace steam {
70 namespace asset {
71 
72 // using std::string;
73 // using std::ostream;
74  using lib::Symbol;
75 
76 // using lumiera::error::LUMIERA_ERROR_WRONG_TYPE;
77 
78  LUMIERA_ERROR_DECLARE (MISSING_INSTANCE);
79 
80  namespace {
81 
82  }
83 
84 
85 
88  class TypedID
89  {
90 
91  public:
92 
93  template<typename TY>
94  class Link;
95  };
96 
97 
103  template<typename TY>
104  class TypedID::Link
105  {
106  protected:
107  Link (Symbol id =0)
108  {
109  TODO ("actually do a registration with TypedID");
110  }
111 
112  ~Link ()
113  {
114  TODO ("clean up any TypedID registration for this instance");
115  }
116 
117  public:
118  void
119  registerInstance (std::weak_ptr<TY> smart_ptr_instance)
120  {
121  TODO ("actually attach the smart-ptr to the existing TypedID registration");
122  }
123  };
124 
125 
126 
127 }} // namespace steam::asset
128 #endif
Adapter for using this type as a primary type within Lumiera&#39;s Steam-Layer.
Definition: typed-id.hpp:65
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Definition: error.h:62
Steam-Layer implementation namespace root.
Token or Atom with distinct identity.
Definition: symbol.hpp:117
Marker types to indicate a literal string and a Symbol.
Lumiera error handling (C++ interface).
Lumiera public interface.
Definition: advice.cpp:104
The asset subsystem of the Steam-Layer.
Definition: wrapperptr.hpp:35