Hello! There is one fairly large project on MATLAB, which is desirable to translate into C #
The project is written by classes, the sample code below, the code itself is made similar to a sharpe.
I perfectly understand that it will be necessary to arrange types, to do some interfaces, that I can hardly find automated utilities, and that it will be necessary to nip it with my hands, but the volume is frightening - several thousand (xs, 3-4 thousand) lines of code.
Are there at least some syntax converters so as not to change all these functions .... end, if ... end, for ... end to classical syntax with curly braces? Sample code. All code in this OOP style: class-methods is inheritance, there are events
classdef ENode<handle properties nodes_range connected_elements={}; is_repacked=false end methods function copy_object=Clone(this) constructor=str2func(class(this)); copy_object=constructor(this.nodes_range); %!!! У КОПИИ is_repacked=false!!! end function this=ENode(nodes_range) if nargin==1 this.nodes_range=nodes_range; end end function RefreshNodeRange(this,deleted_range) if ~isempty(deleted_range) has_selfnode_deleted=false; new_range=this.nodes_range; for i=1:length(deleted_range) for j=1:length(this.nodes_range) if deleted_range(i)<this.nodes_range(j) new_range(j)=new_range(j)-1; elseif deleted_range(i)==this.nodes_range(j) new_range(j)=0; has_selfnode_deleted=true; end end end if has_selfnode_deleted k=1; while 1 if new_range(k)==0 new_range=[]; else k=k+1; end if k>length(this.nodes_range) break end end end this.nodes_range=new_range; end end end end
function...end, etc. - user227049