Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
include.cc File Reference

Auxiliary program to check for include file within Jpp framework. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Auxiliary program to check for include file within Jpp framework.

Author
mdejong

Definition in file include.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 63 of file include.cc.

64 {
65  using namespace std;
66 
67  string source;
68  string target;
69  int debug;
70 
71  try {
72 
73  JParser<> zap("Auxiliary program to recursively check for include file in Jpp framework.");
74 
75  zap['f'] = make_field(source, "name of source file to be inspected");
76  zap['i'] = make_field(target, "name of include file to be searched");
77  zap['d'] = make_field(debug) = 1;
78 
79  if (zap.read(argc, argv) != 0)
80  return 1;
81  }
82  catch(const exception& error) {
83  FATAL(error.what() << endl);
84  }
85 
86  DEBUG("JPP_DIR" << ' ' << JPP_DIR << endl);
87 
88  include(source, target);
89 }
Utility class to parse command line options.
Definition: JParser.hh:1493
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
int debug
debug level
Definition: JSirene.cc:61
#define FATAL(A)
Definition: JMessage.hh:67
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62