~ubuntu-branches/ubuntu/saucy/merkaartor/saucy

« back to all changes in this revision

Viewing changes to include/ggl/geometries/linestring.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz
  • Date: 2009-09-13 00:52:12 UTC
  • mto: (1.2.7 upstream) (0.1.3 upstream) (3.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20090913005212-pjecal8zxm07x0fj
ImportĀ upstreamĀ versionĀ 0.14+svnfixes~20090912

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Generic Geometry Library
 
2
//
 
3
// Copyright Barend Gehrels 1995-2009, Geodan Holding B.V. Amsterdam, the Netherlands.
 
4
// Copyright Bruno Lalande 2008, 2009
 
5
// Use, modification and distribution is subject to the Boost Software License,
 
6
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 
7
// http://www.boost.org/LICENSE_1_0.txt)
 
8
 
 
9
#ifndef GGL_GEOMETRIES_LINESTRING_HPP
 
10
#define GGL_GEOMETRIES_LINESTRING_HPP
 
11
 
 
12
#include <memory>
 
13
#include <vector>
 
14
 
 
15
#include <boost/concept/assert.hpp>
 
16
#include <boost/range/functions.hpp>
 
17
 
 
18
namespace ggl
 
19
{
 
20
 
 
21
/*!
 
22
    \brief A linestring (named so by OGC) is a collection (default a vector) of points.
 
23
    \ingroup Geometry
 
24
    \tparam P point type
 
25
    \tparam V optional container type, for example std::vector, std::list, std::deque
 
26
    \tparam A optional container-allocator-type
 
27
    (see http://accu.org/index.php/journals/427#ftn.d0e249 )
 
28
    \par Concepts:
 
29
    All algorithms work on ranges, based on a container with point types fulfilling
 
30
    the point concepts. They will take linestring, but also vector, std::pair, or other containers.
 
31
*/
 
32
template
 
33
<
 
34
    typename P,
 
35
    template<typename,typename> class V = std::vector,
 
36
    template<typename> class A = std::allocator
 
37
>
 
38
class linestring : public V<P, A<P> >
 
39
{
 
40
    BOOST_CONCEPT_ASSERT( (concept::Point<P>) );
 
41
};
 
42
 
 
43
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
 
44
namespace traits
 
45
{
 
46
 
 
47
template
 
48
<
 
49
    typename P,
 
50
    template<typename,typename> class V,
 
51
    template<typename> class A
 
52
>
 
53
struct tag<linestring<P, V, A> >
 
54
{
 
55
    typedef linestring_tag type;
 
56
};
 
57
} // namespace traits
 
58
 
 
59
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
 
60
 
 
61
} // namespace ggl
 
62
 
 
63
#endif // GGL_GEOMETRIES_LINESTRING_HPP