DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
oksdalgen.cxx File Reference
#include "class_info.hpp"
#include "oks/kernel.hpp"
#include "oks/class.hpp"
#include "oks/attribute.hpp"
#include "oks/relationship.hpp"
#include "oks/method.hpp"
#include <stdlib.h>
#include <ctype.h>
#include <algorithm>
#include <string>
#include <list>
#include <set>
#include <iostream>
Include dependency graph for oksdalgen.cxx:

Go to the source code of this file.

Functions

std::string alnum_name (const std::string &in)
std::string capitalize_name (const std::string &in)
void print_description (std::ostream &s, const std::string &text, const char *dx)
void print_indented (std::ostream &s, const std::string &text, const char *dx)
std::string get_type (oks::OksData::Type oks_type, bool is_cpp)
void gen_dump_application (std::ostream &s, std::list< std::string > &class_names, const std::string &cpp_ns_name, const std::string &cpp_hdr_dir, const char *conf_header, const char *conf_name, const char *headres_prologue, const char *main_function_prologue)
void write_info_file (std::ostream &s, const std::string &cpp_namespace, const std::string &cpp_header_dir, const std::set< const oks::OksClass *, std::less< const oks::OksClass * > > &class_names)
std::string get_full_cpp_class_name (const oks::OksClass *c, const ClassInfo::Map &cl_info, const std::string &cpp_ns_name)
std::string get_include_dir (const oks::OksClass *c, const ClassInfo::Map &cl_info, const std::string &cpp_hdr_dir)
void parse_arguments (int argc, char *argv[], std::list< std::string > &class_names, std::list< std::string > &file_names, std::list< std::string > &include_dirs, std::list< std::string > &user_classes, std::string &cpp_dir_name, std::string &cpp_ns_name, std::string &cpp_hdr_dir, std::string &info_file_name, bool &verbose)
bool process_external_class (ClassInfo::Map &cl_info, const oks::OksClass *c, const std::list< std::string > &include_dirs, const std::list< std::string > &user_classes, bool verbose)
std::string int2dx (int level)
int open_cpp_namespace (std::ostream &s, const std::string &value)
void close_cpp_namespace (std::ostream &s, int level)
std::string get_method_header_prologue (oks::OksMethodImplementation *)
std::string get_method_header_epilogue (oks::OksMethodImplementation *)
std::string get_public_section (oks::OksMethodImplementation *mi)
std::string get_private_section (oks::OksMethodImplementation *mi)
std::string get_member_initializer_list (oks::OksMethodImplementation *mi)
std::string get_method_implementation_body (oks::OksMethodImplementation *mi)
bool get_add_algo_1 (oks::OksMethodImplementation *mi)
bool get_add_algo_n (oks::OksMethodImplementation *mi)
oks::OksMethodImplementation * find_cpp_method_implementation (const oks::OksMethod *method)
static bool has_superclass (const oks::OksClass *tested, const oks::OksClass *c)
std::string ltrim (const std::string &s)
std::string rtrim (const std::string &s)
std::string trim (const std::string &s)
static void gen_header (const oks::OksClass *cl, std::ostream &cpp_file, const std::string &cpp_ns_name, const std::string &cpp_hdr_dir, const ClassInfo::Map &cl_info)
static void set2out (std::ostream &out, const std::set< std::string > &data, bool &is_first)
static void gen_cpp_body (const oks::OksClass *cl, std::ostream &cpp_s, const std::string &cpp_ns_name, const std::string &cpp_hdr_dir, const ClassInfo::Map &cl_info)
static void load_schemas (oks::OksKernel &kernel, const std::list< std::string > &file_names, std::set< oks::OksFile *, std::less< oks::OksFile * > > &file_hs)
static void gen_cpp_header_prologue (const std::string &file_name, std::ostream &s, const std::string &cpp_ns_name, const std::string &cpp_hdr_dir)
static void gen_cpp_header_epilogue (std::ostream &s)
static void gen_cpp_body_prologue (const std::string &file_name, std::ostream &src, const std::string &cpp_hdr_dir)
int main (int argc, char *argv[])

Variables

const std::string WHITESPACE = " \n\r\t\f\v"
const std::vector< std::string > cpp_method_virtual_specifiers

Function Documentation

◆ alnum_name()

std::string alnum_name ( const std::string & in)
extern

Definition at line 39 of file utils.cpp.

◆ capitalize_name()

std::string capitalize_name ( const std::string & in)
extern

Definition at line 47 of file utils.cpp.

◆ close_cpp_namespace()

void close_cpp_namespace ( std::ostream & s,
int level )
extern

Definition at line 664 of file utils.cpp.

◆ find_cpp_method_implementation()

oks::OksMethodImplementation * find_cpp_method_implementation ( const oks::OksMethod * method)
extern

◆ gen_cpp_body()

void gen_cpp_body ( const oks::OksClass * cl,
std::ostream & cpp_s,
const std::string & cpp_ns_name,
const std::string & cpp_hdr_dir,
const ClassInfo::Map & cl_info )
static

Definition at line 761 of file oksdalgen.cxx.

◆ gen_cpp_body_prologue()

void gen_cpp_body_prologue ( const std::string & file_name,
std::ostream & src,
const std::string & cpp_hdr_dir )
static

Definition at line 1381 of file oksdalgen.cxx.

◆ gen_cpp_header_epilogue()

void gen_cpp_header_epilogue ( std::ostream & s)
static

Definition at line 1374 of file oksdalgen.cxx.

◆ gen_cpp_header_prologue()

void gen_cpp_header_prologue ( const std::string & file_name,
std::ostream & s,
const std::string & cpp_ns_name,
const std::string & cpp_hdr_dir )
static

Definition at line 1350 of file oksdalgen.cxx.

◆ gen_dump_application()

void gen_dump_application ( std::ostream & s,
std::list< std::string > & class_names,
const std::string & cpp_ns_name,
const std::string & cpp_hdr_dir,
const char * conf_header,
const char * conf_name,
const char * headres_prologue,
const char * main_function_prologue )
extern

Definition at line 169 of file utils.cpp.

◆ gen_header()

void gen_header ( const oks::OksClass * cl,
std::ostream & cpp_file,
const std::string & cpp_ns_name,
const std::string & cpp_hdr_dir,
const ClassInfo::Map & cl_info )
static

Definition at line 104 of file oksdalgen.cxx.

◆ get_add_algo_1()

bool get_add_algo_1 ( oks::OksMethodImplementation * mi)
extern

◆ get_add_algo_n()

bool get_add_algo_n ( oks::OksMethodImplementation * mi)
extern

◆ get_full_cpp_class_name()

std::string get_full_cpp_class_name ( const oks::OksClass * c,
const ClassInfo::Map & cl_info,
const std::string & cpp_ns_name )
extern

◆ get_include_dir()

std::string get_include_dir ( const oks::OksClass * c,
const ClassInfo::Map & cl_info,
const std::string & cpp_hdr_dir )
extern

◆ get_member_initializer_list()

std::string get_member_initializer_list ( oks::OksMethodImplementation * mi)
extern

◆ get_method_header_epilogue()

std::string get_method_header_epilogue ( oks::OksMethodImplementation * )
extern

◆ get_method_header_prologue()

std::string get_method_header_prologue ( oks::OksMethodImplementation * )
extern

◆ get_method_implementation_body()

std::string get_method_implementation_body ( oks::OksMethodImplementation * mi)
extern

◆ get_private_section()

std::string get_private_section ( oks::OksMethodImplementation * mi)
extern

◆ get_public_section()

std::string get_public_section ( oks::OksMethodImplementation * mi)
extern

◆ get_type()

std::string get_type ( oks::OksData::Type oks_type,
bool is_cpp )
extern

Definition at line 106 of file utils.cpp.

◆ has_superclass()

bool has_superclass ( const oks::OksClass * tested,
const oks::OksClass * c )
static

The function has_superclass returns true if 'tested' class has class 'c' as a superclass

Definition at line 63 of file oksdalgen.cxx.

◆ int2dx()

std::string int2dx ( int level)
extern

Definition at line 636 of file utils.cpp.

◆ load_schemas()

void load_schemas ( oks::OksKernel & kernel,
const std::list< std::string > & file_names,
std::set< oks::OksFile *, std::less< oks::OksFile * > > & file_hs )
static

Definition at line 1333 of file oksdalgen.cxx.

◆ ltrim()

std::string ltrim ( const std::string & s)

Definition at line 81 of file oksdalgen.cxx.

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 1399 of file oksdalgen.cxx.

◆ open_cpp_namespace()

int open_cpp_namespace ( std::ostream & s,
const std::string & value )
extern

Definition at line 642 of file utils.cpp.

◆ parse_arguments()

void parse_arguments ( int argc,
char * argv[],
std::list< std::string > & class_names,
std::list< std::string > & file_names,
std::list< std::string > & include_dirs,
std::list< std::string > & user_classes,
std::string & cpp_dir_name,
std::string & cpp_ns_name,
std::string & cpp_hdr_dir,
std::string & info_file_name,
bool & verbose )
extern

Definition at line 55 of file parse_cmdl.cpp.

◆ print_description()

void print_description ( std::ostream & s,
const std::string & text,
const char * dx )
extern

The function print_description() is used for printing of the multi-line text with right alignment.

Definition at line 72 of file utils.cpp.

◆ print_indented()

void print_indented ( std::ostream & s,
const std::string & text,
const char * dx )
extern

Definition at line 91 of file utils.cpp.

◆ process_external_class()

bool process_external_class ( ClassInfo::Map & cl_info,
const oks::OksClass * c,
const std::list< std::string > & include_dirs,
const std::list< std::string > & user_classes,
bool verbose )
extern

◆ rtrim()

std::string rtrim ( const std::string & s)

Definition at line 87 of file oksdalgen.cxx.

◆ set2out()

void set2out ( std::ostream & out,
const std::set< std::string > & data,
bool & is_first )
static

Definition at line 747 of file oksdalgen.cxx.

◆ trim()

std::string trim ( const std::string & s)

Definition at line 93 of file oksdalgen.cxx.

◆ write_info_file()

void write_info_file ( std::ostream & s,
const std::string & cpp_namespace,
const std::string & cpp_header_dir,
const std::set< const oks::OksClass *, std::less< const oks::OksClass * > > & class_names )
extern

Variable Documentation

◆ cpp_method_virtual_specifiers

const std::vector<std::string> cpp_method_virtual_specifiers
Initial value:

Definition at line 97 of file oksdalgen.cxx.

◆ WHITESPACE

const std::string WHITESPACE = " \n\r\t\f\v"

Definition at line 79 of file oksdalgen.cxx.