Render a hierarchy graph for mentity if any.

Introduced properties

private var _cdepth: nullable Int

nitc :: CmdInheritanceGraph :: _cdepth

Children depth to display
private var _graph: nullable InheritanceGraph

nitc :: CmdInheritanceGraph :: _graph

Inheritance graph to return
private var _pdepth: nullable Int

nitc :: CmdInheritanceGraph :: _pdepth

Parents depth to display
fun cdepth: nullable Int

nitc :: CmdInheritanceGraph :: cdepth

Children depth to display
fun cdepth=(cdepth: nullable Int)

nitc :: CmdInheritanceGraph :: cdepth=

Children depth to display
init defaultinit(model: Model, mainmodule: MModule, filter: nullable ModelFilter, mentity: nullable MEntity, mentity_name: nullable String, pdepth: nullable Int, cdepth: nullable Int, format: nullable String, graph: nullable InheritanceGraph)

nitc :: CmdInheritanceGraph :: defaultinit

fun graph: nullable InheritanceGraph

nitc :: CmdInheritanceGraph :: graph

Inheritance graph to return
fun graph=(graph: nullable InheritanceGraph)

nitc :: CmdInheritanceGraph :: graph=

Inheritance graph to return
fun pdepth: nullable Int

nitc :: CmdInheritanceGraph :: pdepth

Parents depth to display
fun pdepth=(pdepth: nullable Int)

nitc :: CmdInheritanceGraph :: pdepth=

Parents depth to display

Redefined properties

redef type SELF: CmdInheritanceGraph

nitc $ CmdInheritanceGraph :: SELF

Type of this instance, automatically specialized in every class
redef fun http_init(req: HttpRequest): CmdMessage

nitc :: commands_http $ CmdInheritanceGraph :: http_init

Init the command from an HTTPRequest
redef fun init_command: CmdMessage

nitc $ CmdInheritanceGraph :: init_command

Initialize the command
redef fun parser_init(mentity_name: String, options: CmdOptions): CmdMessage

nitc :: commands_parser $ CmdInheritanceGraph :: parser_init

Initialize the command from the CommandParser data
redef fun render: nullable Writable

nitc $ CmdInheritanceGraph :: render

Render dot depending on format

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _allowed_formats: Array[String]

nitc :: CmdGraph :: _allowed_formats

Allowed rendering formats.
private var _cdepth: nullable Int

nitc :: CmdInheritanceGraph :: _cdepth

Children depth to display
private var _dot: nullable Writable

nitc :: CmdGraph :: _dot

Dot to render
private var _filter: nullable ModelFilter

nitc :: DocCommand :: _filter

ModelFilter to apply if any
private var _format: String

nitc :: CmdGraph :: _format

Rendering format
private var _graph: nullable InheritanceGraph

nitc :: CmdInheritanceGraph :: _graph

Inheritance graph to return
private var _mainmodule: MModule

nitc :: CmdGraph :: _mainmodule

Mainmodule for linearization
private var _mentity: nullable MEntity

nitc :: CmdEntity :: _mentity

MEntity this command is about
private var _mentity_name: nullable String

nitc :: CmdEntity :: _mentity_name

Name of the mentity this command is about
private var _model: Model

nitc :: DocCommand :: _model

Model to retrieve data for
private var _pdepth: nullable Int

nitc :: CmdInheritanceGraph :: _pdepth

Parents depth to display
fun allowed_formats: Array[String]

nitc :: CmdGraph :: allowed_formats

Allowed rendering formats.
protected fun allowed_formats=(allowed_formats: Array[String])

nitc :: CmdGraph :: allowed_formats=

Allowed rendering formats.
fun cdepth: nullable Int

nitc :: CmdInheritanceGraph :: cdepth

Children depth to display
fun cdepth=(cdepth: nullable Int)

nitc :: CmdInheritanceGraph :: cdepth=

Children depth to display
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun cmd_filter: ModelFilter

nitc :: DocCommand :: cmd_filter

Return a new filter for that command execution.
init defaultinit(model: Model, filter: nullable ModelFilter, mentity: nullable MEntity, mentity_name: nullable String)

nitc :: CmdEntity :: defaultinit

init defaultinit(model: Model, filter: nullable ModelFilter, mainmodule: MModule, format: nullable String, dot: nullable Writable)

nitc :: CmdGraph :: defaultinit

init defaultinit(model: Model, mainmodule: MModule, filter: nullable ModelFilter, mentity: nullable MEntity, mentity_name: nullable String, pdepth: nullable Int, cdepth: nullable Int, format: nullable String, graph: nullable InheritanceGraph)

nitc :: CmdInheritanceGraph :: defaultinit

init defaultinit(model: Model, filter: nullable ModelFilter)

nitc :: DocCommand :: defaultinit

fun dot: nullable Writable

nitc :: CmdGraph :: dot

Dot to render
fun dot=(dot: nullable Writable)

nitc :: CmdGraph :: dot=

Dot to render
abstract fun execute(no_color: nullable Bool)

nitc :: DocCommand :: execute

fun filter: nullable ModelFilter

nitc :: DocCommand :: filter

ModelFilter to apply if any
protected fun filter=(filter: nullable ModelFilter)

nitc :: DocCommand :: filter=

ModelFilter to apply if any
fun format: String

nitc :: CmdGraph :: format

Rendering format
fun format=(format: nullable String)

nitc :: CmdGraph :: format=

Rendering format
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun graph: nullable InheritanceGraph

nitc :: CmdInheritanceGraph :: graph

Inheritance graph to return
fun graph=(graph: nullable InheritanceGraph)

nitc :: CmdInheritanceGraph :: graph=

Inheritance graph to return
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun http_init(req: HttpRequest): CmdMessage

nitc :: DocCommand :: http_init

Init the command from an HTTPRequest
init init

core :: Object :: init

fun init_command: CmdMessage

nitc :: DocCommand :: init_command

Initialize the command
fun init_mentity: CmdMessage

nitc :: CmdEntity :: init_mentity

Initialize the command mentity.
fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun mainmodule: MModule

nitc :: CmdGraph :: mainmodule

Mainmodule for linearization
protected fun mainmodule=(mainmodule: MModule)

nitc :: CmdGraph :: mainmodule=

Mainmodule for linearization
fun mentity: nullable MEntity

nitc :: CmdEntity :: mentity

MEntity this command is about
fun mentity=(mentity: nullable MEntity)

nitc :: CmdEntity :: mentity=

MEntity this command is about
fun mentity_name: nullable String

nitc :: CmdEntity :: mentity_name

Name of the mentity this command is about
fun mentity_name=(mentity_name: nullable String)

nitc :: CmdEntity :: mentity_name=

Name of the mentity this command is about
fun model: Model

nitc :: DocCommand :: model

Model to retrieve data for
protected fun model=(model: Model)

nitc :: DocCommand :: model=

Model to retrieve data for
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun parser_init(arg: String, options: CmdOptions): CmdMessage

nitc :: DocCommand :: parser_init

Initialize the command from the CommandParser data
fun pdepth: nullable Int

nitc :: CmdInheritanceGraph :: pdepth

Parents depth to display
fun pdepth=(pdepth: nullable Int)

nitc :: CmdInheritanceGraph :: pdepth=

Parents depth to display
fun render: nullable Writable

nitc :: CmdGraph :: render

Render dot depending on format
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun to_html: Writable

nitc :: DocCommand :: to_html

Render results as a HTML string
abstract fun to_json: nullable Serializable

nitc :: DocCommand :: to_json

Return a JSON Serializable representation of self results
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_md: Writable

nitc :: DocCommand :: to_md

Render results as a Markdown string
fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram nitc::CmdInheritanceGraph CmdInheritanceGraph nitc::CmdEntity CmdEntity nitc::CmdInheritanceGraph->nitc::CmdEntity nitc::CmdGraph CmdGraph nitc::CmdInheritanceGraph->nitc::CmdGraph nitc::DocCommand DocCommand nitc::CmdEntity->nitc::DocCommand nitc::CmdGraph->nitc::DocCommand ...nitc::DocCommand ... ...nitc::DocCommand->nitc::DocCommand

Ancestors

abstract class DocCommand

nitc :: DocCommand

Documentation command
interface Object

core :: Object

The root of the class hierarchy.

Parents

class CmdEntity

nitc :: CmdEntity

A command about a MEntity
abstract class CmdGraph

nitc :: CmdGraph

An abstract command that returns a dot graph

Class definitions

nitc $ CmdInheritanceGraph
# 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

nitc :: commands_parser $ CmdInheritanceGraph
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

nitc :: commands_http $ CmdInheritanceGraph
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