BundleProperty.hpp

00001 #ifndef __FIBER_BUNDLEPROPERTY_HPP
00002 #define __FIBER_BUNDLEPROPERTY_HPP
00003 
00004 #include "Bundle.hpp"
00005 
00006 namespace Fiber
00007 {
00008 
00009 class   GridSelector;
00010 
00011 
00018 class   BUNDLE_API BundleProperty
00019 {
00020 
00021 public:
00022         BundleProperty()
00023         {}
00024 
00025         virtual ~BundleProperty() = 0;
00026 
00027         friend BUNDLE_API bool hasProperty(      BundlePtr, const BundleProperty&);
00028         friend BUNDLE_API bool hasProperty(const Bundle&  , const BundleProperty&);
00029 
00030         friend BUNDLE_API bool hasProperty(const GridSelector&, const BundleProperty&); 
00031 
00032         virtual bool checkSlice(Slice&S, const string&GridName) const = 0;
00033 };
00034 
00043 class   BUNDLE_API GridProperty : public BundleProperty
00044 {
00045 public:
00046         ~GridProperty() = 0; 
00047 
00048         override bool checkSlice(Slice&S, const string&GridName) const; 
00049 
00050         virtual bool checkGrid(const Grid&S) const = 0;
00051 };
00052 
00060 class   BUNDLE_API SkeletonExistence : public GridProperty, public SkeletonID
00061 {
00062 public:
00064         SkeletonExistence(int Dimensionality, int IndexDepth)
00065         : SkeletonID(Dimensionality, IndexDepth)
00066         {} 
00067 
00069         SkeletonExistence(const SkeletonID&sid)
00070         : SkeletonID(sid)
00071         {}
00072 
00073         ~SkeletonExistence();
00074 
00075         override bool checkGrid(const Grid&S) const;
00076 };
00077 
00078 
00079 } /* namespace Fiber */ 
00080 
00081 #endif /* __FIBER_BUNDLEPROPERTY_HPP */
00082