Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

constraints/space.hh
Go to the documentation of this file.
00001 // space of constraints
00002 
00003 #ifndef constrSpace_hh
00004 #define constrSpace_hh
00005 
00006 #include <memory>
00007 #include "space/space.hh"
00008 #include "toolbox/scannerConnectors.hh"
00009 #include "element.hh"
00010 
00011 namespace concepts {
00012 
00013   // ************************************************************** Scanners **
00014 
00015   template<typename F>
00016   class Scan<constraints::Element<F> > : public Scan<Element<Real> > {
00017   public:
00018     virtual constraints::Element<F>& operator++(int) = 0;
00019   };
00020 
00021 } // namespace concepts
00022 
00023 namespace constraints {
00024 
00025   template<typename F>
00026   class ConstraintsList;
00027 
00028   // ***************************************************************** Space **
00029 
00033   template<class F>
00034   class Space : public concepts::Space<F> {
00035   public:
00040     Space(concepts::Space<F>& spc, ConstraintsList<F>& constr);
00041     virtual ~Space();
00042 
00043     typedef concepts::Scan<Element<F> > Scan;
00044 
00045     virtual uint dim() const { return dim_; }
00046     virtual uint nelm() const { return nelm_; }
00047     virtual Scan* scan() const;
00048 
00050     void rebuild();
00051 
00053     const concepts::ElementPairList<F>& elmPairList() { return *elmPairList_; }
00054   protected:
00055     virtual std::ostream& info(std::ostream& os) const;
00056   private:
00058     uint dim_;
00060     uint nelm_;
00062     concepts::Joiner<Element<F>*, 1>* elm_;
00063 
00065     concepts::Space<F>& compSpc_;
00066 
00068     ConstraintsList<F>& constr_;
00069 
00071     std::auto_ptr<concepts::ElementPairList<F> > elmPairList_;
00072   };
00073 
00074 } // namespace constraints
00075 
00076 #endif // constrSpace_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)