Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLMC
Manage
Activity
Members
Labels
Plan
Issues
26
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLMC
Commits
5f55ab75
Commit
5f55ab75
authored
8 years ago
by
Hugo Beauzée-Luyssen
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused Toggleable class
parent
585448e1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Tools/Toggleable.hpp
+0
-76
0 additions, 76 deletions
src/Tools/Toggleable.hpp
src/Workflow/MainWorkflow.h
+0
-1
0 additions, 1 deletion
src/Workflow/MainWorkflow.h
with
0 additions
and
77 deletions
src/Tools/Toggleable.hpp
deleted
100644 → 0
+
0
−
76
View file @
585448e1
/*****************************************************************************
* Toggleable.hpp : Represents a generic container for toglleable values
*****************************************************************************
* Copyright (C) 2008-2016 VideoLAN
*
* Authors: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef TOGGLEABLE_HPP
#define TOGGLEABLE_HPP
/**
* This class represents a generic toggleable value container.
*/
template
<
typename
T
>
class
Toggleable
{
public:
Toggleable
()
:
m_ptr
(
nullptr
),
m_activated
(
true
)
{
}
void
setPtr
(
T
ptr
)
{
Q_ASSERT
(
m_ptr
==
nullptr
);
m_ptr
=
ptr
;
}
operator
T
()
{
return
m_ptr
;
}
T
operator
->
()
{
// Q_ASSERT_X( m_activated == true, "Toggleable<T>::operator->", "Pointer is deactivated" );
return
m_ptr
;
}
T
operator
->
()
const
{
// Q_ASSERT_X( m_activated == true, "Toggleable<T>::operator->", "Pointer is deactivated" );
return
m_ptr
;
}
bool
activated
()
const
{
return
m_activated
;
}
bool
deactivated
()
const
{
return
!
m_activated
;
}
void
activate
()
{
m_activated
=
true
;
}
void
deactivate
()
{
m_activated
=
false
;
}
private
:
T
m_ptr
;
bool
m_activated
;
};
#endif // TOGGLEABLE_HPP
This diff is collapsed.
Click to expand it.
src/Workflow/MainWorkflow.h
+
0
−
1
View file @
5f55ab75
...
...
@@ -26,7 +26,6 @@
#define MAINWORKFLOW_H
#include
"Types.h"
#include
"Tools/Toggleable.hpp"
#include
<QJsonObject>
#include
<memory>
...
...
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