Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Attributes
OODebug::DebugUtils Class Reference

Public Member Functions

 DebugUtils (DebugConnector *connector)
 
double doubleFromValue (Value v)
 
QHash< QString, OOModel::VariableDeclaration * > findVariableDetailsIn (OOModel::StatementItemList *statementList, QStringList variableNames, int indexFrom)
 Tries to find information about the variables with names variableNames in the statementList. More...
 
QString fullNameFor (OOModel::Class *theClass, QChar delimiter)
 Returns a String with all containing module names split by delimiter in front of the theClass name. More...
 
bool hasPrimitiveValueType (OOModel::VariableDeclaration *variableDeclaration)
 
QString jvmSignatureFor (OOModel::Class *theClass)
 
Model::NodelocationToNode (Location location, bool &isClosingBracket)
 
Location nodeToLocation (Model::Node *node)
 
void setExportMap (std::shared_ptr< Export::TextToNodeMap > map)
 
Protocol::Tag typeExpressionToTag (OOModel::Expression *e)
 
Protocol::Tag typeOfVariable (OOModel::Method *containingMethod, VariableDetails variable)
 
OOModel::VariableDeclarationvariableDeclarationFromStatement (OOModel::StatementItem *statement, QString variableName="")
 

Private Attributes

DebugConnectordebugConnector_ {}
 
std::shared_ptr< Export::TextToNodeMapexportMap_
 

Constructor & Destructor Documentation

◆ DebugUtils()

OODebug::DebugUtils::DebugUtils ( DebugConnector connector)

Member Function Documentation

◆ doubleFromValue()

double OODebug::DebugUtils::doubleFromValue ( Value  v)

◆ findVariableDetailsIn()

QHash< QString, OOModel::VariableDeclaration * > OODebug::DebugUtils::findVariableDetailsIn ( OOModel::StatementItemList statementList,
QStringList  variableNames,
int  indexFrom 
)

Tries to find information about the variables with names variableNames in the statementList.

If a variable is not found in the statementList its parent list is searched until we have no more parent list then we try to find the name in the arguments of the containing Method. The indexFrom is the starting position from where we search, not that we search in the negative direction (upwards).

The results are returned in a map variable name -> details.

◆ fullNameFor()

QString OODebug::DebugUtils::fullNameFor ( OOModel::Class theClass,
QChar  delimiter 
)

Returns a String with all containing module names split by delimiter in front of the theClass name.

◆ hasPrimitiveValueType()

bool OODebug::DebugUtils::hasPrimitiveValueType ( OOModel::VariableDeclaration variableDeclaration)

◆ jvmSignatureFor()

QString OODebug::DebugUtils::jvmSignatureFor ( OOModel::Class theClass)

◆ locationToNode()

Model::Node * OODebug::DebugUtils::locationToNode ( Location  location,
bool &  isClosingBracket 
)

◆ nodeToLocation()

Location OODebug::DebugUtils::nodeToLocation ( Model::Node node)

◆ setExportMap()

void OODebug::DebugUtils::setExportMap ( std::shared_ptr< Export::TextToNodeMap map)

◆ typeExpressionToTag()

Protocol::Tag OODebug::DebugUtils::typeExpressionToTag ( OOModel::Expression e)

◆ typeOfVariable()

Protocol::Tag OODebug::DebugUtils::typeOfVariable ( OOModel::Method containingMethod,
VariableDetails  variable 
)

◆ variableDeclarationFromStatement()

OOModel::VariableDeclaration * OODebug::DebugUtils::variableDeclarationFromStatement ( OOModel::StatementItem statement,
QString  variableName = "" 
)

Member Data Documentation

◆ debugConnector_

DebugConnector* OODebug::DebugUtils::debugConnector_ {}
private

◆ exportMap_

std::shared_ptr<Export::TextToNodeMap> OODebug::DebugUtils::exportMap_
private