Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RConversionRuleParser.h
Go to the documentation of this file.
1// @(#)root/core:$Id$
2// author: Lukasz Janyst <ljanyst@cern.ch>
3
4#ifndef R__CONVERSION_RULE_PARSER_H
5#define R__CONVERSION_RULE_PARSER_H
6
7#include <list>
8#include <map>
9#include <string>
10#include <ostream>
11
12#include "RConfigure.h"
13
14#include "TSchemaType.h"
15#include "DllImport.h"
16
17namespace ROOT
18{
19 //---------------------------------------------------------------------------
20 // Global variables
21 //---------------------------------------------------------------------------
22 typedef std::map<std::string, std::string> SchemaRuleMap_t;
23 typedef std::map<std::string, std::list<SchemaRuleMap_t> > SchemaRuleClassMap_t;
26
27 typedef std::map<std::string, ROOT::Internal::TSchemaType> MembersTypeMap_t;
28
29 //---------------------------------------------------------------------------
30 // Create the data member name-type map
31 //---------------------------------------------------------------------------
32 // void CreateNameTypeMap( const clang::CXXRecordDecl &cl, MembersTypeMap_t& members );
33
34 //---------------------------------------------------------------------------
35 // Check if given rule contains references to valid data members
36 //---------------------------------------------------------------------------
38 std::string& error_string);
39
40 //---------------------------------------------------------------------------
41 // Write the conversion function for Read rule
42 //---------------------------------------------------------------------------
43 void WriteReadRuleFunc( SchemaRuleMap_t& rule, int index,
44 std::string& mappedName,
45 MembersTypeMap_t& members, std::ostream& output );
46
47
48 //---------------------------------------------------------------------------
49 // Write the conversion function for ReadRaw rule
50 //---------------------------------------------------------------------------
51 void WriteReadRawRuleFunc( SchemaRuleMap_t& rule, int index,
52 std::string& mappedName,
53 MembersTypeMap_t& members, std::ostream& output );
54
55 //---------------------------------------------------------------------------
56 // Write schema rules
57 //---------------------------------------------------------------------------
58 void WriteSchemaList( std::list<SchemaRuleMap_t>& rules,
59 const std::string& listName, std::ostream& output );
60
61 //---------------------------------------------------------------------------
62 // Get the list of includes defined in schema rules
63 //---------------------------------------------------------------------------
64 void GetRuleIncludes( std::list<std::string> &result );
65
66 //---------------------------------------------------------------------------
67 // Parse read pragma
68 //---------------------------------------------------------------------------
69 bool ParseRule(std::string rule, ROOT::Internal::MembersMap_t &result, std::string &error_string );
70
71 //---------------------------------------------------------------------------
72 // Parse read pragma
73 //---------------------------------------------------------------------------
74 void ProcessReadPragma( const char* args, std::string& error_string );
75
76 //---------------------------------------------------------------------------
77 // Parse readraw pragma
78 //---------------------------------------------------------------------------
79 void ProcessReadRawPragma( const char* args, std::string& error_string );
80}
81
82#endif // R__CONVERSION_RULE_PARSER_H
83
#define R__EXTERN
Definition DllImport.h:27
std::map< std::string, std::string > MembersMap_t
Definition TSchemaType.h:20
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
std::map< std::string, std::list< SchemaRuleMap_t > > SchemaRuleClassMap_t
void ProcessReadPragma(const char *args, std::string &error_string)
I am being called when a read pragma is encountered.
void WriteSchemaList(std::list< SchemaRuleMap_t > &rules, const std::string &listName, std::ostream &output)
Write schema rules.
std::map< std::string, ROOT::Internal::TSchemaType > MembersTypeMap_t
void WriteReadRuleFunc(SchemaRuleMap_t &rule, int index, std::string &mappedName, MembersTypeMap_t &members, std::ostream &output)
Write the conversion function for Read rule, the function name is being written to rule["funcname"].
R__EXTERN SchemaRuleClassMap_t gReadRules
std::map< std::string, std::string > SchemaRuleMap_t
bool HasValidDataMembers(SchemaRuleMap_t &rule, MembersTypeMap_t &members, std::string &error_string)
Check if given rule contains references to valid data members.
void GetRuleIncludes(std::list< std::string > &result)
Get the list of includes specified in the shema rules.
void WriteReadRawRuleFunc(SchemaRuleMap_t &rule, int index, std::string &mappedName, MembersTypeMap_t &members, std::ostream &output)
Write the conversion function for ReadRaw rule, the function name is being written to rule["funcname"...
void ProcessReadRawPragma(const char *args, std::string &error_string)
I am being called then a readraw pragma is encountered.
R__EXTERN SchemaRuleClassMap_t gReadRawRules
bool ParseRule(std::string rule, ROOT::Internal::MembersMap_t &result, std::string &error_string)
Parse the schema rule as specified in the LinkDef file.
static void output(int code)
Definition gifencode.c:226