Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
13e1cef3
Commit
13e1cef3
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
use getNextToken from onelab::parameter
parent
e966b70e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Fltk/onelabGroup.cpp
+2
-23
2 additions, 23 deletions
Fltk/onelabGroup.cpp
with
2 additions
and
23 deletions
Fltk/onelabGroup.cpp
+
2
−
23
View file @
13e1cef3
...
...
@@ -145,27 +145,6 @@ class onelabGmshServer : public GmshServer{
}
};
//FH duplicate code, could be placed in onelabUtils.
std
::
string
getNextToken
(
const
std
::
string
&
msg
,
std
::
string
::
size_type
&
first
,
char
separator
=
'\0'
)
{
if
(
first
==
std
::
string
::
npos
)
return
""
;
std
::
string
::
size_type
last
=
msg
.
find_first_of
(
separator
,
first
);
std
::
string
next
(
""
);
if
(
last
==
std
::
string
::
npos
){
next
=
msg
.
substr
(
first
);
first
=
last
;
}
else
if
(
first
==
last
){
next
=
""
;
first
=
last
+
1
;
}
else
{
next
=
msg
.
substr
(
first
,
last
-
first
);
first
=
last
+
1
;
}
return
next
;
}
bool
gmshLocalNetworkClient
::
receiveMessage
()
{
double
timer
=
GetTimeInSeconds
();
...
...
@@ -344,8 +323,8 @@ bool gmshLocalNetworkClient::receiveMessage()
case
GmshSocket
::
GMSH_CONNECT
:
{
std
::
string
::
size_type
first
=
0
;
std
::
string
clientName
=
getNextToken
(
message
,
first
);
std
::
string
command
=
getNextToken
(
message
,
first
);
std
::
string
clientName
=
onelab
::
parameter
::
getNextToken
(
message
,
first
);
std
::
string
command
=
onelab
::
parameter
::
getNextToken
(
message
,
first
);
gmshLocalNetworkClient
*
subClient
=
new
gmshLocalNetworkClient
(
clientName
,
command
);
onelabGmshServer
*
server
=
new
onelabGmshServer
(
subClient
);
...
...
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