All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

DNBMHIInterfaces Interface DNBIMHIOpenAccess

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---DNBIMHIOpenAccess
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface DNBIMHIOpenAccess

Interface representing a means to load data from the Hub into V5.

DNBIMHIOpenAccess is implemented on CATSession. Applications and CAA partners should NOT implement this interface.

Example:
  CATSession * pSession = CATSession::GetPtrSession();
  if (pSession)
  {
     DNBIMHIOpenAccess * pOpenAccess = NULL;
     HRESULT RC = pSession->QueryInterface(IID_DNBIMHIOpenAccess,
                                     (void**) &pOpenAccess);
     if (SUCCEEDED(RC) && NULL != pOpenAccess)
     {
        CATUnicodeString uLogin = "admin";
        CATUnicodeString uPassword = "admin";
        RC = pOpenAccess->ConnectToPPRHub( uLogin, uPassword );
        
        // Call method CreateLoadParameters() 
        // Call methods on DNBIMHILoadParameters to populate load information
        // Call method LoadFromPPRHub() load data into V5 
        // Release and set to NULL the pointer to DNBIMHILoadParameters
        //                obtained via the call to CreateLoadParameters
        
        pOpenAccess->Release();
        pOpenAccess = NULL;
      
     } // if (SUCCEEDED(RC) && NULL != pOpenAccess)

  } // if (pSession)  
  


Method Index


o ConnectToPPRHub(CATUnicodeString&,CATUnicodeString&)
This method establishes a connection to the PPRHub
o CreateLoadParameters(DNBIMHILoadParameters*&)
This method creates an object which will contain all the necessary information required for loading an object (and its structure) from a PPR Hub into V5
o LoadFromPPRHub(DNBIMHILoadParameters*,CATDocument*&,CATListOfCATUnicodeString&,CATBoolean,CATBoolean)
This method loads an object (and it structure) from a PPR Hub project into V5
Note: All Tools->Options settings will be respected during the load

Methods


o ConnectToPPRHub
public virtual HRESULT ConnectToPPRHub( const CATUnicodeString& iUsername,
const CATUnicodeString& iPassword)= 0
This method establishes a connection to the PPRHub
Parameters:
iUsername
[in] User Login name
iPassword
[in] User password
Returns:
S_OK if connection established OK S_FALSE if connection is already established for user E_FAIL if connection could not be established
o CreateLoadParameters
public virtual HRESULT CreateLoadParameters(DNBIMHILoadParameters*& oLoadParameters)= 0
This method creates an object which will contain all the necessary information required for loading an object (and its structure) from a PPR Hub into V5
Parameters:
oLoadParameters
[out] Interface pointer to the created Load Parameters object. This must be released after use (As per normal interface lifecycle rules)
Returns:
S_OK if object created ok and interface pointer returned OK E_FAIL on error
o LoadFromPPRHub
public virtual HRESULT LoadFromPPRHub( const DNBIMHILoadParameters* iLoadParameters,
CATDocument*& oLoadedDoc,
CATListOfCATUnicodeString& oErrorMessages,
CATBoolean iCreateDefaultWindow= TRUE,
CATBoolean iIsReadOnly= FALSE )= 0
This method loads an object (and it structure) from a PPR Hub project into V5
Note: All Tools->Options settings will be respected during the load
Parameters:
iLoadParameters
[in] The object which contains all the necessary information for the load
oLoadedDoc
[out] The V5 document into which data from the Hub is loaded
Lifecycle Rules Deviation: This method does not AddRef the returned pointer. Hence it must not be Released after use
oErrorMessages
[out] The list of message about invalid or insufficient agruments passed to the method
iCreateDefaultWindow
[in] Option to indicate whether a window needs to be created for the document or not If no window is created, then caller is responsible for life cycle of document
iIsReadOnly
[in] Option to indicate if document is to loaded in read-only mode
Returns:
S_OK if everything ran OK E_FAIL on error

This object is included in the file: DNBIMHIOpenAccess.h
If needed, your Imakefile.mk should include the module: CAADNBPDMItf

Copyright © 2003, Dassault Systèmes. All rights reserved.