Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 03a65cdb authored by Mathieu Faverge's avatar Mathieu Faverge

Support new naming convention in Paje, the old one is still supported

parent 205d4f05
...@@ -82,23 +82,32 @@ ...@@ -82,23 +82,32 @@
* the need of the user. * the need of the user.
*/ */
#define FIELDNAME_SIZEMAX 32 #define FIELDNAME_SIZEMAX 32
#define FIELDNAME_SIZE 16 #define FIELDNAME_SIZE 14
#define _PajeFN_Time 0 #define _PajeFN_Time 0
#define _PajeFN_Name 1 #define _PajeFN_Name 1
#define _PajeFN_Alias 2 #define _PajeFN_Alias 2
#define _PajeFN_Type 3
#define _PajeFN_Container 4
#define _PajeFN_StartContainerType 5
#define _PajeFN_EndContainerType 6
#define _PajeFN_StartContainer 7
#define _PajeFN_EndContainer 8
#define _PajeFN_Color 9
#define _PajeFN_Value 10
#define _PajeFN_Key 11
#define _PajeFN_File 12
#define _PajeFN_Line 13
/*
* Former type that are no longer used in Paje Format.
* Kept here for compatibility
*/
#define _PajeFN_ContainerType 3 #define _PajeFN_ContainerType 3
#define _PajeFN_EntityType 4 #define _PajeFN_EntityType 3
#define _PajeFN_Type 5 #define _PajeFN_SourceContainerType 5
#define _PajeFN_Container 6 #define _PajeFN_DestContainerType 6
#define _PajeFN_SourceContainerType 7 #define _PajeFN_SourceContainer 7
#define _PajeFN_DestContainerType 8 #define _PajeFN_DestContainer 8
#define _PajeFN_SourceContainer 9
#define _PajeFN_DestContainer 10
#define _PajeFN_Color 11
#define _PajeFN_Value 12
#define _PajeFN_Key 13
#define _PajeFN_File 14
#define _PajeFN_Line 15
/*! /*!
* \brief Types for the fields * \brief Types for the fields
......
...@@ -135,14 +135,12 @@ ParserDefinitionPaje::ParserDefinitionPaje() { ...@@ -135,14 +135,12 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
INSERT_FNAME(Time, _FieldType_Date ); INSERT_FNAME(Time, _FieldType_Date );
INSERT_FNAME(Name, _FieldType_Int | _FieldType_String ); INSERT_FNAME(Name, _FieldType_Int | _FieldType_String );
INSERT_FNAME(Alias, _FieldType_Int | _FieldType_String ); INSERT_FNAME(Alias, _FieldType_Int | _FieldType_String );
INSERT_FNAME(ContainerType, _FieldType_Int | _FieldType_String );
INSERT_FNAME(EntityType, _FieldType_Int | _FieldType_String );
INSERT_FNAME(Type, _FieldType_Int | _FieldType_String ); INSERT_FNAME(Type, _FieldType_Int | _FieldType_String );
INSERT_FNAME(Container, _FieldType_Int | _FieldType_String ); INSERT_FNAME(Container, _FieldType_Int | _FieldType_String );
INSERT_FNAME(SourceContainerType, _FieldType_Int | _FieldType_String ); INSERT_FNAME(StartContainerType, _FieldType_Int | _FieldType_String );
INSERT_FNAME(DestContainerType, _FieldType_Int | _FieldType_String ); INSERT_FNAME(EndContainerType, _FieldType_Int | _FieldType_String );
INSERT_FNAME(SourceContainer, _FieldType_Int | _FieldType_String ); INSERT_FNAME(StartContainer, _FieldType_Int | _FieldType_String );
INSERT_FNAME(DestContainer, _FieldType_Int | _FieldType_String ); INSERT_FNAME(EndContainer, _FieldType_Int | _FieldType_String );
INSERT_FNAME(Color, _FieldType_Color ); INSERT_FNAME(Color, _FieldType_Color );
INSERT_FNAME(Value, _FieldType_Int | _FieldType_String | _FieldType_Double); INSERT_FNAME(Value, _FieldType_Int | _FieldType_String | _FieldType_Double);
INSERT_FNAME(Key, _FieldType_Int | _FieldType_String ); INSERT_FNAME(Key, _FieldType_Int | _FieldType_String );
...@@ -155,17 +153,25 @@ ParserDefinitionPaje::ParserDefinitionPaje() { ...@@ -155,17 +153,25 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
_FNameStr2Id.insert(pair<string, int>(_FieldNames[i]._name, i)); _FNameStr2Id.insert(pair<string, int>(_FieldNames[i]._name, i));
} }
// Former types no longer used in Paje format
_FNameStr2Id.insert(pair<string, int>("ContainerType" , _PajeFN_ContainerType ));
_FNameStr2Id.insert(pair<string, int>("EntityType" , _PajeFN_EntityType ));
_FNameStr2Id.insert(pair<string, int>("SourceContainerType", _PajeFN_SourceContainerType ));
_FNameStr2Id.insert(pair<string, int>("DestContainerType" , _PajeFN_DestContainerType ));
_FNameStr2Id.insert(pair<string, int>("SourceContainer" , _PajeFN_SourceContainer ));
_FNameStr2Id.insert(pair<string, int>("DestContainer" , _PajeFN_DestContainer ));
// Initialize the list of Events available // Initialize the list of Events available
i = 0; i = 0;
_EventDefs.resize(PAJE_EVENTDEF_SIZE); _EventDefs.resize(PAJE_EVENTDEF_SIZE);
INSERT_EVENT(PajeDefineContainerType, CODE2(Name) | CODE2(Alias) | CODE2(ContainerType) ); INSERT_EVENT(PajeDefineContainerType, CODE2(Name) | CODE2(Alias) | CODE2(Type) );
INSERT_EVENT(PajeDefineEventType , CODE2(Name) | CODE2(Alias) | CODE2(ContainerType) ); INSERT_EVENT(PajeDefineEventType , CODE2(Name) | CODE2(Alias) | CODE2(Type) );
INSERT_EVENT(PajeDefineStateType , CODE2(Name) | CODE2(Alias) | CODE2(ContainerType) ); INSERT_EVENT(PajeDefineStateType , CODE2(Name) | CODE2(Alias) | CODE2(Type) );
INSERT_EVENT(PajeDefineVariableType , CODE2(Name) | CODE2(Alias) | CODE2(ContainerType) ); INSERT_EVENT(PajeDefineVariableType , CODE2(Name) | CODE2(Alias) | CODE2(Type) );
INSERT_EVENT(PajeDefineEntityValue , CODE2(Name) | CODE2(Alias) | CODE2(EntityType) ); INSERT_EVENT(PajeDefineEntityValue , CODE2(Name) | CODE2(Alias) | CODE2(Type) );
INSERT_EVENT(PajeDestroyContainer , CODE2(Name) | CODE2(Alias) | CODE2(Time) | CODE2(Type) ); INSERT_EVENT(PajeDestroyContainer , CODE2(Name) | CODE2(Alias) | CODE2(Time) | CODE2(Type) );
INSERT_EVENT(PajeCreateContainer , CODE2(Name) | CODE2(Alias) | CODE2(Time) | CODE2(Type) | CODE2(Container) ); INSERT_EVENT(PajeCreateContainer , CODE2(Name) | CODE2(Alias) | CODE2(Time) | CODE2(Type) | CODE2(Container) );
INSERT_EVENT(PajeDefineLinkType , CODE2(Name) | CODE2(Alias) | CODE2(ContainerType) | CODE2(SourceContainerType) | CODE2(DestContainerType) ); INSERT_EVENT(PajeDefineLinkType , CODE2(Name) | CODE2(Alias) | CODE2(Type) | CODE2(StartContainerType) | CODE2(EndContainerType) );
INSERT_EVENT(PajePopState , CODE2(Time) | CODE2(Type) | CODE2(Container) ); INSERT_EVENT(PajePopState , CODE2(Time) | CODE2(Type) | CODE2(Container) );
INSERT_EVENT(PajeSetState , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) ); INSERT_EVENT(PajeSetState , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) );
INSERT_EVENT(PajePushState , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) ); INSERT_EVENT(PajePushState , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) );
...@@ -173,9 +179,8 @@ ParserDefinitionPaje::ParserDefinitionPaje() { ...@@ -173,9 +179,8 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
INSERT_EVENT(PajeSetVariable , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) ); INSERT_EVENT(PajeSetVariable , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) );
INSERT_EVENT(PajeAddVariable , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) ); INSERT_EVENT(PajeAddVariable , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) );
INSERT_EVENT(PajeSubVariable , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) ); INSERT_EVENT(PajeSubVariable , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) );
INSERT_EVENT(PajeStartLink , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) | CODE2(Key) | CODE2(SourceContainer) ); INSERT_EVENT(PajeStartLink , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) | CODE2(Key) | CODE2(StartContainer) );
INSERT_EVENT(PajeEndLink , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) | CODE2(Key) | CODE2(DestContainer) ); INSERT_EVENT(PajeEndLink , CODE2(Time) | CODE2(Type) | CODE2(Container) | CODE2(Value) | CODE2(Key) | CODE2(EndContainer) );
} }
ParserDefinitionPaje::~ParserDefinitionPaje() { ParserDefinitionPaje::~ParserDefinitionPaje() {
...@@ -411,5 +416,3 @@ int ParserDefinitionPaje::definitions_number() const { ...@@ -411,5 +416,3 @@ int ParserDefinitionPaje::definitions_number() const {
const vector<PajeFieldName> *ParserDefinitionPaje::get_FieldNames() const { const vector<PajeFieldName> *ParserDefinitionPaje::get_FieldNames() const {
return &_FieldNames; return &_FieldNames;
} }
...@@ -76,22 +76,21 @@ ParserEventPaje::~ParserEventPaje(){ ...@@ -76,22 +76,21 @@ ParserEventPaje::~ParserEventPaje(){
void ParserEventPaje::store_event(const PajeLine *line, void ParserEventPaje::store_event(const PajeLine *line,
Trace &trace) { Trace &trace) {
string fvalue; string fvalue;
string alias; string alias;
string name; string name;
String container_type;
String source_container_type;
String dest_container_type;
String entity_type;
Date time;
String type; String type;
String start_container_type;
String end_container_type;
Date time;
String container; String container;
String value_string; String value_string;
Double value_double; Double value_double;
String source_container; String start_container;
String dest_container; String end_container;
String key; String key;
Name alias_name;
map<std::string, Value *> extra_fields; map<std::string, Value *> extra_fields;
...@@ -150,20 +149,16 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -150,20 +149,16 @@ void ParserEventPaje::store_event(const PajeLine *line,
name = fvalue; name = fvalue;
break; break;
case _PajeFN_ContainerType : case _PajeFN_Type :
container_type = fvalue; type = fvalue;
break;
case _PajeFN_SourceContainerType :
source_container_type = fvalue;
break; break;
case _PajeFN_DestContainerType : case _PajeFN_StartContainerType :
dest_container_type = fvalue; start_container_type = fvalue;
break; break;
case _PajeFN_EntityType : case _PajeFN_EndContainerType :
entity_type = fvalue; end_container_type = fvalue;
break; break;
case _PajeFN_Time : case _PajeFN_Time :
...@@ -177,10 +172,6 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -177,10 +172,6 @@ void ParserEventPaje::store_event(const PajeLine *line,
} }
break; break;
case _PajeFN_Type :
type = fvalue;
break;
case _PajeFN_Container : case _PajeFN_Container :
container = fvalue; container = fvalue;
break; break;
...@@ -200,12 +191,12 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -200,12 +191,12 @@ void ParserEventPaje::store_event(const PajeLine *line,
} }
break; break;
case _PajeFN_SourceContainer : case _PajeFN_StartContainer :
source_container = fvalue; start_container = fvalue;
break; break;
case _PajeFN_DestContainer : case _PajeFN_EndContainer :
dest_container = fvalue; end_container = fvalue;
break; break;
case _PajeFN_Key : case _PajeFN_Key :
...@@ -254,8 +245,6 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -254,8 +245,6 @@ void ParserEventPaje::store_event(const PajeLine *line,
} }
} }
Name alias_name;
if ( (alias != "") && (name == "" ) ){ if ( (alias != "") && (name == "" ) ){
name = alias; name = alias;
} }
...@@ -268,9 +257,10 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -268,9 +257,10 @@ void ParserEventPaje::store_event(const PajeLine *line,
switch( def->_id ) { switch( def->_id ) {
case _PajeDefineContainerType : case _PajeDefineContainerType :
{ {
ContainerType *temp_container_type = trace.search_container_type(container_type); ContainerType *temp_container_type = trace.search_container_type(type);
if( (temp_container_type == NULL) && (container_type.to_string() != "0") ){ if( (temp_container_type == NULL) && (type.to_string() != "0") ){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + container_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.define_container_type(alias_name, temp_container_type, extra_fields); trace.define_container_type(alias_name, temp_container_type, extra_fields);
...@@ -283,10 +273,12 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -283,10 +273,12 @@ void ParserEventPaje::store_event(const PajeLine *line,
ContainerType *temp_container_type = trace.search_container_type(type); ContainerType *temp_container_type = trace.search_container_type(type);
Container *temp_container = trace.search_container(container); Container *temp_container = trace.search_container(container);
if(temp_container_type == NULL && type.to_string() != "0"){ if(temp_container_type == NULL && type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else if(temp_container == NULL && container.to_string() != "0"){ else if(temp_container == NULL && container.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + container.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.create_container(time, alias_name, temp_container_type, temp_container, extra_fields); trace.create_container(time, alias_name, temp_container_type, temp_container, extra_fields);
...@@ -298,13 +290,15 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -298,13 +290,15 @@ void ParserEventPaje::store_event(const PajeLine *line,
case _PajeDestroyContainer : case _PajeDestroyContainer :
{ {
Container *temp_container = trace.search_container(alias_name.to_string());
ContainerType *temp_container_type = trace.search_container_type(type); ContainerType *temp_container_type = trace.search_container_type(type);
Container *temp_container = trace.search_container(alias_name.to_string());
if(temp_container == NULL && alias_name.to_string() != "0"){ if(temp_container == NULL && alias_name.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + alias_name.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + alias_name.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else if(temp_container_type == NULL && type.to_string() != "0"){ else if(temp_container_type == NULL && type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.destroy_container(time, temp_container, temp_container_type, extra_fields); trace.destroy_container(time, temp_container, temp_container_type, extra_fields);
...@@ -314,9 +308,10 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -314,9 +308,10 @@ void ParserEventPaje::store_event(const PajeLine *line,
case _PajeDefineEventType : case _PajeDefineEventType :
{ {
ContainerType *temp_container_type = trace.search_container_type(container_type); ContainerType *temp_container_type = trace.search_container_type(type);
if(temp_container_type == NULL && container_type.to_string() != "0"){ if(temp_container_type == NULL && type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + container_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.define_event_type(alias_name, temp_container_type, extra_fields); trace.define_event_type(alias_name, temp_container_type, extra_fields);
...@@ -326,9 +321,10 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -326,9 +321,10 @@ void ParserEventPaje::store_event(const PajeLine *line,
case _PajeDefineStateType : case _PajeDefineStateType :
{ {
ContainerType *temp_container_type = trace.search_container_type(container_type); ContainerType *temp_container_type = trace.search_container_type(type);
if(temp_container_type == NULL && container_type.to_string() != "0"){ if(temp_container_type == NULL && type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + container_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.define_state_type(alias_name, temp_container_type, extra_fields); trace.define_state_type(alias_name, temp_container_type, extra_fields);
...@@ -338,9 +334,10 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -338,9 +334,10 @@ void ParserEventPaje::store_event(const PajeLine *line,
case _PajeDefineVariableType : case _PajeDefineVariableType :
{ {
ContainerType *temp_container_type = trace.search_container_type(container_type); ContainerType *temp_container_type = trace.search_container_type(type);
if(temp_container_type == NULL && container_type.to_string() != "0"){ if(temp_container_type == NULL && type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + container_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.define_variable_type(alias_name, temp_container_type, extra_fields); trace.define_variable_type(alias_name, temp_container_type, extra_fields);
...@@ -350,29 +347,33 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -350,29 +347,33 @@ void ParserEventPaje::store_event(const PajeLine *line,
case _PajeDefineLinkType : case _PajeDefineLinkType :
{ {
ContainerType *temp_container_type = trace.search_container_type(container_type); ContainerType *temp_container_type = trace.search_container_type(type);
ContainerType *temp_source_container_type = trace.search_container_type(source_container_type); ContainerType *temp_start_container_type = trace.search_container_type(start_container_type);
ContainerType *temp_dest_container_type = trace.search_container_type(dest_container_type); ContainerType *temp_end_container_type = trace.search_container_type(end_container_type);
if(temp_container_type == NULL && container_type.to_string() != "0"){ if(temp_container_type == NULL && type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + container_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else if(temp_source_container_type == NULL && source_container_type.to_string() != "0"){ else if(temp_start_container_type == NULL && start_container_type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + source_container_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + start_container_type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else if(temp_dest_container_type == NULL && dest_container_type.to_string() != "0"){ else if(temp_end_container_type == NULL && end_container_type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + dest_container_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + end_container_type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.define_link_type(alias_name, temp_container_type, temp_source_container_type, temp_dest_container_type, extra_fields); trace.define_link_type(alias_name, temp_container_type, temp_start_container_type, temp_end_container_type, extra_fields);
} }
} }
break; break;
case _PajeDefineEntityValue : case _PajeDefineEntityValue :
{ {
EntityType *temp_entity_type = trace.search_entity_type(entity_type); EntityType *temp_entity_type = trace.search_entity_type(type);
if(temp_entity_type == NULL && entity_type.to_string() != "0"){ if(temp_entity_type == NULL && type.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_ENTITY_TYPE + entity_type.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_ENTITY_TYPE + type.to_string(), line->_id,
Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.define_entity_value(alias_name, temp_entity_type, extra_fields); trace.define_entity_value(alias_name, temp_entity_type, extra_fields);
...@@ -561,7 +562,7 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -561,7 +562,7 @@ void ParserEventPaje::store_event(const PajeLine *line,
EntityValue *temp_entity_value = trace.search_entity_value(value_string, temp_link_type); EntityValue *temp_entity_value = trace.search_entity_value(value_string, temp_link_type);
Container *temp_container = NULL; Container *temp_container = NULL;
Container *temp_source_container = NULL; Container *temp_start_container = NULL;
// temp_container // temp_container
if(_containers.find(container) != _containers.end()) { if(_containers.find(container) != _containers.end()) {
temp_container = _containers[container]; temp_container = _containers[container];
...@@ -570,13 +571,13 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -570,13 +571,13 @@ void ParserEventPaje::store_event(const PajeLine *line,
temp_container = trace.search_container(container); temp_container = trace.search_container(container);
_containers[container] = temp_container; _containers[container] = temp_container;
} }
// temp_source_container // temp_start_container
if(_containers.find(source_container) != _containers.end()) { if(_containers.find(start_container) != _containers.end()) {
temp_source_container = _containers[source_container]; temp_start_container = _containers[start_container];
} }
else { else {
temp_source_container = trace.search_container(source_container); temp_start_container = trace.search_container(start_container);
_containers[source_container] = temp_source_container; _containers[start_container] = temp_start_container;
} }
...@@ -586,11 +587,11 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -586,11 +587,11 @@ void ParserEventPaje::store_event(const PajeLine *line,
else if(temp_container == NULL && container.to_string() != "0"){ else if(temp_container == NULL && container.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR);
} }
else if(temp_source_container == NULL && source_container.to_string() != "0"){ else if(temp_start_container == NULL && start_container.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + source_container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + start_container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.start_link(time, temp_link_type, temp_container, temp_source_container, temp_entity_value, key, extra_fields); trace.start_link(time, temp_link_type, temp_container, temp_start_container, temp_entity_value, key, extra_fields);
} }
} }
break; break;
...@@ -601,7 +602,7 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -601,7 +602,7 @@ void ParserEventPaje::store_event(const PajeLine *line,
EntityValue *temp_entity_value = trace.search_entity_value(value_string, temp_link_type); EntityValue *temp_entity_value = trace.search_entity_value(value_string, temp_link_type);
Container *temp_container = NULL; Container *temp_container = NULL;
Container *temp_dest_container = NULL; Container *temp_end_container = NULL;
// temp_container // temp_container
if(_containers.find(container) != _containers.end()) { if(_containers.find(container) != _containers.end()) {
temp_container = _containers[container]; temp_container = _containers[container];
...@@ -610,13 +611,13 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -610,13 +611,13 @@ void ParserEventPaje::store_event(const PajeLine *line,
temp_container = trace.search_container(container); temp_container = trace.search_container(container);
_containers[container] = temp_container; _containers[container] = temp_container;
} }
// temp_dest_container // temp_end_container
if(_containers.find(dest_container) != _containers.end()) { if(_containers.find(end_container) != _containers.end()) {
temp_dest_container = _containers[dest_container]; temp_end_container = _containers[end_container];
} }
else { else {
temp_dest_container = trace.search_container(dest_container); temp_end_container = trace.search_container(end_container);
_containers[dest_container] = temp_dest_container; _containers[end_container] = temp_end_container;
} }
if(temp_link_type == NULL && type.to_string() != "0"){ if(temp_link_type == NULL && type.to_string() != "0"){
...@@ -625,11 +626,11 @@ void ParserEventPaje::store_event(const PajeLine *line, ...@@ -625,11 +626,11 @@ void ParserEventPaje::store_event(const PajeLine *line,
else if(temp_container == NULL && container.to_string() != "0"){ else if(temp_container == NULL && container.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR);
} }
else if(temp_dest_container == NULL && dest_container.to_string() != "0"){ else if(temp_end_container == NULL && end_container.to_string() != "0"){
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + dest_container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR); Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + end_container.to_string(), line->_id, Error::VITE_ERRCODE_ERROR);
} }
else{ else{
trace.end_link(time, temp_link_type, temp_container, temp_dest_container, temp_entity_value, key, extra_fields); trace.end_link(time, temp_link_type, temp_container, temp_end_container, temp_entity_value, key, extra_fields);
} }
} }
break; break;
......
...@@ -146,20 +146,12 @@ int mt_ParserEventPaje::store_event(const PajeLine *line, ...@@ -146,20 +146,12 @@ int mt_ParserEventPaje::store_event(const PajeLine *line,
name = fvalue; name = fvalue;
break; break;
case _PajeFN_ContainerType : case _PajeFN_StartContainerType :
tb_struct->container_type = fvalue; tb_struct->start_container_type = fvalue;
break; break;
case _PajeFN_SourceContainerType : case _PajeFN_EndContainerType :
tb_struct->source_container_type = fvalue;