Callable

/**
* @brief A callable element, either a method or a function. Model only for Godel, not exist in clang
*/

Primary key: id: int

schema Callable {
  @primary id: int
}

Callable::getCyclomaticComplexity

/**
* Gets the cyclomatic complexity of this function. This is defined as the
* number of branching statements (`if`, `while`, `do`, `for`, and
* non-fallthrough `case`) plus the number of branching expressions (`?`,
* `&&`, and `||`) plus one.
* @return int
*/
pub fn getCyclomaticComplexity(self: Callable) -> int;

Callable::getName

/**
* @brief gets the name of the callable
* @return string 
*/
  • Parameter self: Callable
  • Return string
pub fn getName(self: Callable) -> string;

Callable::getBelongedClass

/**
* @brief gets the Class declaration which this callable belongs to.
* @return Type
*/
pub fn getBelongedClass(self: Callable) -> Class;

Callable::getCallee

/**
* @brief gets the callee callable object of current callable
* @return Callable
*/
pub fn getCallee(self: Callable) -> *Callable;

Callable::getLocation

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

Callable::__all__

Data constraint method.

pub fn __all__(db: CfamilyDB) -> *Callable;

Callable::getPrintableText

/**
* @brief gets the printable text for printing AST
* @return string
*/
  • Parameter self: Callable
  • Return string
pub fn getPrintableText(self: Callable) -> string;

Callable::getAnAncestorCaller

/**
* @brief gets an ancestor caller of the callable, if any
* @return Callable 
*/
pub fn getAnAncestorCaller(self: Callable) -> *Callable;

Callable::getCaller

/**
* @brief gets the caller callable object of current callable
* @return Callable
*/
pub fn getCaller(self: Callable) -> *Callable;

Callable::getReturnType

/**
* @brief gets the return type.
* @return Type
*/
pub fn getReturnType(self: Callable) -> Type;

Callable::getAnAncestorCallee

/**
* @brief gets an ancestor callee of the callable, if any
* @return Callable 
*/
pub fn getAnAncestorCallee(self: Callable) -> *Callable;

Callable::getReferClassByParamVarAndReturnVar

/**
* @brief gets the referred class by the param variable and return variable of the callable 
* @return Class 
*/
pub fn getReferClassByParamVarAndReturnVar(self: Callable) -> *Class;