Advanced Strategic Command
Functions | Variables
sgstream.cpp File Reference

The IO for many basic classes and structurs of ACS. More...

#include <cstdlib>
#include <cstring>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fstream>
#include <boost/regex.hpp>
#include "global.h"
#include "typen.h"
#include "basegfx.h"
#include "misc.h"
#include "sgstream.h"
#include "basestrm.h"
#include "palette.h"
#include "gameoptions.h"
Include dependency graph for sgstream.cpp:

Go to the source code of this file.

Functions

void loadpalette (void)
 
ASCString resolvePath (ASCString path)
 
bool makeDirectory (const ASCString &path)
 
ASCString getDirectory (ASCString filename)
 
ASCString getConfigFileName ()
 
int readgameoptions (const ASCString &filename)
 
bool writegameoptions (ASCString configFileName)
 
void checkFileLoadability (const ASCString &filename)
 
void initFileIO (const ASCString &configFileName, int skipChecks)
 
void versionError (const ASCString &filename, const ASCString &location)
 

Variables

const char * asc_EnvironmentName = "ASC_CONFIGFILE"
 
int dataVersion = 0
 
const int object_version = 1
 
const int technology_version = 1
 

Detailed Description

The IO for many basic classes and structurs of ACS.

These routines are gradually being moved to become methods of their classes

Definition in file sgstream.cpp.

Function Documentation

void checkFileLoadability ( const ASCString filename)
ASCString getConfigFileName ( )

Definition at line 361 of file sgstream.cpp.

Referenced by initFileIO(), and showSearchPath().

ASCString getDirectory ( ASCString  filename)

Definition at line 170 of file sgstream.cpp.

References directoryExist().

Referenced by initFileIO(), and ConfigurationFileLocatorCore::setExecutableLocation().

void initFileIO ( const ASCString configFileName,
int  skipChecks 
)
void loadpalette ( void  )
bool makeDirectory ( const ASCString path)
int readgameoptions ( const ASCString filename)
ASCString resolvePath ( ASCString  path)
void versionError ( const ASCString filename,
const ASCString location 
)

Definition at line 517 of file sgstream.cpp.

References fatalError().

bool writegameoptions ( ASCString  configFileName)

Variable Documentation

const char* asc_EnvironmentName = "ASC_CONFIGFILE"

Definition at line 58 of file sgstream.cpp.

Referenced by ConfigurationFileLocatorCore::getConfigFileName().

int dataVersion = 0

Definition at line 59 of file sgstream.cpp.

const int object_version = 1

Definition at line 61 of file sgstream.cpp.

const int technology_version = 1

Definition at line 62 of file sgstream.cpp.