CrystalSpace

Public API Reference

iLoaderContext Struct Reference
[Loading & Saving support]

This interface gives the context for the loader. More...

#include <imap/ldrctxt.h>

Inheritance diagram for iLoaderContext:

List of all members.

Public Member Functions

virtual void AddToCollection (iObject *obj)=0
 Adds the object to the stored collection.
virtual bool CheckDupes () const =0
 Return true if we check for dupes (to avoid objects with same name being loaded again.
virtual bool CurrentCollectionOnly () const =0
 Return true if we only want to look for objects in the region given by GetRegion().
virtual iLightFindLight (const char *name)=0
 Find a light.
virtual iMaterialWrapperFindMaterial (const char *filename, bool doLoad=true)=0
 Find a material.
virtual iMeshFactoryWrapperFindMeshFactory (const char *name, bool notify=true)=0
 Find a mesh factory.
virtual iMeshWrapperFindMeshObject (const char *name)=0
 Find a mesh object.
virtual iMaterialWrapperFindNamedMaterial (const char *name, const char *filename)=0
 Same as FindMaterial but there is no assumption that the name and the filename are the same.
virtual iTextureWrapperFindNamedTexture (const char *name, const char *filename)=0
 Find a texture with the given name.
virtual iSectorFindSector (const char *name)=0
 Find a sector.
virtual iShaderFindShader (const char *name)=0
 Find a shader.
virtual iTextureWrapperFindTexture (const char *filename, bool doLoad=true)=0
 Find a texture.
virtual iCollectionGetCollection () const =0
 Return a collection if we only want to load in that collection.
virtual uint GetKeepFlags () const =0
 Returns the flags to tell us what we want to keep.
virtual bool GetVerbose ()=0
 Get the message verbosity.

Detailed Description

This interface gives the context for the loader.

It basically gives loading plugins a way to find materials, meshes, and sectors. In all these cases region-qualified names can be used (i.e. 'regionname/objectname') or normal object names.

WARNING! When a context is created it should not be modified afterwards. Some loader plugins will keep a reference to the context when they support delayed loading. In that case they still need the original contents in the context. So a loader that creates a context should create a new one every time.

Definition at line 54 of file ldrctxt.h.


Member Function Documentation

virtual void iLoaderContext::AddToCollection ( iObject obj  )  [pure virtual]

Adds the object to the stored collection.

virtual bool iLoaderContext::CheckDupes (  )  const [pure virtual]

Return true if we check for dupes (to avoid objects with same name being loaded again.

virtual bool iLoaderContext::CurrentCollectionOnly (  )  const [pure virtual]

Return true if we only want to look for objects in the region given by GetRegion().

virtual iLight* iLoaderContext::FindLight ( const char *  name  )  [pure virtual]

Find a light.

virtual iMaterialWrapper* iLoaderContext::FindMaterial ( const char *  filename,
bool  doLoad = true 
) [pure virtual]

Find a material.

If not found, try to use the filename supplied to find a matching texture. If that isn't found, try to load the texture using the filename. If loaded then it is also Prepared.

virtual iMeshFactoryWrapper* iLoaderContext::FindMeshFactory ( const char *  name,
bool  notify = true 
) [pure virtual]

Find a mesh factory.

virtual iMeshWrapper* iLoaderContext::FindMeshObject ( const char *  name  )  [pure virtual]

Find a mesh object.

virtual iMaterialWrapper* iLoaderContext::FindNamedMaterial ( const char *  name,
const char *  filename 
) [pure virtual]

Same as FindMaterial but there is no assumption that the name and the filename are the same.

This is useful if the filename has /'s in it (a pathname), since region searching will mean that names with /'s will never be found correctly.

virtual iTextureWrapper* iLoaderContext::FindNamedTexture ( const char *  name,
const char *  filename 
) [pure virtual]

Find a texture with the given name.

If not found, attempt to load the supplied filename and prepare the texture using the supplied name.

virtual iSector* iLoaderContext::FindSector ( const char *  name  )  [pure virtual]

Find a sector.

virtual iShader* iLoaderContext::FindShader ( const char *  name  )  [pure virtual]

Find a shader.

Remarks:
Implementations should treat shader names starting with a '*' in a special way: These are "built-in" shaders and should be searched globally even if only the current collection is supposed to be looked up.
virtual iTextureWrapper* iLoaderContext::FindTexture ( const char *  filename,
bool  doLoad = true 
) [pure virtual]

Find a texture.

If not found, attempt to load and prepare the texture using the supplied filename as the name.

virtual iCollection* iLoaderContext::GetCollection (  )  const [pure virtual]

Return a collection if we only want to load in that collection.

0 otherwise. If not 0 then all objects will be created in the collection.

virtual uint iLoaderContext::GetKeepFlags (  )  const [pure virtual]

Returns the flags to tell us what we want to keep.

virtual bool iLoaderContext::GetVerbose (  )  [pure virtual]

Get the message verbosity.


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

Generated for Crystal Space 2.0 by doxygen 1.6.1