DcsBuffer

Description

A class that deals with data in Dcsbuffer.

Members

Type Name Description
Method (void) appendImage: (DcsImage *) image Appends images to DcsBuffer.
Method (void) appendDocument: (DcsDocument *) document Appends documents to DcsBuffer.
Method (id) get: (NSInteger) index Gets the image or document at the specified index of the buffer.
Method (void) replaceWithImage: (DcsImage *) image
index: (NSInteger) index
Replaces the data at specified index of buffer with the specified DcsImage.
Method (void) replaceWithDocument: (DcsDocument *) document
index: (NSInteger) index
Replaces the data at specified index of buffer with the specified DcsDocument.
Method (void) swap: (NSInteger) firstIndex
second: (NSInteger) secondIndex
Switches the places for 2 images or documents.
Method (void) delete: (NSInteger) index Deletes the image or document with the specified index.
Method (void) save: (NSString *) dirName Saves all the images and documents in DcsBuffer to a folder named dirName.
Method (void) load: (NSString *) dirName Loads all the images and documents in the folder named to dirNameDcsBuffer.
Method (NSInteger) count() Returns the total number of all the images and documents.
Property (NSInteger) currentIndex Returns or sets the index of current operated data in DcsBuffer.
Method (void) insertImage: (DcsImage *) image
index: (NSInteger) index
Inserts an image into DcsBuffer at the index.
Method (void) insertDocument: (DcsDocument *) document
index: (NSInteger) index
Inserts a document into DcsBuffer at the index.
(nonatomic, assign) NSInteger currentIndex
Description Returns or sets the index of currently 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 negative value, or a value that equals/is larger than count, it will fail and throw an exception called DcsValueOutOfRangeException.