# CoordinateArrayFilter.h

    00001 /**********************************************************************
    00002  * $Id: CoordinateArrayFilter.h 1820 2006-09-06 16:54:23Z mloskot $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2001-2002 Vivid Solutions Inc.
    00008  * Copyright (C) 2006 Refractions Research Inc.
    00009  *
    00010  * This is free software; you can redistribute and/or modify it under
    00011  * the terms of the GNU Lesser General Public Licence as published
    00012  * by the Free Software Foundation.
    00013  * See the COPYING file for more information.
    00014  *
    00015  **********************************************************************/
    00016
    00017 #ifndef GEOS_UTIL_COORDINATEARRAYFILTER_H
    00018 #define GEOS_UTIL_COORDINATEARRAYFILTER_H
    00019
    00020 #include <cassert>
    00021
    00022 #include <geos/geom/CoordinateFilter.h>
    00023 #include <geos/geom/CoordinateSequence.h>
    00024 #include <geos/geom/Coordinate.h>
    00025
    00026 namespace geos {
    00027 namespace util { // geos::util
    00028
    00036 class CoordinateArrayFilter: public geom::CoordinateFilter {
    00037 private:
    00038         geom::Coordinate::ConstVect &pts; // target vector reference
    00039 public:
    00045         CoordinateArrayFilter(geom::Coordinate::ConstVect& target)
    00046                 :
    00047                 pts(target)
    00048                 {}
    00049
    00050         virtual ~CoordinateArrayFilter() {}
    00051
    00052         virtual void filter_ro(const geom::Coordinate *coord)
    00053         {
    00054                 pts.push_back(coord);
    00055         }
    00056 };
    00057
    00058
    00059 } // namespace geos.util
    00060 } // namespace geos
    00061
    00062 #endif // GEOS_UTIL_COORDINATEARRAYFILTER_H
    00063
    00064 /**********************************************************************
    00065  * $Log$
    00066  * Revision 1.2  2006/06/19 23:33:03  strk
    00067  * Don't *require* CoordinateFilters to define both read-only and read-write methods.
    00068  *
    00069  * Revision 1.1  2006/03/09 16:46:49  strk
    00070  * geos::geom namespace definition, first pass at headers split
    00071  *
    00072  **********************************************************************/