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

# Import::ImportableI Class Reference

Importable file interface. More...

`#include <ImportableI.h>`

Inheritance diagram for Import::ImportableI:

List of all members.

## Public Methods

- virtual const char* get_filename () = 0
- virtual bool load_file ( const char* szName, ImportInterfaceC* pInterface ) = 0
- virtual PajaTypes::uint32 get_reference_file_count ()
- virtual FileHandleC* get_reference_file ( PajaTypes::uint32 ui32Index )
- virtual PluginClass::SuperClassIdC get_super_class_id () = 0
- virtual PluginClass::ClassIdC get_class_id () = 0
- virtual const char* get_class_name () = 0
- virtual const char* get_info () = 0
- virtual PajaTypes::int32 get_duration ( PajaSystem::TimeContextC* pTimeContext ) = 0
- virtual PajaTypes::float32 get_start_label ( PajaSystem::TimeContextC* pTimeContext ) = 0
- virtual PajaTypes::float32 get_end_label ( PajaSystem::TimeContextC* pTimeContext ) = 0
- virtual PluginClass::ClassIdC get_default_effect () = 0

## Protected Methods

- ImportableI ()
- ImportableI ( Edit::EditableI* pOriginal )
- virtual ~ImportableI ()

## Detailed Description

Importable file interface.

Importable files are key elements in the Demopaja system. Importers imports and holds the external data in the system, and effects are used to display it. This allows data sharing between the effects. All the importers are derived from this base class.

Note: Classes derived from ImportableI which loads the data from a file does not have to implement the copy() method. It can be simple left empty. This may change in future, if importables can create the data be procedurally.

## Constructor & Destructor Documentation

ImportableI ( | )`[protected]`

| Default constructor.

ImportableI ( | Edit::EditableI * pOriginal )`[protected]`

| Constructor with reference to the original.

~ImportableI ( | )`[protected, virtual]`

| Default destructor.

## Member Function Documentation

PluginClass::ClassIdC get_class_id ( | )`[pure virtual]`

| Returns unique class ID of the importer.

const char * get_class_name ( | )`[pure virtual]`

| Returns importer's class name as NULL terminated string.

PluginClass::ClassIdC get_default_effect ( | )`[pure virtual]`

| Returns the default effect class ID this importable creates if dropped to a File List (or to the Layout View).

PajaTypes::int32 get_duration ( | PajaSystem::TimeContextC * pTimeContext )`[pure virtual]`

| Returns duration of the file in given time context. If the duration cannot be determined (for example the data is a still image) negative value should be returned. Example:
                int32
                MASImportC::get_duration( TimeContextC* pTimeContext )
                {
                    int32   i32Length = m_i32LastFrame - m_i32FirstFrame;
                    // Convert the FPS timecode to Demopaja timecode.
                    return pTimeContext->convert_fps_to_time( i32Length, m_i32FPS );
                }

PajaTypes::float32 get_end_label ( | PajaSystem::TimeContextC * pTimeContext )`[pure virtual]`

| Returns end label (a numerical value). The value does not have to be related to the returned duration. The start label is shown in the duration bar in the timegraph. The Demopaja system will find nice values for the labels between the start and end label returned from the importable. Example:
                float32
                MASImportC::get_end_label( TimeContextC* pTimeContext )
                {
                    return m_i32LastFrame;
                }

const char * get_filename ( | )`[pure virtual]`

| Returns the name of the file this importable refers to.

const char * get_info ( | )`[pure virtual]`

| Return short info about the file. The information can be for example width and height and bit depth, etc. This information is displayed in the File Inspector window.

FileHandleC * get_reference_file ( | PajaTypes::uint32 ui32Index )`[virtual]`

| Returns file reference at speficied index. The default implementation returns zero.

PajaTypes::uint32 get_reference_file_count ( | )`[virtual]`

| Returns the number of referenced files. If the importable has references to other files (such as textures in 3D meshes) this method returns number of file references. File loading is implemented in the ImportInterfaceC which is passed to the load_file() method. The default implementation returns zero.

PajaTypes::float32 get_start_label ( | PajaSystem::TimeContextC * pTimeContext )`[pure virtual]`

| Returns start label (a numerical value). The value does not have to be related to the returned duration. The start label is shown in the duration bar in the timegraph. The Demopaja system will find nice values for the labels between the start and end label returned from the importable. Example:
                float32
                MASImportC::get_start_label( TimeContextC* pTimeContext )
                {
                    return m_i32FirstFrame;
                }

PluginClass::SuperClassIdC get_super_class_id ( | )`[pure virtual]`

| Returns super class ID of the importer. Reimplemented in Import::ImportableImageI.

bool load_file ( | const char * szName,
| ImportInterfaceC * pInterface )`[pure virtual]`

| Loads the file specified in by the argument.

The documentation for this class was generated from the following file:

- ImportableI.h