Commit 78bc684e authored by Pascal Noisette's avatar Pascal Noisette
Browse files

Correction en vue de la compilation du parser

et : 
!!!!! 15 en C++ !!!!!
parent bdeb01b7
......@@ -2,6 +2,8 @@
using namespace std;
ParserEventDecoder::ParserEventDecoder(){
}
......@@ -237,7 +239,7 @@ void ParserEventDecoder::store_event(const Definition &definition, Line &line, T
}
else if(event_name == "PajeStartLink") {
trace.add_variable(time, trace.search_link_type(type), trace.search_container(container), trace.search_container(source_container), trace.search_entity_value(value_string), key, extra_fields);
//trace.add_variable(time, trace.search_link_type(type), trace.search_container(container), trace.search_container(source_container), trace.search_entity_value(value_string), key, extra_fields);
}
else {
......
......@@ -10,10 +10,10 @@
using namespace std;
static std::string res;
std::string& to_string(const vector<Value*> &opt){
static std::string res = "option(" ;
res = "option(" ;
for (int i=0;i<opt.size();i++)
res.append(opt[i]->to_string() + " ");
res.append(")");
......@@ -21,11 +21,11 @@ std::string& to_string(const vector<Value*> &opt){
}
void define_container_type(Name alias, ContainerType *container_type_parent, const vector<Value> &opt){
void define_container_type(Name alias, ContainerType *container_type_parent, const vector<Value*> &opt){
cout << "define_container_type "
<< alias.to_string()
<< " "
<< container_type_parent->to_string()
<< container_type_parent
<< " "
<< to_string(opt)
<< endl;
......@@ -33,15 +33,15 @@ void define_container_type(Name alias, ContainerType *container_type_parent, con
void create_container(Date time, Name alias, ContainerType *type, Container *parent, const vector<Value> &opt){
void create_container(Date time, Name alias, ContainerType *type, Container *parent, const vector<Value*> &opt){
cout << "create_container "
<< time.to_string
<< time.to_string()
<< " "
<< alias.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< parent->to_string()
<< parent
<< " "
<< to_string(opt)
<< endl;
......@@ -49,24 +49,24 @@ void define_container_type(Name alias, ContainerType *container_type_parent, con
void destroy_container(Date time, Name alias, ContainerType *type, const vector<Value> &opt){
void destroy_container(Date time, Name alias, ContainerType *type, const vector<Value*> &opt){
cout << "destroy_container "
<< time.to_string
<< time.to_string()
<< " "
<< alias.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< to_string(opt)
<< endl;
}
void define_event_type(Name alias, ContainerType *container_type, const vector<Value> &opt){
void define_event_type(Name alias, ContainerType *container_type, const vector<Value*> &opt){
cout << "define_event_type "
<< alias.to_string()
<< " "
<< container_type->to_string()
<< container_type
<< " "
<< to_string(opt)
<< endl;
......@@ -74,22 +74,22 @@ void define_container_type(Name alias, ContainerType *container_type_parent, con
void define_state_type(Name alias, ContainerType *container_type, const vector<Value> &opt){
void define_state_type(Name alias, ContainerType *container_type, const vector<Value*> &opt){
cout << "define_state_type "
<< alias.to_string()
<< " "
<< container_type->to_string()
<< container_type
<< " "
<< to_string(opt)
<< endl;
}
void define_variable_type(Name alias, ContainerType *container_type, const vector<Value> &opt){
void define_variable_type(Name alias, ContainerType *container_type, const vector<Value*> &opt){
cout << "define_variable_type "
<< alias.to_string()
<< " "
<< container_type->to_string()
<< container_type
<< " "
<< to_string(opt)
<< endl;
......@@ -97,15 +97,15 @@ void define_container_type(Name alias, ContainerType *container_type_parent, con
void define_link_type(Name alias, ContainerType *ancestor, ContainerType *source, ContainerType *destination, const vector<Value> &opt){
void define_link_type(Name alias, ContainerType *ancestor, ContainerType *source, ContainerType *destination, const vector<Value*> &opt){
cout << "define_link_type "
<< alias.to_string()
<< " "
<< ancestor->to_string()
<< ancestor
<< " "
<< source->to_string()
<< source
<< " "
<< destination->to_string()
<< destination
<< " "
<< to_string(opt)
<< endl;
......@@ -113,11 +113,11 @@ void define_container_type(Name alias, ContainerType *container_type_parent, con
void define_entity_value(Name alias, EntityType *entity_type, const vector<Value> &opt){
void define_entity_value(Name alias, EntityType *entity_type, const vector<Value*> &opt){
cout << "define_entity_value "
<< alias.to_string()
<< " "
<< entity_type->to_string()
<< entity_type
<< " "
<< to_string(opt)
<< endl;
......@@ -125,31 +125,31 @@ void define_container_type(Name alias, ContainerType *container_type_parent, con
void set_state(Date time, StateType *type, Container *container, EntityValue *value, const vector<Value> &op){
void set_state(Date time, StateType *type, Container *container, EntityValue *value, const vector<Value*> &op){
cout << "set_state "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< container->to_string()
<< container
<< " "
<< value->to_string()
<< value
<< " "
<< to_string(opt)
<< to_string(op)
<< endl;
}
void push_state(Date time, StateType *type, Container *container, EntityValue *value, const vector<Value> &opt){
void push_state(Date time, StateType *type, Container *container, EntityValue *value, const vector<Value*> &opt){
cout << "push_state "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< container->to_string()
<< container
<< " "
<< value->to_string()
<< value
<< " "
<< to_string(opt)
<< endl;
......@@ -157,14 +157,14 @@ void push_state(Date time, StateType *type, Container *container, EntityValue *v
void pop_state(Date time, StateType *type, Container *container, const vector<Value> &opt){
void pop_state(Date time, StateType *type, Container *container, const vector<Value*> &opt){
cout << "pop_state "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< container->to_string()
<< container
<< " "
<< to_string(opt)
<< endl;
......@@ -172,15 +172,15 @@ void pop_state(Date time, StateType *type, Container *container, const vector<Va
void new_event(Date time, EventType *type, Container *container, EntityValue *value, const vector<Value> &opt){
void new_event(Date time, EventType *type, Container *container, EntityValue *value, const vector<Value*> &opt){
cout << "new_event "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< container->to_string()
<< container
<< " "
<< value->to_string()
<< value
<< " "
<< to_string(opt)
<< endl;
......@@ -188,14 +188,14 @@ void new_event(Date time, EventType *type, Container *container, EntityValue *va
void set_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value> &opt){
void set_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value*> &opt){
cout << "set_variable "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< container->to_string()
<< container
<< " "
<< value.to_string()
<< " "
......@@ -204,14 +204,14 @@ void set_variable(Date time, VariableType *type, Container *container, Double va
}
void add_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value> &opt){
void add_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value*> &opt){
cout << "add_variable "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< container->to_string()
<< container
<< " "
<< value.to_string()
<< " "
......@@ -221,14 +221,14 @@ void add_variable(Date time, VariableType *type, Container *container, Double va
void sub_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value> &opt){
void sub_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value*> &opt){
cout << "sub_variable "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< container->to_string()
<< container
<< " "
<< value.to_string()
<< " "
......@@ -237,18 +237,18 @@ void sub_variable(Date time, VariableType *type, Container *container, Double va
}
void start_link(Date time, LinkType *type, Container *ancestor, Container *source, EntityValue value, Integer key, const vector<Value> &opt){
void start_link(Date time, LinkType *type, Container *ancestor, Container *source, EntityValue value, Integer key, const vector<Value*> &opt){
cout << "start_link "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< ancestor->to_string()
<< ancestor
<< " "
<< source->to_string()
<< source
<< " "
<< value.to_string()
<< value
<< " "
<< key.to_string()
<< " "
......@@ -258,18 +258,18 @@ void start_link(Date time, LinkType *type, Container *ancestor, Container *sourc
void end_link(Date time, LinkType *type, Container *ancestor, Container *destination, EntityValue *value, Integer key, const vector<Value> &opt){
void end_link(Date time, LinkType *type, Container *ancestor, Container *destination, EntityValue *value, Integer key, const vector<Value*> &opt){
cout << "start_link "
<< time.to_string()
<< " "
<< type->to_string()
<< type
<< " "
<< ancestor->to_string()
<< ancestor
<< " "
<< destination
<< " "
<< value->to_string()
<< value
<< " "
<< key.to_string()
<< " "
......@@ -283,50 +283,59 @@ void end_link(Date time, LinkType *type, Container *ancestor, Container *destina
Container *search_container_type(String name)
{
return "search(" + name + ")";
res = "search(" + name.to_string() + ")";
return &res;
}
Container *search_container(String name)
{
return "search(" + name + ")";
res = "search(" + name.to_string() + ")";
return &res;
}
Container *search_event_type(String name)
{
return "search(" + name + ")";
res = "search(" + name.to_string() + ")";
return &res;
}
Container *search_state_type(String name)
{
return "search(" + name + ")";
res = "search(" + name.to_string() + ")";
return &res;
}
Container *search_variable_type(String name) {
return "search(" + name + ")";
res = "search(" + name.to_string() + ")";
return &res;
}
Container *search_link_type(String name) {
return "search(" + name + ")";
res = "search(" + name.to_string() + ")";
return &res;
}
Container *search_entity_value(String name) {
return "search(" + name + ")";
res = "search(" + name.to_string() + ")";
return &res;
}
Container *search_entity_type(String name) const
{
return "search(" + name + ")";
Container *search_entity_type(String name)
{
res = "search(" + name.to_string() + ")";
return &res;
}
#ifndef TRACE_HPP
#define TRACE_HPP
#include "string.hpp"
#include "name.hpp"
#include "date.hpp"
#include <vector>
#include "../../../trace/src/values/Color.hpp"
#include "../../../trace/src/values/Date.hpp"
#include "../../../trace/src/values/Double.hpp"
#include "../../../trace/src/values/Hex.hpp"
#include "../../../trace/src/values/Integer.hpp"
#include "../../../trace/src/values/Name.hpp"
#include "../../../trace/src/values/String.hpp"
/*!
*
......@@ -25,6 +29,7 @@ typedef std::string EntityValue;
typedef std::string EventType;
typedef std::string VariableType;
typedef std::string LinkType;
typedef std::string Container;
class Trace{
......@@ -315,7 +320,7 @@ public :
* \brief search a container by his name or alias
*
*/
Container *search_link_type(String name) const;
VariableType *search_link_type(String name) const;
/*!
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment