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
7b7a3316
Commit
7b7a3316
authored
Sep 26, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some const modifiers.
parent
d1578e4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
tool_base.cpp
common/tool/tool_base.cpp
+4
-4
tool_base.h
include/tool/tool_base.h
+8
-8
tool_manager.h
include/tool/tool_manager.h
+4
-4
No files found.
common/tool/tool_base.cpp
View file @
7b7a3316
...
...
@@ -25,25 +25,25 @@
#include <tool/tool_event.h>
#include <tool/tool_manager.h>
KiGfx
::
VIEW
*
TOOL_BASE
::
getView
()
KiGfx
::
VIEW
*
TOOL_BASE
::
getView
()
const
{
return
m_toolMgr
->
GetView
();
}
KiGfx
::
VIEW_CONTROLS
*
TOOL_BASE
::
getViewControls
()
KiGfx
::
VIEW_CONTROLS
*
TOOL_BASE
::
getViewControls
()
const
{
return
m_toolMgr
->
GetViewControls
();
}
wxWindow
*
TOOL_BASE
::
getEditFrameInt
()
wxWindow
*
TOOL_BASE
::
getEditFrameInt
()
const
{
return
m_toolMgr
->
GetEditFrame
();
}
EDA_ITEM
*
TOOL_BASE
::
getModelInt
()
EDA_ITEM
*
TOOL_BASE
::
getModelInt
()
const
{
return
m_toolMgr
->
GetModel
();
}
include/tool/tool_base.h
View file @
7b7a3316
...
...
@@ -80,7 +80,7 @@ public:
return
m_toolName
;
}
TOOL_MANAGER
*
GetManager
()
TOOL_MANAGER
*
GetManager
()
const
{
return
m_toolMgr
;
}
...
...
@@ -96,8 +96,8 @@ protected:
*/
void
attachManager
(
TOOL_MANAGER
*
aManager
);
KiGfx
::
VIEW
*
getView
();
KiGfx
::
VIEW_CONTROLS
*
getViewControls
();
KiGfx
::
VIEW
*
getView
()
const
;
KiGfx
::
VIEW_CONTROLS
*
getViewControls
()
const
;
/**
* Function getEditFrame()
...
...
@@ -106,7 +106,7 @@ protected:
* run-time type check
*/
template
<
typename
T
>
T
*
getEditFrame
()
T
*
getEditFrame
()
const
{
return
static_cast
<
T
*>
(
getEditFrameInt
()
);
}
...
...
@@ -117,10 +117,10 @@ protected:
* Returns the model object if it matches the requested type.
*/
template
<
typename
T
>
T
*
getModel
(
KICAD_T
modelType
)
T
*
getModel
(
KICAD_T
modelType
)
const
{
EDA_ITEM
*
m
=
getModelInt
();
// assert(modelType == m->Type());
return
static_cast
<
T
*>
(
m
);
}
...
...
@@ -132,8 +132,8 @@ protected:
private
:
// hide the implementation to avoid spreading half of
// kicad and wxWidgets headers to the tools that may not need them at all!
EDA_ITEM
*
getModelInt
();
wxWindow
*
getEditFrameInt
();
EDA_ITEM
*
getModelInt
()
const
;
wxWindow
*
getEditFrameInt
()
const
;
};
#endif
include/tool/tool_manager.h
View file @
7b7a3316
...
...
@@ -144,22 +144,22 @@ public:
KiGfx
::
VIEW_CONTROLS
*
aViewControls
,
wxWindow
*
aFrame
);
/* Accessors for the environment objects (view, model, etc.) */
KiGfx
::
VIEW
*
GetView
()
KiGfx
::
VIEW
*
GetView
()
const
{
return
m_view
;
}
KiGfx
::
VIEW_CONTROLS
*
GetViewControls
()
KiGfx
::
VIEW_CONTROLS
*
GetViewControls
()
const
{
return
m_viewControls
;
}
EDA_ITEM
*
GetModel
()
EDA_ITEM
*
GetModel
()
const
{
return
m_model
;
}
wxWindow
*
GetEditFrame
()
wxWindow
*
GetEditFrame
()
const
{
return
m_editFrame
;
}
...
...
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