Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
vite
Commits
03a65cdb
Commit
03a65cdb
authored
Nov 22, 2012
by
Mathieu Faverge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support new naming convention in Paje, the old one is still supported
parent
205d4f05
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1146 additions
and
1146 deletions
+1146
-1146
src/CMakeLists.txt
src/CMakeLists.txt
+17
-17
src/parser/PajeParser/PajeDefinition.cpp
src/parser/PajeParser/PajeDefinition.cpp
+53
-53
src/parser/PajeParser/PajeDefinition.hpp
src/parser/PajeParser/PajeDefinition.hpp
+22
-13
src/parser/PajeParser/ParserDefinitionPaje.cpp
src/parser/PajeParser/ParserDefinitionPaje.cpp
+97
-94
src/parser/PajeParser/ParserDefinitionPaje.hpp
src/parser/PajeParser/ParserDefinitionPaje.hpp
+12
-12
src/parser/PajeParser/ParserEventPaje.cpp
src/parser/PajeParser/ParserEventPaje.cpp
+235
-234
src/parser/PajeParser/mt_ParserEventPaje.cpp
src/parser/PajeParser/mt_ParserEventPaje.cpp
+153
-162
src/parser/PajeParser/mt_ParserPaje.cpp
src/parser/PajeParser/mt_ParserPaje.cpp
+97
-98
src/trace/TraceBuilderThread.cpp
src/trace/TraceBuilderThread.cpp
+456
-457
src/trace/TraceBuilderThread.hpp
src/trace/TraceBuilderThread.hpp
+4
-6
No files found.
src/CMakeLists.txt
View file @
03a65cdb
...
@@ -111,7 +111,7 @@ SET(VITE_HDRS
...
@@ -111,7 +111,7 @@ SET(VITE_HDRS
parser/ParsingThread.hpp
parser/ParsingThread.hpp
parser/Parser.hpp
parser/Parser.hpp
parser/ParserFactory.hpp
parser/ParserFactory.hpp
# Paje
# Paje
parser/PajeParser/PajeDefinition.hpp
parser/PajeParser/PajeDefinition.hpp
parser/PajeParser/PajeFileManager.hpp
parser/PajeParser/PajeFileManager.hpp
parser/PajeParser/ParserDefinitionPaje.hpp
parser/PajeParser/ParserDefinitionPaje.hpp
...
@@ -150,7 +150,7 @@ SET(VITE_UIS
...
@@ -150,7 +150,7 @@ SET(VITE_UIS
)
)
SET
(
VITE_SRCS
SET
(
VITE_SRCS
# Messages & Errors
# Messages & Errors
common/Message.cpp
common/Message.cpp
common/Errors.cpp
common/Errors.cpp
common/Tools.cpp
common/Tools.cpp
...
@@ -268,7 +268,7 @@ IF(VITE_ENABLE_VBO)
...
@@ -268,7 +268,7 @@ IF(VITE_ENABLE_VBO)
${
VITE_SRCS
}
${
VITE_SRCS
}
render/vbo.cpp
render/vbo.cpp
render/Render_alternate.cpp
render/Render_alternate.cpp
)
)
ENDIF
(
VITE_ENABLE_VBO
)
ENDIF
(
VITE_ENABLE_VBO
)
#############################################
#############################################
...
@@ -325,7 +325,7 @@ ENDIF(VITE_ENABLE_TAU)
...
@@ -325,7 +325,7 @@ ENDIF(VITE_ENABLE_TAU)
#ADD_DEFINITIONS(-DMEMORY_USAGE)
#ADD_DEFINITIONS(-DMEMORY_USAGE)
#ADD_DEFINITIONS(-DMEMORY_TRACE)
#ADD_DEFINITIONS(-DMEMORY_TRACE)
#############################################
#############################################
# BOOST
# BOOST
#############################################
#############################################
...
@@ -333,23 +333,23 @@ IF(VITE_ENABLE_SERIALIZATION)
...
@@ -333,23 +333,23 @@ IF(VITE_ENABLE_SERIALIZATION)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
add_definitions
(
"-DUSE_ITC -DBOOST_SERIALIZE"
)
add_definitions
(
"-DUSE_ITC -DBOOST_SERIALIZE"
)
SET
(
VITE_HDRS
SET
(
VITE_HDRS
${
VITE_HDRS
}
${
VITE_HDRS
}
parser/ParserSplitted.hpp
parser/ParserSplitted.hpp
trace/IntervalOfContainer.hpp
trace/IntervalOfContainer.hpp
trace/SerializerWriter.hpp
trace/SerializerWriter.hpp
trace/SerializerDispatcher.hpp
trace/SerializerDispatcher.hpp
)
)
SET
(
VITE_SRCS
SET
(
VITE_SRCS
${
VITE_SRCS
}
${
VITE_SRCS
}
parser/ParserSplitted.cpp
parser/ParserSplitted.cpp
trace/IntervalOfContainer.cpp
trace/IntervalOfContainer.cpp
trace/SerializerWriter.cpp
trace/SerializerWriter.cpp
trace/SerializerDispatcher.cpp
trace/SerializerDispatcher.cpp
)
)
ENDIF
(
VITE_ENABLE_SERIALIZATION
)
ENDIF
(
VITE_ENABLE_SERIALIZATION
)
...
@@ -386,7 +386,7 @@ if( APPLE )
...
@@ -386,7 +386,7 @@ if( APPLE )
SET
(
OSX_ICON_FILES
"interface/icon/mac_logo.icns"
)
SET
(
OSX_ICON_FILES
"interface/icon/mac_logo.icns"
)
set_source_files_properties
(
${
OSX_ICON_FILES
}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
set_source_files_properties
(
${
OSX_ICON_FILES
}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
ADD_EXECUTABLE
(
vite MACOSX_BUNDLE
${
VITE_SRCS
}
${
VITE_MOC
}
${
VITE_RCC_SRCS
}
${
OSX_ICON_FILES
}
)
ADD_EXECUTABLE
(
vite MACOSX_BUNDLE
${
VITE_SRCS
}
${
VITE_MOC
}
${
VITE_RCC_SRCS
}
${
OSX_ICON_FILES
}
)
SET_TARGET_PROPERTIES
(
vite PROPERTIES
SET_TARGET_PROPERTIES
(
vite PROPERTIES
MACOSX_BUNDLE_INFO_STRING
"ViTE"
MACOSX_BUNDLE_INFO_STRING
"ViTE"
MACOSX_BUNDLE_ICON_FILE
"mac_logo.icns"
MACOSX_BUNDLE_ICON_FILE
"mac_logo.icns"
MACOSX_BUNDLE_LONG_VERSION_STRING
"Visual Trace Explorer - version
${
VITE_VERSION_MAJOR
}
.
${
VITE_VERSION_MINOR
}
"
MACOSX_BUNDLE_LONG_VERSION_STRING
"Visual Trace Explorer - version
${
VITE_VERSION_MAJOR
}
.
${
VITE_VERSION_MINOR
}
"
...
@@ -394,7 +394,7 @@ if( APPLE )
...
@@ -394,7 +394,7 @@ if( APPLE )
MACOSX_BUNDLE_SHORT_VERSION_STRING
"ViTE-
${
VITE_VERSION_MAJOR
}
.
${
VITE_VERSION_MINOR
}
"
MACOSX_BUNDLE_SHORT_VERSION_STRING
"ViTE-
${
VITE_VERSION_MAJOR
}
.
${
VITE_VERSION_MINOR
}
"
MACOSX_BUNDLE_BUNDLE_VERSION
"1.0"
MACOSX_BUNDLE_BUNDLE_VERSION
"1.0"
MACOSX_BUNDLE_COPYRIGHT
"INRIA 2006-2012"
MACOSX_BUNDLE_COPYRIGHT
"INRIA 2006-2012"
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/vite-info.plist.in
)
MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/vite-info.plist.in
)
else
(
APPLE
)
else
(
APPLE
)
ADD_EXECUTABLE
(
vite
${
VITE_SRCS
}
${
VITE_MOC
}
${
VITE_RCC_SRCS
}
)
ADD_EXECUTABLE
(
vite
${
VITE_SRCS
}
${
VITE_MOC
}
${
VITE_RCC_SRCS
}
)
endif
(
APPLE
)
endif
(
APPLE
)
...
@@ -410,7 +410,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
...
@@ -410,7 +410,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
rt
rt
)
)
ADD_DEFINITIONS
(
"-DBOOST_GZIP"
)
ADD_DEFINITIONS
(
"-DBOOST_GZIP"
)
ENDIF
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
ENDIF
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
IF
(
VITE_ENABLE_VBO
)
IF
(
VITE_ENABLE_VBO
)
TARGET_LINK_LIBRARIES
(
vite
TARGET_LINK_LIBRARIES
(
vite
...
...
src/parser/PajeParser/PajeDefinition.cpp
View file @
03a65cdb
...
@@ -60,41 +60,41 @@ void print(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
...
@@ -60,41 +60,41 @@ void print(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
size_t
size
=
def
->
_fields
.
size
();
size_t
size
=
def
->
_fields
.
size
();
cout
<<
def
->
_trid
<<
" : "
<<
def
->
_name
<<
endl
;
cout
<<
def
->
_trid
<<
" : "
<<
def
->
_name
<<
endl
;
for
(
i
=
0
;
i
<
size
;
i
++
){
for
(
i
=
0
;
i
<
size
;
i
++
){
PajeFieldName
p
;
PajeFieldName
p
;
try
{
try
{
p
=
(
*
fields
).
at
(
def
->
_fields
[
i
].
_idname
);
p
=
(
*
fields
).
at
(
def
->
_fields
[
i
].
_idname
);
cout
<<
" "
<<
p
.
_name
;
cout
<<
" "
<<
p
.
_name
;
}
catch
(
out_of_range
&
e
){
}
catch
(
out_of_range
&
e
){
cout
<<
" "
<<
"name not found"
;
cout
<<
" "
<<
"name not found"
;
}
}
string
s
;
string
s
;
//as this won't change in the future, we can use a switch
//as this won't change in the future, we can use a switch
switch
(
def
->
_fields
[
i
].
_idtype
){
switch
(
def
->
_fields
[
i
].
_idtype
){
case
(
1
<<
0
)
:
case
(
1
<<
0
)
:
s
=
"int"
;
s
=
"int"
;
break
;
break
;
case
(
1
<<
1
)
:
case
(
1
<<
1
)
:
s
=
"hex"
;
s
=
"hex"
;
break
;
break
;
case
(
1
<<
2
)
:
case
(
1
<<
2
)
:
s
=
"date"
;
s
=
"date"
;
break
;
break
;
case
(
1
<<
3
)
:
case
(
1
<<
3
)
:
s
=
"double"
;
s
=
"double"
;
break
;
break
;
case
(
1
<<
4
)
:
case
(
1
<<
4
)
:
s
=
"string"
;
s
=
"string"
;
break
;
break
;
case
(
1
<<
5
)
:
case
(
1
<<
5
)
:
s
=
"color"
;
s
=
"color"
;
break
;
break
;
default:
default:
s
=
"error : wrong type"
;
s
=
"error : wrong type"
;
break
;
break
;
}
}
cout
<<
" "
<<
s
<<
endl
;
cout
<<
" "
<<
s
<<
endl
;
}
}
}
}
...
@@ -106,7 +106,7 @@ string print_string(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
...
@@ -106,7 +106,7 @@ string print_string(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
outstream
<<
def
->
_name
;
outstream
<<
def
->
_name
;
outstream
<<
"
\n
"
;
outstream
<<
"
\n
"
;
for
(
i
=
0
;
i
<
size
;
i
++
){
for
(
i
=
0
;
i
<
size
;
i
++
){
//try to find the name of the field we want to print
//try to find the name of the field we want to print
PajeFieldName
p
;
PajeFieldName
p
;
...
@@ -116,33 +116,33 @@ string print_string(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
...
@@ -116,33 +116,33 @@ string print_string(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
}
catch
(
out_of_range
&
e
){
}
catch
(
out_of_range
&
e
){
outstream
<<
" "
<<
"name not found"
;
outstream
<<
" "
<<
"name not found"
;
}
}
string
s
;
string
s
;
//as this won't change in the future, we can use a switch
//as this won't change in the future, we can use a switch
switch
(
def
->
_fields
[
i
].
_idtype
){
switch
(
def
->
_fields
[
i
].
_idtype
){
case
(
1
<<
0
)
:
case
(
1
<<
0
)
:
s
=
"int"
;
s
=
"int"
;
break
;
break
;
case
(
1
<<
1
)
:
case
(
1
<<
1
)
:
s
=
"hex"
;
s
=
"hex"
;
break
;
break
;
case
(
1
<<
2
)
:
case
(
1
<<
2
)
:
s
=
"date"
;
s
=
"date"
;
break
;
break
;
case
(
1
<<
3
)
:
case
(
1
<<
3
)
:
s
=
"double"
;
s
=
"double"
;
break
;
break
;
case
(
1
<<
4
)
:
case
(
1
<<
4
)
:
s
=
"string"
;
s
=
"string"
;
break
;
break
;
case
(
1
<<
5
)
:
case
(
1
<<
5
)
:
s
=
"color"
;
s
=
"color"
;
break
;
break
;
default:
default:
s
=
"error : wrong type"
;
s
=
"error : wrong type"
;
break
;
break
;
}
}
outstream
<<
" "
<<
s
;
outstream
<<
" "
<<
s
;
outstream
<<
"
\n
"
;
outstream
<<
"
\n
"
;
}
}
return
outstream
.
str
();
return
outstream
.
str
();
...
@@ -150,19 +150,19 @@ string print_string(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
...
@@ -150,19 +150,19 @@ string print_string(std::vector<PajeFieldName>* fields, PajeDefinition *def) {
bool
check_definition
(
PajeDefinition
*
def
)
{
bool
check_definition
(
PajeDefinition
*
def
)
{
int
fdpresent
=
def
->
_fdpresent
;
int
fdpresent
=
def
->
_fdpresent
;
// If the definition requires Alias or Name,
// If the definition requires Alias or Name,
// and the trace provide only one the both, it's ok
// and the trace provide only one the both, it's ok
if
(
((
def
->
_fdrequired
&
CODE
(
_PajeFN_Alias
))
||
if
(
((
def
->
_fdrequired
&
CODE
(
_PajeFN_Alias
))
||
(
def
->
_fdrequired
&
CODE
(
_PajeFN_Name
)))
&&
(
def
->
_fdrequired
&
CODE
(
_PajeFN_Name
)))
&&
((
def
->
_fdpresent
&
CODE
(
_PajeFN_Alias
))
||
((
def
->
_fdpresent
&
CODE
(
_PajeFN_Alias
))
||
(
def
->
_fdpresent
&
CODE
(
_PajeFN_Name
)))
)
{
(
def
->
_fdpresent
&
CODE
(
_PajeFN_Name
)))
)
{
fdpresent
=
fdpresent
|
CODE
(
_PajeFN_Alias
);
fdpresent
=
fdpresent
|
CODE
(
_PajeFN_Alias
);
fdpresent
=
fdpresent
|
CODE
(
_PajeFN_Name
);
fdpresent
=
fdpresent
|
CODE
(
_PajeFN_Name
);
}
}
if
(
(
fdpresent
&
def
->
_fdrequired
)
==
def
->
_fdrequired
)
if
(
(
fdpresent
&
def
->
_fdrequired
)
==
def
->
_fdrequired
)
return
true
;
return
true
;
else
else
return
false
;
return
false
;
}
}
...
...
src/parser/PajeParser/PajeDefinition.hpp
View file @
03a65cdb
...
@@ -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 1
6
#define FIELDNAME_SIZE 1
4
#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
...
...
src/parser/PajeParser/ParserDefinitionPaje.cpp
View file @
03a65cdb
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
** use, modify and/or redistribute the software under the terms of the
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** the economic rights, and the successive licensors have only limited
** liability.
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** software by the user in light of its specific status of free software,
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
** their requirements in conditions enabling the security of their
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
** - MARCOUEILLE Jule
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - NOISETTE Pascal
** - REDONDY Arthur
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
**
*/
*/
...
@@ -83,7 +83,7 @@ using namespace std;
...
@@ -83,7 +83,7 @@ using namespace std;
_EventDefs[_##name]._fdrequired = required; \
_EventDefs[_##name]._fdrequired = required; \
i++; \
i++; \
}
}
std
::
map
<
std
::
string
,
int
>
ParserDefinitionPaje
::
_EvDefStr2Id
;
std
::
map
<
std
::
string
,
int
>
ParserDefinitionPaje
::
_EvDefStr2Id
;
std
::
map
<
std
::
string
,
int
>
ParserDefinitionPaje
::
_FTypeStr2Code
;
std
::
map
<
std
::
string
,
int
>
ParserDefinitionPaje
::
_FTypeStr2Code
;
...
@@ -98,34 +98,34 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
...
@@ -98,34 +98,34 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
_nbparsers
++
;
_nbparsers
++
;
if
(
!
_initialized
)
{
if
(
!
_initialized
)
{
_initialized
=
true
;
_initialized
=
true
;
// Initialize the list of EventDef's names
// Initialize the list of EventDef's names
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineContainerType"
,
_PajeDefineContainerType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineContainerType"
,
_PajeDefineContainerType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineEventType"
,
_PajeDefineEventType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineEventType"
,
_PajeDefineEventType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineStateType"
,
_PajeDefineStateType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineStateType"
,
_PajeDefineStateType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineVariableType"
,
_PajeDefineVariableType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineVariableType"
,
_PajeDefineVariableType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineLinkType"
,
_PajeDefineLinkType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineLinkType"
,
_PajeDefineLinkType
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineEntityValue"
,
_PajeDefineEntityValue
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDefineEntityValue"
,
_PajeDefineEntityValue
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeCreateContainer"
,
_PajeCreateContainer
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeCreateContainer"
,
_PajeCreateContainer
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDestroyContainer"
,
_PajeDestroyContainer
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeDestroyContainer"
,
_PajeDestroyContainer
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeNewEvent"
,
_PajeNewEvent
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeNewEvent"
,
_PajeNewEvent
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeSetState"
,
_PajeSetState
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeSetState"
,
_PajeSetState
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajePushState"
,
_PajePushState
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajePushState"
,
_PajePushState
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajePopState"
,
_PajePopState
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajePopState"
,
_PajePopState
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeSetVariable"
,
_PajeSetVariable
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeSetVariable"
,
_PajeSetVariable
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeAddVariable"
,
_PajeAddVariable
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeAddVariable"
,
_PajeAddVariable
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeSubVariable"
,
_PajeSubVariable
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeSubVariable"
,
_PajeSubVariable
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeStartLink"
,
_PajeStartLink
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeStartLink"
,
_PajeStartLink
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeEndLink"
,
_PajeEndLink
));
_EvDefStr2Id
.
insert
(
pair
<
string
,
int
>
(
"PajeEndLink"
,
_PajeEndLink
));
// Initialize the list of types available for field in EventDef declaration
// Initialize the list of types available for field in EventDef declaration
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"int"
,
_FieldType_Int
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"int"
,
_FieldType_Int
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"hex"
,
_FieldType_Hex
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"hex"
,
_FieldType_Hex
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"date"
,
_FieldType_Date
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"date"
,
_FieldType_Date
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"double"
,
_FieldType_Double
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"double"
,
_FieldType_Double
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"string"
,
_FieldType_String
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"string"
,
_FieldType_String
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"color"
,
_FieldType_Color
));
_FTypeStr2Code
.
insert
(
pair
<
string
,
int
>
(
"color"
,
_FieldType_Color
));
}
}
...
@@ -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
(
S
ourceContainerType
,
_FieldType_Int
|
_FieldType_String
);
INSERT_FNAME
(
S
tartContainerType
,
_FieldType_Int
|
_FieldType_String
);
INSERT_FNAME
(
DestContainerType
,
_FieldType_Int
|
_FieldType_String
);
INSERT_FNAME
(
EndContainerType
,
_FieldType_Int
|
_FieldType_String
);
INSERT_FNAME
(
S
ourceContainer
,
_FieldType_Int
|
_FieldType_String
);
INSERT_FNAME
(
S
tartContainer
,
_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
);
...
@@ -152,20 +150,28 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
...
@@ -152,20 +150,28 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
// Initialize the map between the field names and the associated id
// Initialize the map between the field names and the associated id
_nbFieldNames
=
FIELDNAME_SIZE
;
_nbFieldNames
=
FIELDNAME_SIZE
;
for
(
i
=
0
;
i
<
FIELDNAME_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
FIELDNAME_SIZE
;
i
++
)
{
_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
(
Container
Type
)
);
INSERT_EVENT
(
PajeDefineContainerType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Type
)
);
INSERT_EVENT
(
PajeDefineEventType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Container
Type
)
);
INSERT_EVENT
(
PajeDefineEventType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Type
)
);
INSERT_EVENT
(
PajeDefineStateType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Container
Type
)
);
INSERT_EVENT
(
PajeDefineStateType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Type
)
);
INSERT_EVENT
(
PajeDefineVariableType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Container
Type
)
);
INSERT_EVENT
(
PajeDefineVariableType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Type
)
);
INSERT_EVENT
(
PajeDefineEntityValue
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Entity
Type
)
);
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
(
Dest
ContainerType
)
);
INSERT_EVENT
(
PajeDefineLinkType
,
CODE2
(
Name
)
|
CODE2
(
Alias
)
|
CODE2
(
Type
)
|
CODE2
(
StartContainerType
)
|
CODE2
(
End
ContainerType
)
);
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
()
{
...
@@ -183,7 +188,7 @@ ParserDefinitionPaje::~ParserDefinitionPaje() {
...
@@ -183,7 +188,7 @@ ParserDefinitionPaje::~ParserDefinitionPaje() {
// Free the string to store extra names
// Free the string to store extra names
for
(
i
=
FIELDNAME_SIZE
;
i
<
_nbFieldNames
;
i
++
)
{