/src/geos/src/io/Writer.cpp
Line | Count | Source |
1 | | /********************************************************************** |
2 | | * |
3 | | * GEOS - Geometry Engine Open Source |
4 | | * http://geos.osgeo.org |
5 | | * |
6 | | * Copyright (C) 2005-2006 Refractions Research Inc. |
7 | | * Copyright (C) 2001-2002 Vivid Solutions Inc. |
8 | | * |
9 | | * This is free software; you can redistribute and/or modify it under |
10 | | * the terms of the GNU Lesser General Public Licence as published |
11 | | * by the Free Software Foundation. |
12 | | * See the COPYING file for more information. |
13 | | * |
14 | | ********************************************************************** |
15 | | * |
16 | | * Last port: ORIGINAL WORK to be used like java.io.Writer |
17 | | * |
18 | | **********************************************************************/ |
19 | | |
20 | | #include <geos/io/Writer.h> |
21 | | #include <string> |
22 | | |
23 | | namespace geos { |
24 | | namespace io { // geos.io |
25 | | |
26 | | Writer::Writer() |
27 | 12.2k | { |
28 | 12.2k | } |
29 | | |
30 | | void |
31 | | Writer::reserve(std::size_t capacity) |
32 | 0 | { |
33 | 0 | str.reserve(capacity); |
34 | 0 | } |
35 | | |
36 | | void |
37 | | Writer::write(const std::string& txt) |
38 | 40.3M | { |
39 | 40.3M | str.append(txt); |
40 | 40.3M | } |
41 | | |
42 | | const std::string& |
43 | | Writer::toString() |
44 | 12.2k | { |
45 | 12.2k | return str; |
46 | 12.2k | } |
47 | | |
48 | | } // namespace geos.io |
49 | | } // namespace geos |