TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iResources Struct Referenceabstract
Inheritance diagram for iResources:
iUnknown

Detailed Description

Resources interface.

Public Member Functions

virtual tBool AddSource (const achar *aszPath)=0
 Add a source where the resources will be loaded from. More...
 
virtual tBool RemoveSource (const achar *aszPath)=0
 Remove a source. More...
 
virtual tBool SourceExists (const achar *aszPath)=0
 Check if a source has already been added. More...
 
virtual tBool ExistsEx (const achar *aszRes, const tStringCVec *apvSearchDirs, const tStringCVec *apvSearchExts)=0
 Check if a resource exists in one of the sources. More...
 
virtual tBool Exists (const achar *aszRes, const achar *aszBaseDir=NULL)=0
 Check if a resource exists in one of the sources. More...
 
virtual tBool ExistsPathEx (const achar *aszRes, const tStringCVec *apvSearchDirs, const tStringCVec *apvSearchExts, cPath *apPath)=0
 Check if a resource exists in one of the sources. More...
 
virtual tBool ExistsPath (const achar *aszRes, const achar *aszBaseDir=NULL, cPath *apPath=NULL)=0
 Check if a resource exists in one of the sources. More...
 
virtual tBool ExistsInSourceDirectory (const achar *aszFilename, cString *pstrFullPath=NULL)=0
 Check if a resource exists in a source directory. More...
 
virtual tI64 Size (const achar *aszFile)=0
 Get the size of a resource. More...
 
virtual iFileOpenEx (const achar *aszRes, const tStringCVec *apvSearchDirs, const tStringCVec *apvSearchExts)=0
 Open a resource. More...
 
virtual iFileOpen (const achar *aszRes, const achar *aszBaseDir=NULL)=0
 Open a resource. More...
 
virtual cString ResourcePathEx (const achar *aszRes, const tStringCVec *apvSearchDirs, const tStringCVec *apvSearchExts)=0
 Get the path of the given resource once opened. More...
 
virtual cString ResourcePath (const achar *aszRes, const achar *aszBaseDir=NULL)=0
 Get the path of the given resource once opened. More...
 
virtual cString ResourcePathAbsEx (const achar *aszRes, const tStringCVec *apvSearchDirs, const tStringCVec *apvSearchExts)=0
 Get the absolute path of the given resource once opened. More...
 
virtual cString ResourcePathAbs (const achar *aszRes, const achar *aszBaseDir=NULL)=0
 Get the absolute path of the given resource once opened. More...
 
virtual tSize GetNumDataFiles () const =0
 Get the number of resource data file. {Property}. More...
 
virtual iResourceFileGetDataFile (tU32 anIndex) const =0
 Get the resource data file at the specified index. {Property}. More...
 
virtual tSize GetNumDataAbsDirs () const =0
 Get the number of resource data absolute directories. {Property}. More...
 
virtual const acharGetDataAbsDir (tU32 anIndex) const =0
 Get the resource data absolute directory at the specified index. {Property}. More...
 
virtual tSize GetNumDataRelDirs () const =0
 Get the number of resource data relative directories. {Property}. More...
 
virtual const acharGetDataRelDir (tU32 anIndex) const =0
 Get the resource data relative directory at the specified index. {Property}. More...
 
virtual tBool AddSourceLast (const achar *aszPath)=0
 Add a source where the resources will be loaded from. More...
 
virtual tBool AddResourceFile (iResourceFile *apResourceFile)=0
 Add a source where the resources will be loaded from. More...
 
virtual tBool AddResourceFileLast (iResourceFile *apResourceFile)=0
 Add a source where the resources will be loaded from. More...
 
virtual iResourceFileOpenSourceFile (ni::iFile *apFile)=0
 Open a resource file without adding it as a source. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual tBool AddSource ( const achar aszPath)
pure virtual

Add a source where the resources will be loaded from.

Remarks
the last source added is the first source from where a resource will be opened if available.
virtual tBool RemoveSource ( const achar aszPath)
pure virtual

Remove a source.

virtual tBool SourceExists ( const achar aszPath)
pure virtual

Check if a source has already been added.

Returns
eTrue if the source has been already added, else eFalse.
virtual tBool ExistsEx ( const achar aszRes,
const tStringCVec apvSearchDirs,
const tStringCVec apvSearchExts 
)
pure virtual

Check if a resource exists in one of the sources.

Returns
eTrue if the resource exists in one of the sources, else eFalse.
virtual tBool Exists ( const achar aszRes,
const achar aszBaseDir = NULL 
)
pure virtual

Check if a resource exists in one of the sources.

Returns
eTrue if the resource exists in one of the sources, else eFalse.
virtual tBool ExistsPathEx ( const achar aszRes,
const tStringCVec apvSearchDirs,
const tStringCVec apvSearchExts,
cPath apPath 
)
pure virtual

Check if a resource exists in one of the sources.

Returns
eTrue if the resource exists in one of the sources, else eFalse. {NoAutomation}
virtual tBool ExistsPath ( const achar aszRes,
const achar aszBaseDir = NULL,
cPath apPath = NULL 
)
pure virtual

Check if a resource exists in one of the sources.

Returns
eTrue if the resource exists in one of the sources, else eFalse. {NoAutomation}
virtual tBool ExistsInSourceDirectory ( const achar aszFilename,
cString pstrFullPath = NULL 
)
pure virtual

Check if a resource exists in a source directory.

Returns
eTrue if it exists in one of the source directory, else eFalse. {NoAutomation}
virtual tI64 Size ( const achar aszFile)
pure virtual

Get the size of a resource.

Returns
the size of the resource found, -1 on failure.
virtual iFile* OpenEx ( const achar aszRes,
const tStringCVec apvSearchDirs,
const tStringCVec apvSearchExts 
)
pure virtual

Open a resource.

Parameters
aszResis the path of the resource to open.
apvSearchDirsis an optional list of directories where to look for the file.
apvSearchExtsis an optional list of extensions to use to look for the file (extensions that will replace the original file path's extension).
virtual iFile* Open ( const achar aszRes,
const achar aszBaseDir = NULL 
)
pure virtual

Open a resource.

Parameters
aszResis the name of the resource to open.
aszBaseDiris an optional path where the resources will be searched first. Only the directory of the path is used.
virtual cString ResourcePathEx ( const achar aszRes,
const tStringCVec apvSearchDirs,
const tStringCVec apvSearchExts 
)
pure virtual

Get the path of the given resource once opened.

virtual cString ResourcePath ( const achar aszRes,
const achar aszBaseDir = NULL 
)
pure virtual

Get the path of the given resource once opened.

virtual cString ResourcePathAbsEx ( const achar aszRes,
const tStringCVec apvSearchDirs,
const tStringCVec apvSearchExts 
)
pure virtual

Get the absolute path of the given resource once opened.

virtual cString ResourcePathAbs ( const achar aszRes,
const achar aszBaseDir = NULL 
)
pure virtual

Get the absolute path of the given resource once opened.

virtual tSize GetNumDataFiles ( ) const
pure virtual

Get the number of resource data file. {Property}.

virtual iResourceFile* GetDataFile ( tU32  anIndex) const
pure virtual

Get the resource data file at the specified index. {Property}.

virtual tSize GetNumDataAbsDirs ( ) const
pure virtual

Get the number of resource data absolute directories. {Property}.

virtual const achar* GetDataAbsDir ( tU32  anIndex) const
pure virtual

Get the resource data absolute directory at the specified index. {Property}.

virtual tSize GetNumDataRelDirs ( ) const
pure virtual

Get the number of resource data relative directories. {Property}.

Remarks
The relative directories are the directories that will be search for inside of the data files and the absolute directories.
virtual const achar* GetDataRelDir ( tU32  anIndex) const
pure virtual

Get the resource data relative directory at the specified index. {Property}.

virtual tBool AddSourceLast ( const achar aszPath)
pure virtual

Add a source where the resources will be loaded from.

Remarks
this source will be the last source from where a resource will be opened
virtual tBool AddResourceFile ( iResourceFile apResourceFile)
pure virtual

Add a source where the resources will be loaded from.

Remarks
the last source added is the first source from where a resource will be opened if available.
virtual tBool AddResourceFileLast ( iResourceFile apResourceFile)
pure virtual

Add a source where the resources will be loaded from.

Remarks
this source will be the last source from where a resource will be opened
virtual iResourceFile* OpenSourceFile ( ni::iFile apFile)
pure virtual

Open a resource file without adding it as a source.