2 // fgpath.hxx -- routines to abstract out path separator differences
3 // between MacOS and the rest of the world
5 // Written by Curtis L. Olson, started April 1999.
7 // Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Library General Public
11 // License as published by the Free Software Foundation; either
12 // version 2 of the License, or (at your option) any later version.
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Library General Public License for more details.
19 // You should have received a copy of the GNU Library General Public
20 // License along with this library; if not, write to the
21 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 // Boston, MA 02111-1307, USA.
35 #include <simgear/compiler.h>
43 # define FG_PATH_SEP ':'
44 # define FG_BAD_PATH_SEP '/'
46 # define FG_PATH_SEP '/'
47 # define FG_BAD_PATH_SEP ':'
59 // default constructor
62 // create a path based on "path"
63 FGPath( const string p );
69 void set( const string p );
71 // append another piece to the existing path
72 void append( const string p );
74 // concatenate a string to the end of the path without inserting a
76 void concat( const string p );
78 // get the path string
79 inline string str() const { return path; }
80 inline const char *c_str() { return path.c_str(); }