Permalink
Browse files

Switch to putting all classes in "mph" namespace

maya-plugin-handler/helper. Preferable to the half-in-half-out setup we
had before with the extra long namespace name.
  • Loading branch information...
1 parent 2358db3 commit 33bedfc0fefcac4398869a661aa0ac638f0dd0ed Michael Jones committed Jan 9, 2012
Showing with 17 additions and 22 deletions.
  1. +8 −17 src/OpinionatedPluginHandler.hh
  2. +4 −0 src/PluginHandler.hh
  3. +3 −3 tests/example-plugin.cc
  4. +2 −2 tests/opinionated-example-plugin.cc
@@ -3,7 +3,7 @@
#include <maya/MFnPlugin.h>
-namespace OpinionatedPluginHandler
+namespace mph
{
//
@@ -171,8 +171,6 @@ public:
static const MCreateSyntaxFunction syntaxCreator() { return T::syntaxCreator; };
};
-}; // end OpinionatedPluginHandler namespace
-
//
// InitializeOpinionatedPluginHandler
//
@@ -191,14 +189,8 @@ public:
NodeT::id,
NodeT::creator,
NodeT::initialize,
- OpinionatedPluginHandler::NodeType<
- NodeT,
- OpinionatedPluginHandler::NodeTypeIsPresent< NodeT >::value
- >::nodeType(),
- OpinionatedPluginHandler::Classification<
- NodeT,
- OpinionatedPluginHandler::ClassificationIsPresent< NodeT >::value
- >::classification()
+ NodeType< NodeT, NodeTypeIsPresent< NodeT >::value >::nodeType(),
+ Classification< NodeT, ClassificationIsPresent< NodeT >::value >::classification()
);
}
@@ -208,9 +200,9 @@ public:
return m_pluginFn.registerCommand(
CommandT::commandName,
CommandT::creator,
- OpinionatedPluginHandler::SyntaxCreator<
+ SyntaxCreator<
CommandT,
- OpinionatedPluginHandler::SyntaxCreatorIsPresent< CommandT >::value
+ SyntaxCreatorIsPresent< CommandT >::value
>::syntaxCreator()
);
}
@@ -222,10 +214,7 @@ public:
DataT::dataName,
DataT::id,
DataT::creator,
- OpinionatedPluginHandler::DataType<
- DataT,
- OpinionatedPluginHandler::DataTypeIsPresent< DataT >::value
- >::dataType()
+ DataType< DataT, DataTypeIsPresent< DataT >::value >::dataType()
);
}
@@ -283,6 +272,8 @@ private:
MFnPlugin& m_pluginFn;
};
+}; // end namespace mph
+
#endif // OPINIONATEDPLUGINHANDLER_HH
View
@@ -3,6 +3,8 @@
#include <maya/MFnPlugin.h>
+namespace mph {
+
class PluginHandler
{
public:
@@ -160,5 +162,7 @@ private:
};
+}; // end namespace mph
+
#endif // PLUGINHANDLER_HH
View
@@ -7,7 +7,7 @@
#include <maya/MObject.h>
#include <maya/MStatus.h>
-MStatus handlePlugin( PluginHandler& handler )
+MStatus handlePlugin( mph::PluginHandler& handler )
{
MStatus status;
status = handler.handleNode(
@@ -39,7 +39,7 @@ MStatus initializePlugin( MObject obj )
MStatus result;
MFnPlugin plugin( obj, "Michael Jones", "0.1", "Any");
- InitializePluginHandler handler( plugin );
+ mph::InitializePluginHandler handler( plugin );
handlePlugin( handler );
return result;
@@ -51,7 +51,7 @@ MStatus uninitializePlugin( MObject obj)
MFnPlugin plugin( obj );
- UninitializePluginHandler handler( plugin );
+ mph::UninitializePluginHandler handler( plugin );
handlePlugin( handler );
return result;
@@ -30,7 +30,7 @@ MStatus initializePlugin( MObject obj )
MStatus result;
MFnPlugin plugin( obj, "Michael Jones", "0.1", "Any");
- InitializeOpinionatedPluginHandler handler( plugin );
+ mph::InitializeOpinionatedPluginHandler handler( plugin );
handlePlugin( handler );
return result;
@@ -42,7 +42,7 @@ MStatus uninitializePlugin( MObject obj)
MFnPlugin plugin( obj );
- UninitializeOpinionatedPluginHandler handler( plugin );
+ mph::UninitializeOpinionatedPluginHandler handler( plugin );
handlePlugin( handler );
return result;

0 comments on commit 33bedfc

Please sign in to comment.