DcsBuffer

Description

A class that deals with data in Dcsbuffer.

Members

Type Name Description
function func appendImage(image:DcsImage) -> Void Appends images to DcsBuffer.
function func appendDocument(document:DcsDocument) -> Void Appends documents to DcsBuffer.
function func get(index: Int) -> Any Gets the image or document at the specified index of the buffer.
function func replaceWithImage(image:DcsImage , index:Int) -> Void Replaces the data at specified index of buffer with the specified DcsImage.
function func replaceWithDocument(document:DcsDocument ,index:Int) -> Void Replaces the data at specified index of buffer with the specified DcsDocument.
function func switch(firstIndex:Int, secondIndex:Int) -> Void Switches the places for 2 images or documents.
function func delete(index: Int) -> Void Deletes the images or documents in the specified index.
function func save(dirName:String) -> Void Saves all the images and documents in DcsBuffer to a folder named dirName.
function func load(dirName:String) -> Void Loads all the images and documents in the folder named to dirNameDcsBuffer.
function func count() ->Int Returns the total number of all the images and documents.
property var currentIndex:Int Returns or set the index of current operated data in DcsBuffer.
function func insertImage (image: DcsImage, index: Int) ->Int Inserts image into DcsBuffer at the index.
function func insertDocument (image: DcsDocument, index: Int) ->Int Inserts document into DcsBuffer at the index.
var currentIndex:Int
Description Returns or set the index of current operated data in DcsBuffer.
Remarks If Dcsbuffer is empty, currentIndex is -1, you can also set currentIndex to -1.
If DcsBuffer is not empty, when you set currentIndex to a value =count, it will fail and throw an exception called DcsValueOutOfRangeException.