Class: Doxyparser::HFile

Inherits:
Compound show all
Defined in:
lib/nodes/hfile.rb

Instance Attribute Summary

Attributes inherited from Compound

#xml_path

Attributes inherited from Node

#basename, #dir, #doc, #name, #node, #parent

Instance Method Summary collapse

Methods inherited from Compound

#new_unnamed

Methods inherited from Node

#==, #eql?, #initialize, #to_s, #to_str

Methods included from Util

#del_prefix, #del_spaces, #do_filter, #escape_class_name, #escape_file_name, home_dir, #match, read_file, write_file

Constructor Details

This class inherits a constructor from Doxyparser::Node

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Doxyparser::Node

Instance Method Details

#classesObject



31
32
33
34
35
# File 'lib/nodes/hfile.rb', line 31

def classes
	lst=doc.xpath(%Q{/doxygen/compounddef/innerclass})
	lst = lst.select { |c| c["refid"].start_with?("class") }
	lst.map { |node| Doxyparser::Class.new(dir: @dir, node: node) }
end

#enumsObject



52
53
54
55
# File 'lib/nodes/hfile.rb', line 52

def enums
	lst=doc.xpath(%Q{/doxygen/compounddef/sectiondef[@kind="enum"]/memberdef[@kind="enum"]})
	lst.map { |node| Doxyparser::Enum.new(parent: self, node: node) }
end

#files_includedObject



15
16
17
18
# File 'lib/nodes/hfile.rb', line 15

def files_included
	lst=doc.xpath(%Q{/doxygen/compounddef/includes[@local="yes"]})
	lst.map { |f| Doxyparser::HFile.new(dir: @dir, node: f) }
end

#files_includingObject



20
21
22
23
# File 'lib/nodes/hfile.rb', line 20

def files_including
	lst=doc.xpath(%Q{/doxygen/compounddef/includedby[@local="yes"]})
	lst.map { |f| Doxyparser::HFile.new(dir: @dir, node: f) }
end

#functionsObject



42
43
44
45
# File 'lib/nodes/hfile.rb', line 42

def functions
	lst=doc.xpath(%Q{/doxygen/compounddef/sectiondef[@kind="func"]/memberdef[@kind="function"]})
	lst.map { |node| Doxyparser::Function.new(parent: self, node: node) }
end

#list_includedObject



5
6
7
8
# File 'lib/nodes/hfile.rb', line 5

def list_included
	lst=doc.xpath(%Q{/doxygen/compounddef/includes})
	lst.map { |f| f.child.content }
end

#list_includingObject



10
11
12
13
# File 'lib/nodes/hfile.rb', line 10

def list_including
	lst=doc.xpath(%Q{/doxygen/compounddef/includedby})
	lst.map { |f| f[:refid].nil? ? f.child.content : escape_file_name(f[:refid]) }
end

#namespacesObject



37
38
39
40
# File 'lib/nodes/hfile.rb', line 37

def namespaces
	lst=doc.xpath(%Q{/doxygen/compounddef/innernamespace})
	lst.map { |node| Doxyparser::Namespace.new(dir: @dir, node: node) }
end

#structsObject



25
26
27
28
29
# File 'lib/nodes/hfile.rb', line 25

def structs
	lst=doc.xpath(%Q{/doxygen/compounddef/innerclass})
	lst = lst.select { |c| c["refid"].start_with?("struct") }
	lst.map { |node| Doxyparser::Struct.new(dir: @dir, node: node) }
end

#typedefsObject



57
58
59
60
# File 'lib/nodes/hfile.rb', line 57

def typedefs
	lst=doc.xpath(%Q{/doxygen/compounddef/sectiondef[@kind="typedef"]/memberdef[@kind="typedef"]})
	lst.map { |node| Doxyparser::Typedef.new(parent: self, node: node) }
end

#variablesObject



47
48
49
50
# File 'lib/nodes/hfile.rb', line 47

def variables
	lst=doc.xpath(%Q{/doxygen/compounddef/sectiondef[@kind="var"]/memberdef[@kind="variable"]})
	lst.map { |node| Doxyparser::Variable.new(parent: self, node: node) }
end