/* * DescriptorBase.hpp * * Created on: Mar 12, 2010 * Author: crueger */ #ifndef DESCRIPTORBASE_HPP_ #define DESCRIPTORBASE_HPP_ #include #include /*** * Code in this file is not used. * * I was not able to figure out how to factor out the common code for * descriptors and have given up :-( . If somebody else wants to have * another shot just go ahead, but expect a hard ride from here on. */ template class DescriptorBase_impl; template class SelectiveIterator; template class DescriptorBase { friend class DescriptorBase_impl<_Target,_Container>; friend class SelectiveIterator<_Target,_Container>; // expose the type of this descriptor to the public public: typedef _Target Target; typedef std::vector TargetVec; protected: typedef _Container Container; typedef typename Container::iterator iterator; typedef DescriptorBase_impl impl; typedef boost::shared_ptr impl_ptr; public: DescriptorBase(); DescriptorBase(const DescriptorBase&); DescriptorBase(impl_ptr); virtual ~DescriptorBase(); DescriptorBase& operator=(const DescriptorBase&); /** * forward Method to implementation */ Target find(Container&); /** * forward Method to implementation */ TargetVec findAll(Container&); private: impl_ptr theImpl; }; template DescriptorBase<_Target,_Container> AllX(); template DescriptorBase<_Target,_Container> NoX(); template DescriptorBase<_Target,_Container> operator&&(DescriptorBase<_Target,_Container>&, DescriptorBase<_Target,_Container>&); template DescriptorBase<_Target,_Container> operator||(DescriptorBase<_Target,_Container>&, DescriptorBase<_Target,_Container>&); template DescriptorBase<_Target,_Container> operator!(DescriptorBase<_Target,_Container>&); #endif /* DESCRIPTORBASE_HPP_ */