Module: Doxyparser
- Defined in:
- lib/util.rb,
lib/doxyparser.rb,
lib/nodes/enum.rb,
lib/nodes/node.rb,
lib/nodes/type.rb,
lib/nodes/class.rb,
lib/nodes/group.rb,
lib/nodes/hfile.rb,
lib/nodes/param.rb,
lib/nodes/friend.rb,
lib/nodes/member.rb,
lib/nodes/struct.rb,
lib/nodes/typedef.rb,
lib/nodes/compound.rb,
lib/nodes/function.rb,
lib/nodes/variable.rb,
lib/nodes/namespace.rb
Defined Under Namespace
Modules: Util
Classes: Class, Compound, Enum, Friend, Function, Group, HFile, Member, Namespace, Node, Param, Struct, Type, Typedef, Variable
Class Method Summary
collapse
Class Method Details
.gen_xml_docs(src_dir, xml_dir, recursive = nil, include_dirs = nil, generate_html = nil) ⇒ Object
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/doxyparser.rb', line 48
def gen_xml_docs src_dir, xml_dir, recursive = nil, include_dirs = nil, generate_html = nil
if include_dirs.nil? || include_dirs.empty?
inc_dirs = ''
else
inc_dirs = include_dirs.join(', ')
end
recursive = recursive ? 'YES' : 'NO'
home_dir = Doxyparser::Util.home_dir
gen_html = generate_html ? 'YES' : 'NO'
proj_name = File.basename src_dir
doxyfile = "# Doxyfile 1.7.6.1\n\n"
doxyfile << "# Project related configuration options\n\n"
doxyfile << %Q{PROJECT_NAME\t\t= "#{proj_name}"\nINPUT\t\t\t\t= #{src_dir}\nGENERATE_HTML\t\t= #{gen_html}\n}
doxyfile << %Q{RECURSIVE\t\t\t= #{recursive}\nINCLUDE_PATH\t\t= #{inc_dirs}\n\n}
doxyfile << "# Default doxygen configuration options\n\n"
doxyfile << Doxyparser::Util.read_file(home_dir+'/resources/Doxyfile')
doxyfile_path = xml_dir+'/Doxyfile'
FileUtils.mkdir_p(xml_dir)
Doxyparser::Util.write_file(doxyfile_path, doxyfile)
Dir.chdir(xml_dir)
command = %Q{doxygen < #{doxyfile_path}}
output = IO.popen(command)
output.readlines
end
|
.parse_class(basename, xml_dir) ⇒ Object
36
37
38
|
# File 'lib/doxyparser.rb', line 36
def parse_class basename, xml_dir
Doxyparser::Class.new :name => basename, :dir => xml_dir
end
|
.parse_file(basename, xml_dir) ⇒ Object
44
45
46
|
# File 'lib/doxyparser.rb', line 44
def parse_file basename, xml_dir
Doxyparser::HFile.new :name => basename, :dir => xml_dir
end
|
.parse_group(basename, xml_dir) ⇒ Object
32
33
34
|
# File 'lib/doxyparser.rb', line 32
def parse_group basename, xml_dir
Doxyparser::Group.new :name => basename, :dir => xml_dir
end
|
.parse_namespace(basename, xml_dir) ⇒ Object
28
29
30
|
# File 'lib/doxyparser.rb', line 28
def parse_namespace basename, xml_dir
Doxyparser::Namespace.new :name => basename, :dir => xml_dir
end
|
.parse_struct(basename, xml_dir) ⇒ Object
40
41
42
|
# File 'lib/doxyparser.rb', line 40
def parse_struct basename, xml_dir
Doxyparser::Struct.new :name => basename, :dir => xml_dir
end
|