Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
InternalTest Class Reference

#include <InternalTest.h>

Inheritance diagram for InternalTest:
[legend]
Collaboration diagram for InternalTest:
[legend]

Data Structures

struct  ContextualMenu
 contextual menu More...
class  Movement
 view position More...
class  ViewPosition
 view position More...

Public Member Functions

const std::map< std::string, int > & getAttributesEnum () const
 get map with attributesEnum jump steps
const std::map< std::string, InternalTest::ContextualMenu > & getContextualMenuOperations () const
 get map with contextual menu operation jump steps
const InternalTest::ViewPositiongetLastMovedPosition () const
 get last moved position
const std::map< std::string, InternalTest::Movement > & getMovements () const
 get map with movement pairs
FXint getTime () const
 get currentTime
const std::map< std::string, InternalTest::ViewPosition > & getViewPositions () const
 get map with view position pairs
 InternalTest (const std::string &testFile)
 constructor
std::vector< InternalTest::ViewPositioninterpolateViewPositions (const InternalTest::ViewPosition &viewStartPosition, const int offsetStartX, const int offsetStartY, const InternalTest::ViewPosition &viewEndPosition, const int offsetEndX, const int offsetEndY) const
 interpolate view positions
bool isRunning () const
 check if test is running
void stopTests ()
 stop tests
void updateLastMovedPosition (const int x, const int y)
 update last moved position
 ~InternalTest ()
 destructor
functions related with test steps
void addTestSteps (InternalTestStep *internalTestStep)
 add test steps
InternalTestStepgetCurrentStep () const
 get current step
InternalTestStepsetNextStep ()
 get current step and set next step

Protected Member Functions

std::vector< std::string > cleanLines (const std::vector< std::pair< bool, std::string > > &linesRaw) const
 clear lines
std::map< std::string, int > parseAttributesEnumFile (const std::string filePath) const
 parse attributesEnum file
std::map< std::string, InternalTest::ContextualMenuparseContextualMenuOperationsFile (const std::string filePath) const
 parse attributesEnum file
std::map< std::string, InternalTest::MovementparseMovementsFile (const std::string filePath) const
 parse movements file
std::map< std::string, InternalTest::ViewPositionparseViewPositionsFile (const std::string filePath) const
 parse viewPositions file
bool startWith (const std::string &str, const std::string &prefix) const
 check if the given string start with

Protected Attributes

std::map< std::string, int > myAttributesEnum
 vector with attributesEnum jump steps
std::map< std::string, InternalTest::ContextualMenumyContextualMenuOperations
 vector with contextual menu operation jump steps
InternalTestStepmyCurrentTestStep = nullptr
 current test step
InternalTestStepmyInitialTestStep = nullptr
 initial test steps
InternalTest::ViewPosition myLastMovedPosition
 last moved position
InternalTestStepmyLastTestStep = nullptr
 last test steps
std::map< std::string, InternalTest::MovementmyMovements
 vector with movements
bool myRunning = false
 flag to indicate if test is running
bool myTestFinished = false
 flag to check if test was finished
std::map< std::string, InternalTest::ViewPositionmyViewPositions
 vector with view positions

Private Member Functions

 InternalTest ()=delete
 invalidate default constructor
 InternalTest (const InternalTest &)=delete
 Invalidated copy constructor.
InternalTestoperator= (const InternalTest &src)=delete
 Invalidated assignment operator.

Detailed Description

Definition at line 39 of file InternalTest.h.

Constructor & Destructor Documentation

◆ InternalTest() [1/3]

InternalTest::InternalTest ( const std::string & testFile)

constructor

Definition at line 145 of file InternalTest.cpp.

References cleanLines(), myAttributesEnum, myContextualMenuOperations, myMovements, myViewPositions, parseAttributesEnumFile(), parseContextualMenuOperationsFile(), parseMovementsFile(), parseViewPositionsFile(), and startWith().

Referenced by GNEInternalTest::GNEInternalTest(), InternalTest(), and operator=().

Here is the caller graph for this function:

◆ ~InternalTest()

InternalTest::~InternalTest ( )

destructor

Definition at line 188 of file InternalTest.cpp.

References myInitialTestStep.

◆ InternalTest() [2/3]

InternalTest::InternalTest ( )
privatedelete

invalidate default constructor

◆ InternalTest() [3/3]

InternalTest::InternalTest ( const InternalTest & )
privatedelete

Invalidated copy constructor.

References InternalTest().

Member Function Documentation

◆ addTestSteps()

void InternalTest::addTestSteps ( InternalTestStep * internalTestStep)

add test steps

Definition at line 202 of file InternalTest.cpp.

References myCurrentTestStep, myInitialTestStep, and myLastTestStep.

Referenced by InternalTestStep::InternalTestStep(), InternalTestStep::InternalTestStep(), InternalTestStep::InternalTestStep(), and InternalTestStep::InternalTestStep().

Here is the caller graph for this function:

◆ cleanLines()

std::vector< std::string > InternalTest::cleanLines ( const std::vector< std::pair< bool, std::string > > & linesRaw) const
protected

clear lines

Definition at line 471 of file InternalTest.cpp.

Referenced by InternalTest().

Here is the caller graph for this function:

◆ getAttributesEnum()

const std::map< std::string, int > & InternalTest::getAttributesEnum ( ) const

get map with attributesEnum jump steps

Definition at line 252 of file InternalTest.cpp.

References myAttributesEnum.

◆ getContextualMenuOperations()

const std::map< std::string, InternalTest::ContextualMenu > & InternalTest::getContextualMenuOperations ( ) const

get map with contextual menu operation jump steps

Definition at line 258 of file InternalTest.cpp.

References myContextualMenuOperations.

◆ getCurrentStep()

InternalTestStep * InternalTest::getCurrentStep ( ) const

get current step

Definition at line 217 of file InternalTest.cpp.

References myCurrentTestStep.

Referenced by GNEInternalTest::runNeteditInternalTests().

Here is the caller graph for this function:

◆ getLastMovedPosition()

const InternalTest::ViewPosition & InternalTest::getLastMovedPosition ( ) const

get last moved position

Definition at line 276 of file InternalTest.cpp.

References myLastMovedPosition.

◆ getMovements()

const std::map< std::string, InternalTest::Movement > & InternalTest::getMovements ( ) const

get map with movement pairs

Definition at line 270 of file InternalTest.cpp.

References myMovements.

◆ getTime()

FXint InternalTest::getTime ( ) const

get currentTime

Definition at line 243 of file InternalTest.cpp.

◆ getViewPositions()

const std::map< std::string, InternalTest::ViewPosition > & InternalTest::getViewPositions ( ) const

get map with view position pairs

Definition at line 264 of file InternalTest.cpp.

References myViewPositions.

◆ interpolateViewPositions()

std::vector< InternalTest::ViewPosition > InternalTest::interpolateViewPositions ( const InternalTest::ViewPosition & viewStartPosition,
const int offsetStartX,
const int offsetStartY,
const InternalTest::ViewPosition & viewEndPosition,
const int offsetEndX,
const int offsetEndY ) const

interpolate view positions

Definition at line 288 of file InternalTest.cpp.

References InternalTest::ViewPosition::getX(), InternalTest::ViewPosition::getY(), and numPointsInterpolation.

◆ isRunning()

bool InternalTest::isRunning ( ) const

check if test is running

Definition at line 231 of file InternalTest.cpp.

References myRunning.

Referenced by GNEDeleteFrame::SubordinatedElements::checkElements().

Here is the caller graph for this function:

◆ operator=()

InternalTest & InternalTest::operator= ( const InternalTest & src)
privatedelete

Invalidated assignment operator.

References InternalTest().

◆ parseAttributesEnumFile()

std::map< std::string, int > InternalTest::parseAttributesEnumFile ( const std::string filePath) const
protected

parse attributesEnum file

Definition at line 312 of file InternalTest.cpp.

References invalid_return< std::string >::value, StringUtils::isInt(), TL, StringUtils::toInt(), and WRITE_ERRORF.

Referenced by InternalTest().

Here is the caller graph for this function:

◆ parseContextualMenuOperationsFile()

std::map< std::string, InternalTest::ContextualMenu > InternalTest::parseContextualMenuOperationsFile ( const std::string filePath) const
protected

parse attributesEnum file

Definition at line 343 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest().

Here is the caller graph for this function:

◆ parseMovementsFile()

std::map< std::string, InternalTest::Movement > InternalTest::parseMovementsFile ( const std::string filePath) const
protected

parse movements file

Definition at line 428 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest().

Here is the caller graph for this function:

◆ parseViewPositionsFile()

std::map< std::string, InternalTest::ViewPosition > InternalTest::parseViewPositionsFile ( const std::string filePath) const
protected

parse viewPositions file

Definition at line 393 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest().

Here is the caller graph for this function:

◆ setNextStep()

InternalTestStep * InternalTest::setNextStep ( )

get current step and set next step

Definition at line 223 of file InternalTest.cpp.

References myCurrentTestStep.

Referenced by GNEInternalTest::runNeteditInternalTests().

Here is the caller graph for this function:

◆ startWith()

bool InternalTest::startWith ( const std::string & str,
const std::string & prefix ) const
protected

check if the given string start with

Definition at line 485 of file InternalTest.cpp.

Referenced by InternalTest().

Here is the caller graph for this function:

◆ stopTests()

void InternalTest::stopTests ( )

stop tests

Definition at line 237 of file InternalTest.cpp.

References myRunning.

◆ updateLastMovedPosition()

void InternalTest::updateLastMovedPosition ( const int x,
const int y )

update last moved position

Definition at line 282 of file InternalTest.cpp.

References myLastMovedPosition.

Field Documentation

◆ myAttributesEnum

std::map<std::string, int> InternalTest::myAttributesEnum
protected

vector with attributesEnum jump steps

Definition at line 208 of file InternalTest.h.

Referenced by getAttributesEnum(), and InternalTest().

◆ myContextualMenuOperations

std::map<std::string, InternalTest::ContextualMenu> InternalTest::myContextualMenuOperations
protected

vector with contextual menu operation jump steps

Definition at line 211 of file InternalTest.h.

Referenced by getContextualMenuOperations(), and InternalTest().

◆ myCurrentTestStep

InternalTestStep* InternalTest::myCurrentTestStep = nullptr
protected

current test step

Definition at line 199 of file InternalTest.h.

Referenced by addTestSteps(), getCurrentStep(), and setNextStep().

◆ myInitialTestStep

InternalTestStep* InternalTest::myInitialTestStep = nullptr
protected

initial test steps

Definition at line 193 of file InternalTest.h.

Referenced by addTestSteps(), and ~InternalTest().

◆ myLastMovedPosition

InternalTest::ViewPosition InternalTest::myLastMovedPosition
protected

last moved position

Definition at line 220 of file InternalTest.h.

Referenced by getLastMovedPosition(), and updateLastMovedPosition().

◆ myLastTestStep

InternalTestStep* InternalTest::myLastTestStep = nullptr
protected

last test steps

Definition at line 196 of file InternalTest.h.

Referenced by addTestSteps().

◆ myMovements

std::map<std::string, InternalTest::Movement> InternalTest::myMovements
protected

vector with movements

Definition at line 217 of file InternalTest.h.

Referenced by getMovements(), and InternalTest().

◆ myRunning

bool InternalTest::myRunning = false
protected

flag to indicate if test is running

Definition at line 202 of file InternalTest.h.

Referenced by isRunning(), GNEInternalTest::runNeteditInternalTests(), and stopTests().

◆ myTestFinished

bool InternalTest::myTestFinished = false
protected

flag to check if test was finished

Definition at line 205 of file InternalTest.h.

Referenced by GNEInternalTest::runNeteditInternalTests().

◆ myViewPositions

std::map<std::string, InternalTest::ViewPosition> InternalTest::myViewPositions
protected

vector with view positions

Definition at line 214 of file InternalTest.h.

Referenced by getViewPositions(), and InternalTest().


The documentation for this class was generated from the following files: