// PropDirected.h #ifndef PropDirected_H #define PropDirected_H // Derive from propagator and add a modifable default direction. // We implement the methods that do not specify a direction using // those that do. #include "Propagator.h" class ObjData; namespace trf { class PropDirected : public Propagator { private: PropDir _dir; public: // constructor with default direction = NEAREST PropDirected(); // constructor from direction PropDirected(PropDir dir); // destructor virtual ~PropDirected(); // set the default direction void set_direction(PropDir dir); // Use OBS data to define the direction. // The string dir is used if present. // Otherwise no action is taken. // Returns true if the string is found and is valid. // Allowed values are nearest, forward, backward, nearest_move, // forward_move and backward_move. // Here is how it might be called from the creator for PropXXX: // Ptr pobj(new PropXXX); // pobj->set_direction(data); // return ObjPtr(pobj); bool set_direction(const ObjData& data); // set the default direction PropDir get_direction() const; // Propagate a track without error in the default direction. PropStat vec_prop(VTrack& trv, const Surface& srf, TrackDerivative* pder =0) const; // Propagate a track with error in the default direction. PropStat err_prop( ETrack& trv, const Surface& srf, TrackDerivative* pder =0) const; }; } // end namespace trf #endif