RamDiskInterface Class Reference

#include <ramdisk.h>

详细描述

A RamDisk provides a complete in-memory file system. It supports a Clone method to efficiently duplicate a whole file system.

公共成员函数

MAXON_METHOD Result < Url GetRoot ()
MAXON_METHOD Result < RamDiskRef >  Clone () const

静态公共成员函数

static MAXON_METHOD Result < RamDiskInterface * >  Alloc ( MAXON_SOURCE_LOCATION_DECLARATION )

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( RamDiskInterface , MAXON_REFERENCE_NORMAL , "net.maxon.misc.interface.ramdisk")

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( RamDiskInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.misc.interface.ramdisk"   
)
private

◆  Alloc()

static MAXON_METHOD Result < RamDiskInterface *> Alloc ( MAXON_SOURCE_LOCATION_DECLARATION   )
static

Creates a new empty RAM disk. The RAM disk will use a unique identifier for its root. As long as the RAM disk is alive, it can be found with a Url 采用 ramdisk scheme and the unique identifier as authority.

参数
[in] allocLocation Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file.
返回
New RAM disk.

◆  GetRoot()

MAXON_METHOD Result < Url > GetRoot ( )

Returns the Url of the root directory of this RAM disk. The Url has the ramdisk scheme and uses the unique identifier of the RAM disk as authority. Also the returned Url contains a strong reference on this RAM disk, so it suffices to keep the Url alive to keep this RAM disk alive. Likewise all Urls which are derived from the returned Url will contain a strong reference.

返回
The Url of this RAM disk's root directory.

◆  Clone()

MAXON_METHOD Result <RamDiskRef> Clone ( ) const

Returns a clone of this RAM disk. This is a cheap operation because as much as possible is shared between the original and the clone.

返回
Clone of this RAM disk.