MetricFunction
/**
* @brief A metric function.
*/
Inherit from Function
Primary key: element_oid: int
schema MetricFunction extends Function {
@primary element_oid: int,
type: string,
element_index: int,
parent_oid: int,
location_oid: int,
printable_text: string
}
MetricFunction::getSize
/**
* @brief gets the size information for the element.
* @return NumberOfLines
*/
- Parameter
self
:MetricFunction
- Return
NumberOfLines
pub fn getSize(self: MetricFunction) -> NumberOfLines;
MetricFunction::getEnclosingScope
/**
* @brief gets the immediately enclosing scope (module, function or class) whose body contains this statement.
* @return Scope
*/
- Parameter
self
:MetricFunction
- Return
Scope
pub fn getEnclosingScope(self: MetricFunction) -> Scope;
MetricFunction::getParent
/**
* @brief gets the parent element of the statement
* @return CombineElement
*/
- Parameter
self
:MetricFunction
- Return
CombineElement
pub fn getParent(self: MetricFunction) -> CombineElement;
MetricFunction::getElementIndex
/**
* @brief gets the element index of this element.
* @return int
*/
- Parameter
self
:MetricFunction
- Return
int
pub fn getElementIndex(self: MetricFunction) -> int;
MetricFunction::getParentOid
/**
* @brief gets the parent oid of this element.
* @return int
*/
- Parameter
self
:MetricFunction
- Return
int
pub fn getParentOid(self: MetricFunction) -> int;
MetricFunction::getName
/**
* @brief gets the name of the function.
* @return string
*/
- Parameter
self
:MetricFunction
- Return
string
pub fn getName(self: MetricFunction) -> string;
MetricFunction::getType
/**
* @brief gets the type of this element.
* @return string
*/
- Parameter
self
:MetricFunction
- Return
string
pub fn getType(self: MetricFunction) -> string;
MetricFunction::getCyclomaticComplexity
/**
* @brief The cyclomatic complexity of a callable is defined as the number
* of branching statements (`if`, `while`, `do`, `for`, `matchcase`, `except`)
* plus the number of branching expressions (`?`, `&&` and `||`)
* plus one.
* @return int
*/
- Parameter
self
:MetricFunction
- Return
int
pub fn getCyclomaticComplexity(self: MetricFunction) -> int;
MetricFunction::getQualifiedName
/**
* @brief gets the qualified name of the function.
* @return string
*/
- Parameter
self
:MetricFunction
- Return
string
pub fn getQualifiedName(self: MetricFunction) -> string;
MetricFunction::getAnAncestor
/**
* @brief gets an ancestor of the element.
* @return CombineElement
*/
- Parameter
self
:MetricFunction
- Return
*CombineElement
pub fn getAnAncestor(self: MetricFunction) -> *CombineElement;
MetricFunction::getArgumentByIndex
/**
* @brief gets the arg by index of the function.
* @return Arg
*/
- Parameter
self
:MetricFunction
- Parameter
i
:int
- Return
Arg
pub fn getArgumentByIndex(self: MetricFunction, i: int) -> Arg;
MetricFunction::getEnclosingStatement
/**
* @brief gets the statement containing this statement.
* @return Statement
*/
- Parameter
self
:MetricFunction
- Return
Statement
pub fn getEnclosingStatement(self: MetricFunction) -> Statement;
MetricFunction::getLocationOid
/**
* @brief gets the location oid of this element.
* @return int
*/
- Parameter
self
:MetricFunction
- Return
int
pub fn getLocationOid(self: MetricFunction) -> int;
MetricFunction::getAChild
/**
* @brief gets a child of this statement.
* @return Statement
*/
- Parameter
self
:MetricFunction
- Return
*Statement
pub fn getAChild(self: MetricFunction) -> *Statement;
MetricFunction::getArguments
/**
* @brief gets the arguments of the function.
* @return Arguments
*/
- Parameter
self
:MetricFunction
- Return
Arguments
pub fn getArguments(self: MetricFunction) -> Arguments;
MetricFunction::getLocation
/**
* @brief gets the location for the element.
* @return Location
*/
- Parameter
self
:MetricFunction
- Return
Location
pub fn getLocation(self: MetricFunction) -> Location;
MetricFunction::__all__
Data constraint method.
- Parameter
db
:PythonDB
- Return
*MetricFunction
pub fn __all__(db: PythonDB) -> *MetricFunction;
MetricFunction::getPrintableText
/**
* @brief gets the printable text of this element.
* @return string
*/
- Parameter
self
:MetricFunction
- Return
string
pub fn getPrintableText(self: MetricFunction) -> string;