1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#ifndef MIWM_FRAMEWORK_H
#define MIWM_FRAMEWORK_H 1
#include "EPropertyList.h"
#include "ESimpleCLParser.h"
#include <iostream>
/**
COUT/CERR are drop-in replacements for std::cout/cerr, but slightly more
decorative.
*/
#ifndef CERR
#define CERR std::cerr << __FILE__ << ":" << std::dec << __LINE__ << " : "
#endif
#ifndef COUT
#define COUT std::cout << __FILE__ << ":" << std::dec << __LINE__ << " : "
#endif
namespace miwm {
/**
Call this from main() to initialize the miwm framework.
*/
int init( int argc, char ** argv );
/**
Shows command-line args help.
*/
void show_help();
/**
returns an absolute path to a directory, which is the
"home" of miwm. Currently this returns $HOME, but i would
prefer for it to point to $HOME/.miwm. It will, once i get
around to adding portable code for creating ~/.miwm if it
doesn't exist.
*/
std::string homePath( const std::string & append = "" );
/**
Returns the command-line args, which are only valid if
init() is called with the argc and argv from main().
*/
ESimpleCLParser & args();
/**
Returns the persistant framework config settings.
*/
EPropertyList & config();
}; // namespace miwm
#endif // MIWM_FRAMEWORK_H
|