File: miwm_framework.h

package info (click to toggle)
miwm 1.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid, stretch
  • size: 1,296 kB
  • ctags: 910
  • sloc: cpp: 8,179; sh: 231; makefile: 148
file content (54 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download | duplicates (3)
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