Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
c15e3fc3
"README.md" did not exist on "5958a3e3fadc47f8d986870a79c80f3b3588b37a"
Commit
c15e3fc3
authored
14 years ago
by
Adam Wardynski
Browse files
Options
Downloads
Patches
Plain Diff
Use the new cloning and clearing from Variables.
parent
7b5e7e3a
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libwccl/ops/operator.h
+1
-2
1 addition, 2 deletions
libwccl/ops/operator.h
libwccl/ops/parsedexpression.h
+2
-5
2 additions, 5 deletions
libwccl/ops/parsedexpression.h
with
3 additions
and
7 deletions
libwccl/ops/operator.h
+
1
−
2
View file @
c15e3fc3
...
...
@@ -47,7 +47,6 @@ protected:
* Represents a parsed WCCL functional operator that returns a value of given type.
* @note The class methods are not thread-safe, but you can use clone method
* to acquire a separate copy of the Operator, and the copy can be used concurrently.
* @todo need to change copying of Variables once a clone method is available for them.
*/
template
<
class
T
>
class
Operator
:
public
FunctionalOperator
...
...
@@ -295,7 +294,7 @@ Operator<T>& Operator<T>::operator=(const Operator& other) {
BOOST_ASSERT
(
other
.
function_body_
);
BOOST_ASSERT
(
other
.
variables_
);
function_body_
.
reset
(
other
.
function_body_
);
variables_
.
reset
(
new
Variables
(
other
.
variables_
));
variables_
.
reset
(
other
.
variables_
->
clone
(
));
return
*
this
;
}
...
...
This diff is collapsed.
Click to expand it.
libwccl/ops/parsedexpression.h
+
2
−
5
View file @
c15e3fc3
...
...
@@ -122,8 +122,6 @@ public:
* Also, derived classes that have clone() method copy the values
* as well, but a class may provide convenience method clone_clean()
* in case you want to get a clean state.
* @todo It needs implementing, currently it is a no-op, because
* Variables object doesn't really provide means to do it yet
*/
void
clean
();
...
...
@@ -155,7 +153,7 @@ protected:
inline
ParsedExpression
::
ParsedExpression
(
const
Variables
&
variables
)
:
variables_
(
boost
::
make_shared
<
Variables
>
(
variables
))
:
variables_
(
variables
.
clone
(
))
{
}
...
...
@@ -204,8 +202,7 @@ void ParsedExpression::set(const std::string& var_name, const T& value) {
inline
void
ParsedExpression
::
clean
()
{
//TODO - imlement this. The Variables object doesn't really
//provide a way to do that atm so it should be changed
variables_
->
reset_values
();
}
inline
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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