Calibrator  0.1
Command line tool for 14C calibration
main.cpp File Reference
#include "../include/cal_curve.h"
#include "../include/uncal_date.h"
#include "../include/cal_date.h"
#include "../include/uncal_date_list.h"
#include "../include/cal_date_list.h"
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/program_options/variables_map.hpp>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <istream>
#include <cctype>

Go to the source code of this file.

Functions

int validate_numeric_string (string &a)
 Method to validate that a string contains numbers only. More...
 
int check_input_format (string &input_string)
 Checks whether a string contains json or csv. More...
 
json csv_input_to_json (string &in)
 Converts a csv input string to json. More...
 
int main (int argc, char **argv)
 Main function. More...
 

Function Documentation

int check_input_format ( string &  input_string)

Checks whether a string contains json or csv.

Parameters
input_stringA string
Returns
An integer with 1 if the string seem to be json, 2 if the string seem to be csv, 0 otherwise

This method tries to estimate whether a string is json or csv.

Definition at line 55 of file main.cpp.

json csv_input_to_json ( string &  in)

Converts a csv input string to json.

Parameters
inA string
Returns
A json object

This method converts a csv string into a json object.

Definition at line 74 of file main.cpp.

int main ( int  argc,
char **  argv 
)

Main function.

Parameters
argcAn integer argument count of the command line arguments
argvAn argument vector of the command line arguments
Returns
an integer 0 upon exit success

Definition at line 131 of file main.cpp.

int validate_numeric_string ( string &  a)

Method to validate that a string contains numbers only.

Parameters
aA string
Returns
An integer with 0 if the string has only numbers, 1 otherwise

This method checks if a string contains numbers only.

Definition at line 39 of file main.cpp.