template_class_base.m 910 B

12345678910111213141516171819202122232425262728293031
  1. % {{clss.name | upper}}
  2. % Matlab handle class for OpenCV object classes
  3. %
  4. % This file was autogenerated, do not modify.
  5. % See LICENSE for full modification and redistribution details.
  6. % Copyright {{time.strftime("%Y", time.localtime())}} The OpenCV Foundation
  7. classdef {{clss.name}} < handle
  8. properties (SetAccess = private, Hidden = true)
  9. ptr_ = 0; % handle to the underlying c++ clss instance
  10. end
  11. methods
  12. % constructor
  13. function this = {{clss.name}}(varargin)
  14. this.ptr_ = {{clss.name}}Bridge('new', varargin{:});
  15. end
  16. % destructor
  17. function delete(this)
  18. {{clss.name}}Bridge(this.ptr_, 'delete');
  19. end
  20. {% for function in clss.functions %}
  21. % {{function.__str__()}}
  22. function varargout = {{function.name}}(this, varargin)
  23. [varargout{1:nargout}] = {{clss.name}}Bridge('{{function.name}}', this.ptr_, varargin{:});
  24. end
  25. {% endfor %}
  26. end
  27. end