class Doxyparser::Member
Attributes
args[R]
definition[R]
location[R]
params[R]
static[R]
type[R]
Public Instance Methods
file()
click to toggle source
@return [HFile] header file where the declaration of this member was done
# File lib/nodes/member.rb, line 13 def file Doxyparser::HFile.new(:name => @filename, :dir => @dir) end
Private Instance Methods
find_name()
click to toggle source
# File lib/nodes/member.rb, line 56 def find_name @parent.name + '::' + @node.xpath("name")[0].child.content end
find_type(n)
click to toggle source
# File lib/nodes/member.rb, line 60 def find_type(n) type = n.xpath("type") return Doxyparser::Type.new(name: '', dir: @dir) if type.nil? || type.empty? || type[0].child == nil Doxyparser::Type.new(node: type[0], dir: @dir) end
init_attributes()
click to toggle source
Calls superclass method
# File lib/nodes/member.rb, line 19 def init_attributes super raise "No XML node was associated to this member" if @node.nil? @xml_path = parent.xml_path if @node['static'] && @node['static'] == 'yes' @static = 'static' else @static = nil end aux = self.xpath("location")[0] @filename = File.basename(aux["file"]) @location = "#{aux["file"]}:#{aux["line"]}" temp = self.xpath("definition") if temp == nil || temp.empty? || temp[0].child==nil @definition = "" else @definition = temp[0].child.content end temp = self.xpath("argsstring") if temp == nil || temp.empty? || temp[0].child==nil @args = "" else @args = temp[0].child.content end @type = find_type(@node) @params = [] all_params = self.xpath("param") return if all_params == nil || all_params.empty? || all_params[0].child==nil all_params.each { |param| @params << Doxyparser::Param.new(node: param, parent: self, name: 'param') } end