Scilab Function
eng - fr


generate_mod_num_xml - create xml documentation files of the toolbox

Library

Calling Sequence

generate_mod_num_xml(flag,lang)

Parameters

File content


//generate_mod_num_xml
//fonction qui génère les man pages de mod_num 
//format xml
//Entrée : flag : 'diagr'
//                'sce'
//                'block'
//                'sci'
//                'rout'
//                'all'
//Sortie : néant
function generate_mod_num_xml(flag,lang)

[lsh,rsh]=argn(0)
if rsh<2 then
   if ~exists('lang') then
     lang='eng'
   elseif lang<>'eng' & lang<>'fr' then
     lang='eng'
   end
end

flag_diagr=%f;
flag_sce=%f;
flag_block=%f;
flag_sci=%f;
flag_rout=%f;
flag_sim=%f;
flag_what=%f;

for i=1:size(flag,1)
 select flag(i)
  case 'diagr'
   flag_diagr=%t;
  case 'sce'
   flag_sce=%t;
  case 'block'
   flag_block=%t;
  case 'sci'
   flag_sci=%t;
  case 'rout'
   flag_rout=%t;
  case 'sim'
   flag_sim=%t;
  case 'what'
   flag_what=%t;
  case 'all'
   flag_diagr=%t;flag_sce=%t;flag_block=%t;
   flag_sci=%t;flag_rout=%t;flag_what=%t;
   flag_sim=%t;
  else
   printf("Invalid flag\n")
   abort
 end
end

if flag_diagr then
 //Scicos diagram
 generate_xml_file(diagr_all(:,2),'diagr',lang)
end

if flag_block then
 //Scicos Palette
 Palrep=return_dir_in_dir(tt_ml,pal_path)
 for j=1:size(Palrep,1)
   PalName=basename(part(Palrep(j),1:length(Palrep(j))-1));
   generate_xml_file(PalName,'pal',lang)
   lisf=return_ext_file_in_dir(tt_ml,Palrep(j),'.sci');
   for i=1:size(lisf,1)
     name=basename(lisf(i,1));
     //Scicos block
     generate_xml_file(name,'block',lang)
   end
 end
end

if flag_sci then
 //Scilab library
 Librep=return_dir_in_dir(tt_ml,mac_path)
 for j=1:size(Librep,1)
  LibName=basename(part(Librep(j),1:length(Librep(j))-1));
  generate_xml_file(LibName,'scilib',lang)
  lisf=return_ext_file_in_dir(tt_ml,Librep(j),'.sci');
  for i=1:size(lisf,1)
     name=basename(lisf(i,1));
     //Scilab function
     generate_xml_file(name,'sci',lang)
  end
 end
 //Mod_num_sci_lib
 generate_xml_file(mod_num_sci_lib,'scilib',lang);
 for i=1:size(modnum_sci_func,1)
  generate_xml_file(modnum_sci_func(i),'sci',lang)
 end
end

//low level routines
if flag_rout then
  generate_xml_file(mod_num_rout_lib,'scilib',lang);
  lisf_rout=return_ext_file_in_dir(tt_ml,low_rout_path,".c")
  for i=1:size(lisf_rout,1)
    name=basename(lisf_rout(i,1));
    generate_xml_file(name,'rout',lang)
  end
end

//scilab simulation scripts
if flag_sim then
  generate_xml_file(sim_all(:,2),'sim',lang)
end

//scilab scripts
if flag_sce then
  generate_xml_file(sce_all(:,2),'sce',lang)
end
endfunction

Authors

IRCOM Group Alan Layec