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

# Import::FileHandleC Class Reference

File handle class. More...

`#include <FileHandleC.h>`

Inheritance diagram for Import::FileHandleC:

List of all members.

## Public Methods

- virtual Edit::DataBlockI* create ()
- virtual Edit::DataBlockI* create ( Edit::EditableI* pOriginal )
- virtual void copy ( Edit::DataBlockI* pBlock )
- virtual void restore ( Edit::EditableI* pEditable )
- virtual ImportableI* get_importable ()
- virtual void set_importable ( ImportableI* pImportable )
- virtual PajaTypes::uint32 get_id ()
- virtual void set_id ( PajaTypes::uint32 i32ID )
- virtual void inc_reference_count ()
- virtual void reset_reference_count ()
- virtual PajaTypes::int32 get_reference_count ()
- virtual PajaTypes::uint32 save ( FileIO::SaveC* pSave )
- virtual PajaTypes::uint32 load ( FileIO::LoadC* pLoad )

## Static Public Methods

- FileHandleC* create_new ()

## Protected Methods

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

## Detailed Description

File handle class.

The data loaded into Demopaja can be accessed via ImportableI interface. This file handle class is used to hold that interface. Even if files fail to load the file handle will always be there, so the file handle works as kind of smart reference to the file.

This class is implemented by the system.

## Constructor & Destructor Documentation

FileHandleC ( | )`[protected]`

| Default constructor.

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

| Default constructor with reference to the original.

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

| Default destructor.

## Member Function Documentation

void copy ( | Edit::DataBlockI * pBlock )`[virtual]`

| Deep copy from a data block, see Edit::DataBlockI::copy(). Reimplemented from Edit::EditableI.

Edit::DataBlockI * create ( | Edit::EditableI * pOriginal )`[virtual]`

| Creates new file handle (used internally), see Edit::EditableI::create(). Reimplemented from Edit::EditableI.

Edit::DataBlockI * create ( | )`[virtual]`

| Creates new file handle. Reimplemented from Edit::EditableI.

FileHandleC * create_new ( | )`[static]`

| Creates new file handle.

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

| Get serialixation ID.

ImportableI * get_importable ( | )`[virtual]`

| Returns the importable the file handle refers to. The return value can be NULL if the file is not present (failure in load, etc.). Always check the return value.

PajaTypes::int32 get_reference_count ( | )`[virtual]`

| Returns reference count (used internally).

void inc_reference_count ( | )`[virtual]`

| Increase reference count (used internally).

virtual PajaTypes::uint32 load ( | FileIO::LoadC * pLoad )`[virtual]`

| Load editable from a Demopaja input stream. Reimplemented from Edit::EditableI.

void reset_reference_count ( | )`[virtual]`

| Reset reference count (used internally).

void restore ( | Edit::EditableI * pEditable )`[virtual]`

| Shallow copy from a editable, see Edit::EditableI::restore(). Reimplemented from Edit::EditableI.

virtual PajaTypes::uint32 save ( | FileIO::SaveC * pSave )`[virtual]`

| Save editable to a Demopaja output stream. Reimplemented from Edit::EditableI.

void set_id ( | PajaTypes::uint32 i32ID )`[virtual]`

| Set serialization ID. When the data is serialized out each file handle is given an ID which is used on to patch the file handles when the data is serialized in. The system sets this ID and it should not be changed. See also: FileIO::LoadC::add_file_handle_patch

void set_importable ( | ImportableI * pImportable )`[virtual]`

| Sets the importable the file handle refers to. Used internally.

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

- FileHandleC.h