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
*/
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 
*/
pub fn getEnclosingScope(self: MetricFunction) -> Scope;

MetricFunction::getParent

/**
* @brief gets the parent element of the statement
* @return CombineElement 
*/
pub fn getParent(self: MetricFunction) -> CombineElement;

MetricFunction::getElementIndex

/**
* @brief gets the element index of this element.
* @return int
*/
pub fn getElementIndex(self: MetricFunction) -> int;

MetricFunction::getParentOid

/**
* @brief gets the parent oid of this element.
* @return int
*/
pub fn getParentOid(self: MetricFunction) -> int;

MetricFunction::getName

/**
* @brief gets the name of the function.
* @return string 
*/
pub fn getName(self: MetricFunction) -> string;

MetricFunction::getType

/**
* @brief gets the type of this element.
* @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 
*/
pub fn getCyclomaticComplexity(self: MetricFunction) -> int;

MetricFunction::getQualifiedName

/**
* @brief gets the qualified name of the function.
* @return string 
*/
pub fn getQualifiedName(self: MetricFunction) -> string;

MetricFunction::getAnAncestor

/**
* @brief gets an ancestor of the element.
* @return CombineElement 
*/
pub fn getAnAncestor(self: MetricFunction) -> *CombineElement;

MetricFunction::getArgumentByIndex

/**
* @brief gets the arg by index of the function.
* @return Arg 
*/
pub fn getArgumentByIndex(self: MetricFunction, i: int) -> Arg;

MetricFunction::getEnclosingStatement

/**
* @brief gets the statement containing this statement.
* @return Statement 
*/
pub fn getEnclosingStatement(self: MetricFunction) -> Statement;

MetricFunction::getLocationOid

/**
* @brief gets the location oid of this element.
* @return int
*/
pub fn getLocationOid(self: MetricFunction) -> int;

MetricFunction::getAChild

/**
* @brief gets a child of this statement.
* @return Statement 
*/
pub fn getAChild(self: MetricFunction) -> *Statement;

MetricFunction::getArguments

/**
* @brief gets the arguments of the function.
* @return Arguments 
*/
pub fn getArguments(self: MetricFunction) -> Arguments;

MetricFunction::getLocation

/**
* @brief gets the location for the element.
* @return Location
*/
pub fn getLocation(self: MetricFunction) -> Location;

MetricFunction::__all__

Data constraint method.

pub fn __all__(db: PythonDB) -> *MetricFunction;

MetricFunction::getPrintableText

/**
* @brief gets the printable text of this element.
* @return string
*/
pub fn getPrintableText(self: MetricFunction) -> string;