Logo ROOT  
Reference Guide
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 
17 namespace 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 
ROOT::ParseRule
bool ParseRule(std::string rule, ROOT::Internal::MembersMap_t &result, std::string &error_string)
Parse the schema rule as specified in the LinkDef file.
Definition: RConversionRuleParser.cxx:103
ROOT::WriteReadRawRuleFunc
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"...
Definition: RConversionRuleParser.cxx:694
TSchemaType.h
output
static void output(int code)
Definition: gifencode.c:226
ROOT::ProcessReadPragma
void ProcessReadPragma(const char *args, std::string &error_string)
I am being called when a read pragma is encountered.
Definition: RConversionRuleParser.cxx:885
ROOT::gReadRawRules
R__EXTERN SchemaRuleClassMap_t gReadRawRules
Definition: RConversionRuleParser.h:25
ROOT::MembersTypeMap_t
std::map< std::string, ROOT::Internal::TSchemaType > MembersTypeMap_t
Definition: RConversionRuleParser.h:27
ROOT::GetRuleIncludes
void GetRuleIncludes(std::list< std::string > &result)
Get the list of includes specified in the shema rules.
Definition: RConversionRuleParser.cxx:841
ROOT::ProcessReadRawPragma
void ProcessReadRawPragma(const char *args, std::string &error_string)
I am being called then a readraw pragma is encountered.
Definition: RConversionRuleParser.cxx:921
ROOT::SchemaRuleMap_t
std::map< std::string, std::string > SchemaRuleMap_t
Definition: RConversionRuleParser.h:22
ROOT::WriteSchemaList
void WriteSchemaList(std::list< SchemaRuleMap_t > &rules, const std::string &listName, std::ostream &output)
Write schema rules.
Definition: RConversionRuleParser.cxx:765
ROOT::SchemaRuleClassMap_t
std::map< std::string, std::list< SchemaRuleMap_t > > SchemaRuleClassMap_t
Definition: RConversionRuleParser.h:23
ROOT::WriteReadRuleFunc
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"].
Definition: RConversionRuleParser.cxx:641
ROOT::HasValidDataMembers
bool HasValidDataMembers(SchemaRuleMap_t &rule, MembersTypeMap_t &members, std::string &error_string)
Check if given rule contains references to valid data members.
Definition: RConversionRuleParser.cxx:447
R__EXTERN
#define R__EXTERN
Definition: DllImport.h:27
ROOT::Internal::MembersMap_t
std::map< std::string, std::string > MembersMap_t
Definition: TSchemaType.h:20
ROOT
VSD Structures.
Definition: StringConv.hxx:21
DllImport.h
ROOT::gReadRules
R__EXTERN SchemaRuleClassMap_t gReadRules
Definition: RConversionRuleParser.h:24