Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ImportInterfaceC Class Reference

Import interface class. More...

#include <ImportInterfaceC.h>

List of all members.

Public Member Functions

 ImportInterfaceC (PajaSystem::DeviceContextC *pContext, PajaSystem::TimeContextC *pTimeContext, FileListC *pFileList, PluginClass::FactoryC *pFactory)
 Default constructor (used internally).

virtual ~ImportInterfaceC ()
 Default destructor (used internally).

virtual FileHandleCrequest_import (const char *szName, const PluginClass::SuperClassIdC &rSuperFilter, const PluginClass::ClassIdC &rClassFilter)
 Imports requested file.

virtual void initialize_importable (Import::ImportableI *pImp, PajaTypes::uint32 ui32Reason)
 Used internally.

virtual FileListCget_filelist ()
 Returns pointer to the file list.

virtual void set_project_path (const char *szDir)
 Adds search directory.

virtual const char * get_project_path () const
 Returns the project path.

virtual bool is_relative_path (const char *szFileName)
 Returns true if path is relative path, else false.

virtual const char * get_relative_path (const char *szFileName)
 Converts absolute path to relative path.

virtual const char * get_absolute_path (const char *szFileName)
 Converts relative path to absolute path.

virtual void add_common_dialog (PajaSystem::CommonDialogI *pDlg)
 Adds new common dialog to list.

virtual PajaSystem::CommonDialogIget_common_dialog (const PluginClass::ClassIdC &rClassID)
 Gets a common dialog based on the class ID.

virtual void set_parent_folder (Import::FileHandleC *pFolder)
 Used internally, sets the parent folder of hte session.

virtual PajaTypes::uint32 begin_session ()
 Starts a new importsession, used internally.

virtual void end_session (PajaTypes::uint32 ui32SessionID)
 Ends an importsession, used internally.


Detailed Description

Import interface class.

Import interface class is a tool class for importers. It's purpose is to enable the importers to import other files during the load. For example, a 3D file importer can request the interface to import it's textures.

This class is implemented by the system.


Constructor & Destructor Documentation

ImportInterfaceC PajaSystem::DeviceContextC   pContext,
PajaSystem::TimeContextC   pTimeContext,
FileListC   pFileList,
PluginClass::FactoryC   pFactory
 

Default constructor (used internally).

virtual ~ImportInterfaceC   [virtual]
 

Default destructor (used internally).


Member Function Documentation

virtual void add_common_dialog PajaSystem::CommonDialogI   pDlg [virtual]
 

Adds new common dialog to list.

virtual PajaTypes::uint32 begin_session   [virtual]
 

Starts a new importsession, used internally.

virtual void end_session PajaTypes::uint32    ui32SessionID [virtual]
 

Ends an importsession, used internally.

virtual const char* get_absolute_path const char *    szFileName [virtual]
 

Converts relative path to absolute path.

The returned string is temporary, and is valid only until this method is called again. Before using the string, it should be copied.

virtual PajaSystem::CommonDialogI* get_common_dialog const PluginClass::ClassIdC   rClassID [virtual]
 

Gets a common dialog based on the class ID.

virtual FileListC* get_filelist   [virtual]
 

Returns pointer to the file list.

virtual const char* get_project_path   const [virtual]
 

Returns the project path.

virtual const char* get_relative_path const char *    szFileName [virtual]
 

Converts absolute path to relative path.

The returned string is temporary, and is valid only until this method is called again. Before using the string, it should be copied. If the file name is not relative to the set project path, it will be left absolute.

virtual void initialize_importable Import::ImportableI   pImp,
PajaTypes::uint32    ui32Reason
[virtual]
 

Used internally.

virtual bool is_relative_path const char *    szFileName [virtual]
 

Returns true if path is relative path, else false.

The method returns true if the path looks like relative path (that is, it lacks the part of the path which defined the physical or network drive.

virtual FileHandleC* request_import const char *    szName,
const PluginClass::SuperClassIdC   rSuperFilter,
const PluginClass::ClassIdC   rClassFilter
[virtual]
 

Imports requested file.

Request a import for a specified file. File importer filters can be used range the number of possible importers which could match the file extension.

For example if it is known that the file must be image, SUPERCLASS_IMAGE could be passed as the rSuperFilter argument.

If a filter (class Id of super class ID) isn't used NULL_CLASSID or NULL_SUPERCLASS should be passed as argument.

Example:

            // Request import for a image.
            FileHandleC*    pHandle = m_pImpInterface->request_import( szFileName, SUPERCLASS_IMAGE, NULL_CLASSID );
            

virtual void set_parent_folder Import::FileHandleC   pFolder [virtual]
 

Used internally, sets the parent folder of hte session.

virtual void set_project_path const char *    szDir [virtual]
 

Adds search directory.

The paths in Demopaja are relative to the given project path. This method sets the project path.


Moppi Demopaja SDK Documentation -- Copyright © 2000-2002 Moppi Productions