Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
91110c76
Commit
91110c76
authored
Jan 08, 2010
by
Vincent Carrubba
Browse files
Applying HACKING rules on EffectPluginTypeLoader
parent
66e1f3fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/EffectsEngine/EffectPluginTypeLoader.cpp
View file @
91110c76
...
...
@@ -27,7 +27,7 @@
#include
<QDebug>
EffectPluginTypeLoader
::
EffectPluginTypeLoader
()
:
m_iepc
(
NULL
)
EffectPluginTypeLoader
::
EffectPluginTypeLoader
(
void
)
:
m_iepc
(
NULL
)
{
}
...
...
@@ -38,11 +38,11 @@ EffectPluginTypeLoader::~EffectPluginTypeLoader()
IEffectPlugin
*
EffectPluginTypeLoader
::
createIEffectPluginInstance
(
void
)
const
{
if
(
m_iepc
!=
NULL
)
return
(
m_iepc
->
createIEffectPluginInstance
()
)
;
return
(
NULL
)
;
return
m_iepc
->
createIEffectPluginInstance
();
return
NULL
;
}
bool
EffectPluginTypeLoader
::
load
(
QString
const
&
fileName
)
bool
EffectPluginTypeLoader
::
load
(
const
QString
&
fileName
)
{
QObject
*
tmp
;
m_qpl
.
setFileName
(
fileName
);
...
...
@@ -51,15 +51,15 @@ bool EffectPluginTypeLoader::load( QString const & fileName )
if
(
tmp
==
NULL
)
{
qDebug
()
<<
m_qpl
.
errorString
();
return
(
false
)
;
return
false
;
}
m_iepc
=
qobject_cast
<
IEffectPluginCreator
*>
(
tmp
);
if
(
m_iepc
==
NULL
)
{
qDebug
()
<<
"The type of the created instance of the loaded class isn't IEffectPluginCreator* !"
;
return
(
false
);
qDebug
()
<<
"The type of the created instance of"
<<
"the loaded class isn't IEffectPluginCreator* !"
;
return
false
;
}
return
(
true
)
;
return
true
;
}
src/EffectsEngine/EffectPluginTypeLoader.h
View file @
91110c76
...
...
@@ -35,18 +35,16 @@ class EffectPluginTypeLoader
{
public:
EffectPluginTypeLoader
();
EffectPluginTypeLoader
(
void
);
~
EffectPluginTypeLoader
();
IEffectPlugin
*
createIEffectPluginInstance
(
void
)
const
;
bool
load
(
QString
const
&
fileName
);
bool
load
(
const
QString
&
fileName
);
private:
QPluginLoader
m_qpl
;
IEffectPluginCreator
*
m_iepc
;
QPluginLoader
m_qpl
;
IEffectPluginCreator
*
m_iepc
;
};
// L'EffectNode contiendra son id de type, son nom de type, son id d'instance, et son nom d'instance
#endif // EFFECTPLUGINTYPELOADER_H_
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment