#include <math.h>           
#include <maya/MIOStream.h>
#include <maya/MFnPlugin.h>
#include "apiSimpleShape.h"           
#include "apiSimpleShapeUI.h"           
#include "apiSimpleShapeIterator.h"
MTypeId apiSimpleShape::id( 0x8009a );
 
apiSimpleShape::apiSimpleShape() {}
apiSimpleShape::~apiSimpleShape() {}
void* apiSimpleShape::creator()
{
    return new apiSimpleShape();
}
MStatus apiSimpleShape::initialize()
 
{ 
}
                                                    bool forReadOnly )
{
    apiSimpleShapeIterator * result = NULL;
    {
        result = new apiSimpleShapeIterator( getControlPoints(), componentList );
    }
    else 
    {
        result = new apiSimpleShapeIterator( getControlPoints(), components );
    }
    return result;
}
bool apiSimpleShape::acceptsGeometryIterator( bool writeable )
{
    return true;
}
bool apiSimpleShape::acceptsGeometryIterator( 
MObject&, 
bool writeable, 
bool forReadOnly )
 
{
    return true;
}
{ 
    MFnPlugin plugin( obj, PLUGIN_COMPANY, 
"5.0", 
"Any");
 
    MStatus stat = plugin.registerShape( 
"apiSimpleShape", apiSimpleShape::id,
 
                                   &apiSimpleShape::creator,
                                   &apiSimpleShape::initialize,
                                   &apiSimpleShapeUI::creator  );
    if ( ! stat ) {
        cerr << "Failed to register shape\n";
    }
    return stat;
}
{
    stat = plugin.deregisterNode( apiSimpleShape::id );
    if ( ! stat ) {
        cerr << "Failed to deregister shape : apiSimpleShape \n";
    }
    return stat;
}