matlab.system.mixin.FiniteSource.isDoneImpl - End-of-data flag - MATLAB (original) (raw)
Main Content
Class: matlab.system.mixin.FiniteSource
Namespace: matlab.system.mixin
Syntax
status = isDoneImpl(obj)
Description
[status](#bs4oolu-1-status) = isDoneImpl([obj](#bs4oolu-1%5Fsep%5Fmw%5F353aa417-3412-46f8-81f1-586adf7da5a8))
specifies whether the end of the data has been reached. isDoneImpl
should return true
when data from a finite source has been exhausted, typically by having read and output all data from the source. You should also define the result of future reads from an exhausted source in the isDoneImpl
method.
Run-Time Details
isDoneImpl
is called by the isDone object function.
Method Authoring Tips
You must set Access = protected
for this method.
Input Arguments
System object handle used to access properties, states, and methods specific to the object. If your isDoneImpl
method does not use the object, you can replace this input with ~
.
Output Arguments
Flag, true
or false
, that indicates if an end-of-data condition has occurred or not.
Examples
Set up the isDoneImpl
method in your class definition file so the isDone
method checks whether the object has completed eight iterations.
methods (Access = protected) function bdone = isDoneImpl(obj) bdone = obj.NumIters==8; end end