Classdef: Difference between revisions

From Octave
Jump to navigation Jump to search
mNo edit summary
(array of classdef objects)
Line 4: Line 4:


* enumeration
* enumeration
* build-in class as superclass  
* build-in class as superclass  
** <source lang="octave" enclose="none">classdef nonsense < uint32</source>
** <source lang="octave" enclose="none">classdef nonsense < uint32</source>
* array of objects. Example:
<source lang="octave">
classdef MyClass < handle
end
c = MyClass();
cc = [c, c];  % won't work
</source>
For now you can use a cell-array of objects instead:
<source lang="octave">
cc = {c, c};  % ok
</source>


==== supported ====
==== supported ====

Revision as of 05:18, 14 June 2015

This page is a stub. We should begin documenting what classdef is implemented and what is not.

not supported

  • enumeration
  • build-in class as superclass
    • classdef nonsense < uint32
  • array of objects. Example:
classdef MyClass < handle
end

c = MyClass();
cc = [c, c];   % won't work

For now you can use a cell-array of objects instead:

cc = {c, c};   % ok

supported

  • methods
    • static
    • private

Classdef examples in the wild