// RsVPNodeFactory.h : Declaration of the CRsVPNodeFactory

#pragma once

// CRsVPNodeFactory
class ATL_NO_VTABLE CRsVPNodeFactory : 
    public CComObjectRootEx<CComMultiThreadModel>,
    public IRsNodeFactory 
{
public:
	CRsVPNodeFactory()
	{
	}

	BEGIN_COM_MAP(CRsVPNodeFactory)
        COM_INTERFACE_ENTRY(IRsNodeFactory)
        COM_INTERFACE_ENTRY2(IUnknown, IRsNodeFactory)
    END_COM_MAP()

	DECLARE_CLASSFACTORY_SINGLETON(CRsVPNodeFactory)
    DECLARE_NOT_AGGREGATABLE(CRsVPNodeFactory)
    DECLARE_PROTECT_FINAL_CONSTRUCT()


	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

// IRsVPNodeFactory
public:
	/**@name Methods of interface IRsVPNodeFactory */
	//@{
        
	/** Creates an uninitialized node object.
		@param riid [in] Reference to the identifier of the node 
		@param ppNode [out] Address of Node Interface variable that receives the interface pointer 
			to newly created object.
		@return This method supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following: 
		@return S_OK The specified object was created. 
		@return E_NOTIMPL This node factory does not support instancing nodes
	*/
	STDMETHOD(CreateInstance)(const IID * riid, IRsNode** ppNode);
        
	/** Creates an uninitialized node object that is part of an aggregate.
			@param pUnkOuter [in] pointer to the controlling IUnknown interface of the aggregate 
            @param riid [in] Ptr to the identifier of the node.
			@param ppNode [out] Address of Node Interface variable that receives the interface pointer 
				   to newly created object.
		    @return This method supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following: 
			@return S_OK The specified object was created. 
			@return E_NOTIMPL This node factory does not support instancing agregated nodes
    */
	STDMETHOD(CreateAggInstance)(IUnknown* pUnkOuter, const IID * riid, IUnknown** ppvObject);
		
	/** Enumerates node's descriptors of current factory object
            @ppEnumNodeDesc Pointer to an IRsEnumNodeDesc interface.
			@return S_OK Method succeeded.
			@return E_NOTIMPL This node factory does not support enumeration of Node's descriptors
    */
	STDMETHOD(EnumNodeDesc)(IRsEnumNodeDesc** ppEnumNodeDesc);

       /** Enumerates connectors(attributes) used by nodes
            @ppEnumConDesc Pointer to an IRsEnumConDesc interface.
			@return S_OK Method succeeded.
			@return E_NOTIMPL This node factory does not support enumeration of connector descriptors
    */
    STDMETHOD(EnumConDesc)(IRsEnumConDesc** ppEnumConDesc);
	
//@}
};

