mentity
if any.nitc :: CmdInheritanceGraph :: _graph
Inheritance graph to returnnitc :: CmdInheritanceGraph :: graph
Inheritance graph to returnnitc :: CmdInheritanceGraph :: graph=
Inheritance graph to returnnitc $ CmdInheritanceGraph :: SELF
Type of this instance, automatically specialized in every classnitc :: commands_http $ CmdInheritanceGraph :: http_init
Init the command from an HTTPRequestnitc $ CmdInheritanceGraph :: init_command
Initialize the commandnitc :: commands_parser $ CmdInheritanceGraph :: parser_init
Initialize the command from the CommandParser datanitc $ CmdInheritanceGraph :: render
Renderdot
depending on format
nitc :: CmdGraph :: _allowed_formats
Allowed rendering formats.nitc :: CmdInheritanceGraph :: _graph
Inheritance graph to returnnitc :: CmdEntity :: _mentity_name
Name of the mentity this command is aboutnitc :: CmdGraph :: allowed_formats=
Allowed rendering formats.core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.nitc :: CmdEntity :: defaultinit
nitc :: CmdGraph :: defaultinit
core :: Object :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: DocCommand :: execute
nitc :: DocCommand :: filter=
ModelFilter to apply if anynitc :: CmdInheritanceGraph :: graph
Inheritance graph to returnnitc :: CmdInheritanceGraph :: graph=
Inheritance graph to returnnitc :: DocCommand :: http_init
Init the command from an HTTPRequestcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: CmdGraph :: mainmodule=
Mainmodule for linearizationnitc :: CmdEntity :: mentity_name
Name of the mentity this command is aboutnitc :: CmdEntity :: mentity_name=
Name of the mentity this command is aboutcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: DocCommand :: parser_init
Initialize the command from the CommandParser datanitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
# Render a hierarchy graph for `mentity` if any.
class CmdInheritanceGraph
super CmdEntity
super CmdGraph
autoinit(model, mainmodule, filter, mentity, mentity_name, pdepth, cdepth, format, graph)
# Parents depth to display
var pdepth: nullable Int = null is optional, writable
# Children depth to display
var cdepth: nullable Int = null is optional, writable
# Inheritance graph to return
var graph: nullable InheritanceGraph = null is optional, writable
redef fun init_command do
if graph != null then return new CmdSuccess
var res = super
if not res isa CmdSuccess then return res
var mentity = self.mentity.as(not null)
graph = new InheritanceGraph(mentity, model, mainmodule, filter)
return res
end
redef fun render do
var graph = self.graph
if graph == null then return ""
self.dot = graph.draw(pdepth, cdepth).to_dot
return super
end
end
src/doc/commands/commands_graph.nit:140,1--173,3
redef class CmdInheritanceGraph
redef fun parser_init(mentity_name, options) do
var opt_pdepth = options.opt_int("pdepth")
if opt_pdepth != null then pdepth = opt_pdepth
var opt_cdepth = options.opt_int("cdepth")
if opt_cdepth != null then cdepth = opt_cdepth
return super
end
end
src/doc/commands/commands_parser.nit:371,1--379,3
redef class CmdInheritanceGraph
redef fun http_init(req) do
var opt_pdepth = req.int_arg("pdepth")
if opt_pdepth != null then pdepth = opt_pdepth
var opt_cdepth = req.int_arg("cdepth")
if opt_cdepth != null then cdepth = opt_cdepth
return super
end
end
src/doc/commands/commands_http.nit:198,1--206,3