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 
Writer()26 Writer::Writer()
27 {
28 }
29 
30 void
reserve(std::size_t capacity)31 Writer::reserve(std::size_t capacity)
32 {
33     str.reserve(capacity);
34 }
35 
36 void
write(const std::string & txt)37 Writer::write(const std::string& txt)
38 {
39     str.append(txt);
40 }
41 
42 const std::string&
toString()43 Writer::toString()
44 {
45     return str;
46 }
47 
48 } // namespace geos.io
49 } // namespace geos
50