FieldID.hpp

00001 #ifndef __FIBER_GRID_FIELDID_HPP
00002 #define __FIBER_GRID_FIELDID_HPP "Created 27.02.2001 21:42:27 by werner"
00003 
00004 #include "GridAPI.h"
00005 #include <field/Field.hpp>
00006 #include <memcore/TypeInfo.hpp>
00007 #include <set>
00008 #include <list>
00009 
00010 namespace Fiber
00011 {
00012         using MemCore::WeakPtr;
00013         using MemCore::NullPtr;
00014         using std::set;
00015         using std::list;
00016 
00052 class   GRID_API FieldID : public ReferenceBase<FieldID>
00053 {
00054         string  name;
00055         typedef WeakPtr<FieldID, FieldID> FieldIDPtr;
00056 
00057         list<FieldIDPtr> sources;
00058 
00059 public:
00060 
00062         FieldID(const string&n)
00063         : ReferenceBase<FieldID>(this)
00064         , name(n)
00065         {}
00066 
00068         const string&Name() const
00069         {
00070                 return name;
00071         }
00072 
00074         void addSource(const FieldIDPtr&src)
00075         {
00076                 sources.push_front(src);
00077         }
00078 };
00079 
00080 
00084 class   GRID_API FieldIterator
00085 {
00086 public:
00087         virtual ~FieldIterator();
00088 
00089         virtual bool apply(const FieldID&d, const Field&R) = 0;
00090 };
00091 
00092 
00093 } /* namespace Fiber */
00094 
00095 #endif /* __FIBER_GRID_FIELDID_HPP */