Please help with these two errors

mahmoodn nt_mahmood@yahoo.com
Wed Jan 16 14:27:00 GMT 2008


>I need small compilable code example that produces the error.  Does the code
snippet produce the error >for you?

The file is a littile bit lengthy, I can post it here. Before that here is a
larger snippet of th class.


template <class Traits_, class AppKernel_>
class VVc_diagram_2
{
public:

  typedef Traits_                                   Traits_2;
  typedef AppKernel_                                Approx_kernel;

  // Define types from the rational kernel.
  typedef typename Traits_2::Rat_kernel             Rat_kernel;
  typedef typename Traits_2::Rational               Rational;

private:

  typedef Partial_polygon_Voronoi_diagram_2<Traits_2>  Partial_pvd_2;
  typedef typename Partial_pvd_2::Arc_const_iterator  
Pvd_arc_const_iterator;

  typedef typename Partial_pvd_2::Rat_segment_2        Rat_segment_2;

public:

  typedef typename Partial_pvd_2::Rat_point_2        Rat_point_2;
  typedef typename Partial_pvd_2::Rat_polygon_2      Rat_polygon_2;


  typedef typename Approx_kernel::Point_2            App_point_2;
  typedef typename Approx_kernel::Segment_2          App_segment_2;
  typedef std::list<App_segment_2>                   App_segments_list_2;

private:

  // Define the polygon clearance offsetting and the objects from the
  // algebraic kernel.
  typedef Polygon_clearance_offsetting_2<Traits_2>   PCO_2;

public:

  typedef typename PCO_2::Alg_point_2               Alg_point_2;

private:

  typedef typename Traits_2::Curve_2                Conic_arc_2;
  typedef typename Traits_2::X_monotone_curve_2     X_monotone_conic_arc_2;
  typedef typename PCO_2::Offset_arc_2              Offset_arc_2;
  typedef typename PCO_2::Algebraic                 Algebraic;
  typedef typename PCO_2::Alg_kernel                Alg_kernel;
  typedef std::list<X_monotone_conic_arc_2>         X_conic_arcs_list_2;
  typedef std::list<Offset_arc_2>                   Offset_arcs_list_2;

  typedef typename PCO_2::Rat_polygon_clearance_2   Polygon_clearance_2;
  typedef std::vector<Polygon_clearance_2>          Polygon_clrs_vec_2;

  typedef std::multimap<Polygon_feature_2, 
                        X_monotone_conic_arc_2, 
                        Less_polygon_feature_2>        Polygon_features_map;
  typedef typename Polygon_features_map::value_type    Pf_map_entry;
  typedef typename Polygon_features_map::iterator      Pf_map_iterator;

  // Define the circle-tangents class.
//  typedef Circle_tangents_2<Traits_2>                  Circle_tangents_2;

  // Define the approximated kernel objects.
  typedef typename Approx_kernel::Circle_2             App_circle_2;
  typedef typename Approx_kernel::Circular_arc_2       App_circular_arc_2;

  /*!
   * \enum Edge types.
   */
  enum Arc_type
  {
    MINKOWSKI,
    VORONOI
  };
 
  /*!
   * \struct Representation of the data attached to an arc.
   */
  struct Data
  {
    Arc_type         type;       // The arc type.
    union
    {
      const Polygon_feature_2                  *feature;     
                                          // For MINKOWSKI arcs.
      const typename Partial_pvd_2::Arc_data_2 *data;
                                          // For VORONOI arcs.
    }                pointer;
  };

  struct Copy_data
  {
    const Data& operator() (const Data& d1, const Data& ) const
    {
      return (d1);
    }
  }; 

  typedef Arr_curve_data_traits_2<Traits_2, Data, 
                                  Copy_data,
                                  Data>                Data_traits_2;
  typedef typename Data_traits_2::Curve_2              Curve_2;
  typedef typename Data_traits_2::X_monotone_curve_2   X_monotone_curve_2;

  typedef Arr_extended_dcel<Data_traits_2,
                            int, int, bool>            Dcel;
  typedef Arrangement_2<Data_traits_2, Dcel>           Arrangement_2;

  typedef typename Arrangement_2::Halfedge_handle       Halfedge_handle;
//  typedef typename Arrangement_2::Halfedge_const_handle
Halfedge_const_handle;
  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;

  typedef typename Arrangement_2::Vertex_iterator       Vertex_iterator;
/*  typedef typename Arrangement_2::Halfedge_const_iterator
                                                    
Halfedge_const_iterator;*/
  typedef typename Arrangement_2::Edge_const_iterator
                                                     Edge_const_iterator;
  typedef typename Arrangement_2::Halfedge_around_vertex_circulator  
                                           
Halfedge_around_vertex_circulator;

  /*!
   * \class Representation of a feature associated with vertex in the 
   *        VV(c) diagram.
   */
  class Vertex_feature_2
  {
  public:

    enum Type
    {
      CIRCULAR,
      CHAIN
    };

  private:

    int                     ver_id;   // The ID of the coresponding vertex.

  public:

    /*!
     * Default constrcutor.
     */
    Vertex_feature_2 () :
      ver_id (-1)
    {}

    /*!
     * Destructor.
     */
    virtual ~Vertex_feature_2 ()
    {}

    /*!
     * Get the feature type.
     */
    virtual Vertex_feature_2::Type type () const = 0;

    /*!
     * Get the vertex ID.
     */
    int vertex_id () const
    {
      return (ver_id);
    }

    /*!
     * Set the vertex ID.
     */
    void set_vertex_id (const int& id)
    {
      ver_id = id;
      return;
    }
  };
  /*!
   * \class Representation of a circular arc associated with a vertex in
   *        the VV(c) diagram.
   */
  class Circular_arc_2 : public Vertex_feature_2
  {
  private:

    Rat_point_2             _c;       // The center of the supporting
circle.
    Alg_point_2             _s;       // The source point of the arc.
    Alg_point_2             _t;       // The target point of the arc.
    Orientation             _or;      // The arc's orientation.

  public:

    /*! Default constructor. */
    Circular_arc_2 () :
      _or (COLLINEAR)
    {}

    /*!
     * Constructor.
     * \param c The center of the supporting circle.
     * \param s The source point of the circular arc.
     * \param t The target point of the circular arc.
     * \param orient The orientation of the circular arc.
     */
    Circular_arc_2 (const Rat_point_2& c,
                    const Alg_point_2& s, const Alg_point_2& t,
                    const Orientation& orient) :
      _c (c),
      _s (s),
      _t (t),
      _or (orient)
    {}

    /*!
     * Get the feature type.
     */
    virtual typename Vertex_feature_2::Type type () const
    {
      return (CIRCULAR);
    }

    /*!
     * Get the center of the supporting circle.
     */
    const Rat_point_2& center () const
    {
      return (_c);
    }

    /*!
     * Get the source point of the circular arc.
     */
    const Alg_point_2& source () const
    {
      return (_s);
    }

    /*!
     * Get the target point of the circular arc.
     */
    const Alg_point_2& target () const
    {
      return (_t);
    }

    /*!
     * Get the orientation of the circular arc.
     */
    Orientation orientation () const
    {
      return (_or);
    }

  };
...
...
}

Thanks in advance...



John (Eljay) Love-Jensen wrote:
> 
> Hi mahmoodn,
> 
>> How about the first problem?
> 
> From your code snippet, I was unable to reproduce the first problem you
> inquired about.  No error, or warning.
> 
> I need small compilable code example that produces the error.  Does the
> code snippet produce the error for you?
> 
> Sincerely,
> --Eljay
> 
> 

-- 
View this message in context: http://www.nabble.com/Please-help-with-these-two-errors-tp14787660p14841429.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list