Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
vite
Commits
925fd2bf
Commit
925fd2bf
authored
16 years ago
by
Pascal Noisette
Browse files
Options
Downloads
Patches
Plain Diff
principe du parserevent
parent
16d89cdf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
parser/src/algorithmeEventParser.cpp
+46
-0
46 additions, 0 deletions
parser/src/algorithmeEventParser.cpp
with
46 additions
and
0 deletions
parser/src/algorithmeEventParser.cpp
0 → 100644
+
46
−
0
View file @
925fd2bf
#algorithme pour convertion
convertir
(
String
type
,
String
valeur
)
:
Type
{
if
(
type
==
"int"
)
return
new
Integer
(
valeur
)
else
if
(
type
==
"String"
)
return
new
Str
(
valeur
)
else
if
(
type
==
"Color"
)
return
new
Color
(
valeur
)
}
#algorithme pour EventParser
E
:
Hash
des
evenements
(
constuit
dans
le
parserDef
),
ligne
S
:
Trace
Event
&
e
=
Hash
(
atoi
(
liretoken
(
ligne
)))
if
(
e
.
name
=
"PajedefineContainer"
)
{
int
i
=
0
;
String
token
;
Map
facultatif
<
int
,
Type
>
;
while
(
token
=
liretoken
(
ligne
))
{
String
typeattendu
=
e
.
vector
[
i
].
type
;
String
champattendu
=
e
.
vector
[
i
].
champ
;
i
++
;
if
(
champattendu
==
"name"
)
{
String
parametre1
=
token
;
}
else
if
(
champattendu
==
"couleur"
)
{
Couleur
parametre2
(
typeattendu
,
token
);
}
else
//facultatif
{
facultatif
+=
convertir
(
typeattendu
,
token
);
}
}
trace
.
storePajedefineContainer
(
parametre1
,
parametre2
,
facultatif
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment