Track::DataCheck Class Reference

Make sure we can access necessary data files. More...

#include <DataCheck.h>

List of all members.

Public Member Functions

 DataCheck ()
 Throws an error if files are missing.

Private Member Functions

void check_file (std::string filename)
 Throw error if file is missing.
bool check_directory (std::string path)
 Check for a file in a full path.
bool check_relative_directory (std::string path)
 Check for a file in a path relative to the working directory.

Classes

class  FileMissingError
 Error for an inaccessible file. More...


Detailed Description

Make sure we can access necessary data files.

Definition at line 22 of file DataCheck.h.


Constructor & Destructor Documentation

Track::DataCheck::DataCheck (  ) 

Throws an error if files are missing.

Todo:
The installation prefix, in autotools, might not be /usr/local. Find the path properly.

Definition at line 24 of file DataCheck.cpp.


Member Function Documentation

bool Track::DataCheck::check_directory ( std::string  path  )  [private]

Check for a file in a full path.

Sets the path as the current working directory if it works.

Returns:
true if it works, false if it doesn't.

Definition at line 71 of file DataCheck.cpp.

void Track::DataCheck::check_file ( std::string  filename  )  [private]

Throw error if file is missing.

Definition at line 60 of file DataCheck.cpp.

bool Track::DataCheck::check_relative_directory ( std::string  path  )  [private]

Check for a file in a path relative to the working directory.

Sets the full path as the current working directory if it works.

Returns:
true if it works, false if it doesn't.

Definition at line 93 of file DataCheck.cpp.


The documentation for this class was generated from the following files:
Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.