|
slot 0.0.1
A real time UI render framework
|
#include <slang.h>


Public 成员函数 | |
| SLANG_COM_INTERFACE (0x5fb632d2, 0x979d, 0x4481, {0x9f, 0xee, 0x66, 0x3c, 0x3f, 0x14, 0x49, 0xe1}) virtual SLANG_NO_THROW SlangResult SLANG_MCALL getFileUniqueIdentity(const char *path | |
| virtual SLANG_NO_THROW SlangResult SLANG_MCALL | calcCombinedPath (SlangPathType fromPathType, const char *fromPath, const char *path, ISlangBlob **pathOut)=0 |
| virtual SLANG_NO_THROW SlangResult SLANG_MCALL | getPathType (const char *path, SlangPathType *pathTypeOut)=0 |
| virtual SLANG_NO_THROW SlangResult SLANG_MCALL | getPath (PathKind kind, const char *path, ISlangBlob **outPath)=0 |
| virtual SLANG_NO_THROW void SLANG_MCALL | clearCache ()=0 |
| virtual SLANG_NO_THROW SlangResult SLANG_MCALL | enumeratePathContents (const char *path, FileSystemContentsCallBack callback, void *userData)=0 |
| virtual SLANG_NO_THROW OSPathKind SLANG_MCALL | getOSPathKind ()=0 |
Public 成员函数 继承自 ISlangFileSystem | |
| SLANG_COM_INTERFACE (0x003A09FC, 0x3A4D, 0x4BA0, {0xAD, 0x60, 0x1F, 0xD8, 0x63, 0xA9, 0x15, 0xAB}) virtual SLANG_NO_THROW SlangResult SLANG_MCALL loadFile(char const *path | |
Public 成员函数 继承自 ISlangUnknown | |
| virtual SLANG_NO_THROW SlangResult SLANG_MCALL | queryInterface (SlangUUID const &uuid, void **outObject)=0 |
| virtual SLANG_NO_THROW uint32_t SLANG_MCALL | addRef ()=0 |
| virtual SLANG_NO_THROW uint32_t SLANG_MCALL | release ()=0 |
| SLANG_COM_INTERFACE (0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}) virtual SLANG_NO_THROW SlangResult SLANG_MCALL queryInterface(SlangUUID const &uuid | |
| virtual SLANG_NO_THROW uint32_t SLANG_MCALL | addRef ()=0 |
| virtual SLANG_NO_THROW uint32_t SLANG_MCALL | release ()=0 |
| SlangResult | QueryInterface (struct _GUID const &uuid, void **outObject) |
| uint32_t | AddRef () |
| uint32_t | Release () |
Public 属性 | |
| ISlangBlob ** | outUniqueIdentity = 0 |
Public 属性 继承自 ISlangFileSystem | |
| ISlangBlob ** | outBlob = 0 |
Public 属性 继承自 ISlangUnknown | |
| void ** | outObject = 0 |
An extended file system abstraction.
Implementing and using this interface over ISlangFileSystem gives much more control over how paths are managed, as well as how it is determined if two files 'are the same'.
All paths as input char*, or output as ISlangBlobs are always encoded as UTF-8 strings. Blobs that contain strings are always zero terminated.
|
pure virtual |
Calculate a path combining the 'fromPath' with 'path'
The client must ensure the blob be released when no longer used, otherwise memory will leak.
| fromPathType | How to interpret the from path - as a file or a directory. |
| fromPath | The from path. |
| path | Path to be determined relative to the fromPath |
| pathOut | Holds the string which is the relative path. The string is held in the blob zero terminated. |
SlangResult to indicate success or failure in loading the file.
|
pure virtual |
Clears any cached information
|
pure virtual |
Enumerate the contents of the path
Note that for normal Slang operation it isn't necessary to enumerate contents this can return SLANG_E_NOT_IMPLEMENTED.
| The | path to enumerate |
| callback | This callback is called for each entry in the path. |
| userData | This is passed to the callback |
|
pure virtual |
Returns how paths map to the OS file system
|
pure virtual |
Get a path based on the kind.
| kind | The kind of path wanted |
| path | The input path |
| outPath | The output path held in a blob |
|
pure virtual |
Gets the type of path that path is on the file system.
| path | |
| pathTypeOut |
| ISlangFileSystemExt::SLANG_COM_INTERFACE | ( | 0x5fb632d2 | , |
| 0x979d | , | ||
| 0x4481 | , | ||
| {0x9f, 0xee, 0x66, 0x3c, 0x3f, 0x14, 0x49, 0xe1} | ) const |
Get a uniqueIdentity which uniquely identifies an object of the file system.
Given a path, returns a 'uniqueIdentity' which ideally is the same value for the same object on the file system.
The uniqueIdentity is used to compare if two paths are the same - which amongst other things allows Slang to cache source contents internally. It is also used for #pragma once functionality.
A requirement is for any implementation is that two paths can only return the same uniqueIdentity if the contents of the two files are identical. If an implementation breaks this constraint it can produce incorrect compilation. If an implementation cannot strictly identify the same files, this will only have an effect on #pragma once behavior.
The string for the uniqueIdentity is held zero terminated in the ISlangBlob of outUniqueIdentity.
Note that there are many ways a uniqueIdentity may be generated for a file. For example it could be the 'canonical path' - assuming it is available and unambiguous for a file system. Another possible mechanism could be to store the filename combined with the file date time to uniquely identify it.
The client must ensure the blob be released when no longer used, otherwise memory will leak.
NOTE! Ideally this method would be called 'getPathUniqueIdentity' but for historical reasons and backward compatibility it's name remains with 'File' even though an implementation should be made to work with directories too.
| path | |
| outUniqueIdentity |
SlangResult to indicate success or failure getting the uniqueIdentity. | ISlangBlob** ISlangFileSystemExt::outUniqueIdentity = 0 |