Nerve Gear data source interface.
More...
#include <NERvGear/interface/IDataSource.h>
Nerve Gear data source interface.
Define ID:
|
virtual long __stdcall | GetId (UID *id)=0 |
| Retrieves the UID of this data source object. More...
|
|
virtual size_t __stdcall | GetName (size_t len, wchar_t *name)=0 |
| Retrieves the display name for this data source. More...
|
|
virtual size_t __stdcall | GetDescrip (size_t len, wchar_t *descrip)=0 |
| Retrieves the description for this data source. More...
|
|
virtual unsigned __stdcall | GetDataCount ()=0 |
| Retrieves the number of data providing by this data source.
|
|
virtual long __stdcall | GetData (unsigned index, IData **data)=0 |
| Retrieves a data represented by index. More...
|
|
virtual long __stdcall | FindData (const UID &id, IData **data)=0 |
| Retrieves a data indicated by UID. More...
|
|
virtual long __stdcall | QueryInterface (const UID &interfaceID, void **ppvObject)=0 |
|
virtual unsigned long __stdcall | AddRef ()=0 |
|
virtual unsigned long __stdcall | Release ()=0 |
|
virtual long __stdcall NERvGear::IDataSource::FindData |
( |
const UID & |
id, |
|
|
IData ** |
data |
|
) |
| |
|
pure virtual |
Retrieves a data indicated by UID.
- Parameters
-
[in] | id | A UID reference associating with a data. |
[out] | data | A pointer to a buffer receiving the IData pointer. |
- See also
- IData::GetId()
virtual long __stdcall NERvGear::IDataSource::GetData |
( |
unsigned |
index, |
|
|
IData ** |
data |
|
) |
| |
|
pure virtual |
Retrieves a data represented by index.
- Parameters
-
[in] | index | A zero based number identifying a data locally. |
[out] | data | A pointer to a buffer receiving the IData pointer. |
- Return values
-
S_OK | Success. |
E_INVALIDARG | Fail. The index is invalid or the data parameter is NULL. |
E_FAIL | Failed with unknown error. |
virtual size_t __stdcall NERvGear::IDataSource::GetDescrip |
( |
size_t |
len, |
|
|
wchar_t * |
descrip |
|
) |
| |
|
pure virtual |
Retrieves the description for this data source.
virtual long __stdcall NERvGear::IDataSource::GetId |
( |
UID * |
id | ) |
|
|
pure virtual |
Retrieves the UID of this data source object.
- Parameters
-
[out] | id | Pointer to a UID, must not be NULL. |
- Return values
-
S_OK | Success. |
E_INVALIDARG | Fail. The id is NULL. |
E_FAIL | Failed with unknown error. |
- Note
- The returned ID must be the same as the object ID specified in the object declaration.
virtual size_t __stdcall NERvGear::IDataSource::GetName |
( |
size_t |
len, |
|
|
wchar_t * |
name |
|
) |
| |
|
pure virtual |
Retrieves the display name for this data source.
- Parameters
-
[in] | len | The size of the name buffer, in characters. If name is NULL, this parameter must be 0. |
[out] | name | A pointer to a buffer that receives the null terminated string for the display name, could be NULL. |
- Returns
- Returns the size copied into the name buffer, in characters.
If name is not NULL, the return value is the length of the string that is copied to the buffer, in characters, not including the terminating null character.
If name buffer is too small to hold the name, the string is truncated to len characters including the terminating null character, and the return value is len.
If name is NULL and len is 0, the return value is the length of the string buffer required, in characters, including the terminating null character.
If the function fails, the return value is 0.
- See also
- NERvCopyString()