Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
74a902da
Commit
74a902da
authored
Apr 30, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntactic sugar for TOOL_MANAGER::RunAction().
parent
557bb43d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
tool_manager.h
include/tool/tool_manager.h
+24
-2
No files found.
include/tool/tool_manager.h
View file @
74a902da
...
...
@@ -110,7 +110,18 @@ public:
* depends on the action.
* @return False if the action was not found.
*/
bool
RunAction
(
const
std
::
string
&
aActionName
,
bool
aNow
=
false
,
void
*
aParam
=
NULL
);
template
<
typename
T
>
bool
RunAction
(
const
std
::
string
&
aActionName
,
bool
aNow
=
false
,
T
aParam
=
NULL
)
{
return
RunAction
(
aActionName
,
aNow
,
reinterpret_cast
<
void
*>
(
aParam
)
);
}
bool
RunAction
(
const
std
::
string
&
aActionName
,
bool
aNow
,
void
*
aParam
=
NULL
);
bool
RunAction
(
const
std
::
string
&
aActionName
,
bool
aNow
=
false
)
{
return
RunAction
(
aActionName
,
aNow
,
(
void
*
)
NULL
);
}
/**
* Function RunAction()
...
...
@@ -122,7 +133,18 @@ public:
* @param aParam is an optional parameter that might be used by the invoked action. Its meaning
* depends on the action.
*/
void
RunAction
(
const
TOOL_ACTION
&
aAction
,
bool
aNow
=
false
,
void
*
aParam
=
NULL
);
template
<
typename
T
>
void
RunAction
(
const
TOOL_ACTION
&
aAction
,
bool
aNow
=
false
,
T
aParam
=
NULL
)
{
RunAction
(
aAction
,
aNow
,
reinterpret_cast
<
void
*>
(
aParam
)
);
}
void
RunAction
(
const
TOOL_ACTION
&
aAction
,
bool
aNow
,
void
*
aParam
);
void
RunAction
(
const
TOOL_ACTION
&
aAction
,
bool
aNow
=
false
)
{
RunAction
(
aAction
,
aNow
,
(
void
*
)
NULL
);
}
/**
* Function FindTool()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment