Skip to main content
This method is implemented in FRE for Linux and Windows.
This method is implemented on the client-side. This method determines if there are any image files in the processing queue of the source.

Syntax

C++

HRESULT IsEmpty( VARIANT_BOOL* Result );

C#

bool IsEmpty();

Visual Basic .NET

Function IsEmpty() As Boolean

Parameters

Result [out, retval] This parameter specifies if there are any image files to process. If this parameter is TRUE, there is no images to process.

Return values

[C++ only] If this method returns a value other than S_OK, it indicates that an error occurred on the client-side.

Remarks

The client implementation of this method must assure that all exceptions thrown inside the method are caught and handled and no exceptions are propagated outside the method. Propagation of an exception outside the method may lead to unpredictable results (such as program termination).

Samples

// Sample implementation of a custom image source which maintains a queue of image files
public class ImageSourceCallback : FREngine.IImageSource
{
   public ImageSourceCallback( string imageFilesDirectory )
   {
       imageFiles = ImageSourceHelper.LoadFilesNames( imageFilesDirectory );
       nextFileIndex = 0;
   }
   public bool IsEmpty()
   {
       return nextFileIndex >= imageFiles.Length;
   }
   public FREngine.IFileAdapter GetNextImageFile()
   {
       if( !IsEmpty() ) {
           return new FileAdapterCallback( imageFiles[nextFileIndex++] );
       }
       return null;
   }
   public FREngine.IImageDocument GetNextImageDocument()
   {
       ...
   }
   private string[] imageFiles;
   private int nextFileIndex;
}
public class FileAdapterCallback : FREngine.IFileAdapter
{
    ...
}
public class ImageSourceHelper
{
    ...
}

See also

IImageSource GetNextImageDocument GetNextImageFile