Advanced Strategic Command
sgstream.h
Go to the documentation of this file.
1 
6 /*
7  This file is part of Advanced Strategic Command; http://www.asc-hq.de
8  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; see the file COPYING. If not, write to the
22  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
23  Boston, MA 02111-1307 USA
24 */
25 
26 
27 #ifndef sgstreamH
28 #define sgstreamH
29 
30 #include <vector>
31 
32 #include "basestrm.h"
33 // #include "graphics/surface.h"
34 
35 #include "loki/Singleton.h"
36 
37 
38 
40  ASCString cmdline;
41  ASCString exePath;
42  int configFileType;
43  protected:
44  vector<ASCString> getDefaultDirectory();
45 
46 
47  public:
49  void setCommandLineParam( const ASCString& path );
50  void setExecutableLocation( const ASCString& path );
52  ASCString getSpecialPath( int type );
53 
57 };
58 
59 
60 typedef Loki::SingletonHolder< ConfigurationFileLocatorCore > ConfigurationFileLocator;
61 
62 
63 extern void generatedirecpict ( void* orgpict, void* direcpict );
64 
65 
66 
67 extern void loadpalette ( );
68 extern int readgameoptions ( const ASCString& filename= "" );
69 extern bool writegameoptions ( ASCString filename = "" );
71 
72 extern void checkFileLoadability ( const ASCString& filename );
73 
74 extern void initFileIO ( const ASCString& configFileName, int skipChecks = 0 );
75 
76 
77 #endif
ASCString getSpecialPath(int type)
Definition: sgstream.cpp:215
void checkFileLoadability(const ASCString &filename)
Definition: sgstream.cpp:440
int readgameoptions(const ASCString &filename="")
Definition: sgstream.cpp:372
void setExecutableLocation(const ASCString &path)
Definition: sgstream.cpp:193
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14
void initFileIO(const ASCString &configFileName, int skipChecks=0)
Definition: sgstream.cpp:475
The interface for the various streams that ASC offers, like file and memory streams.
bool writegameoptions(ASCString filename="")
Definition: sgstream.cpp:418
ASCString getConfigForPrinting()
Definition: sgstream.cpp:340
Loki::SingletonHolder< ConfigurationFileLocatorCore > ConfigurationFileLocator
Definition: sgstream.h:60
void loadpalette()
Definition: sgstream.cpp:67
ASCString getConfigFileName()
Definition: sgstream.cpp:361
void setCommandLineParam(const ASCString &path)
Definition: sgstream.cpp:188
void generatedirecpict(void *orgpict, void *direcpict)
vector< ASCString > getDefaultDirectory()
Definition: sgstream.cpp:232
ASCString getExecutableLocation()
Definition: sgstream.cpp:209