Gazebo Common

API Reference

5.5.1
TestPaths Class Referenceabstract

Helper interface to generate path information to support test access to source/data files. More...

#include <TestPaths.hh>

Public Member Functions

GZ_COMMON_TESTING_VISIBLE TestPaths (const std::string &_projectSourcePath=kTestingProjectSourceDir)
 Constructor.
 
virtual GZ_COMMON_TESTING_VISIBLE ~TestPaths ()=0
 Destructor.
 
virtual bool GZ_COMMON_TESTING_VISIBLE ProjectSourcePath (std::string &_sourceDir)=0
 
virtual bool GZ_COMMON_TESTING_VISIBLE TestTmpPath (std::string &_tmpDir)=0
 Populate the path to a temporary directory.
 

Protected Attributes

std::string projectSourcePath
 Path to the root of the project source.
 

Detailed Description

Helper interface to generate path information to support test access to source/data files.

It is intended that there is an implementation of this interface for each relevant buildsystem.

Constructor & Destructor Documentation

◆ TestPaths()

GZ_COMMON_TESTING_VISIBLE TestPaths ( const std::string & _projectSourcePath = kTestingProjectSourceDir)
explicit

Constructor.

Parameters
[in]_projectSourcePathPath to the root of the project source

◆ ~TestPaths()

virtual GZ_COMMON_TESTING_VISIBLE ~TestPaths ( )
pure virtual

Destructor.

Member Function Documentation

◆ ProjectSourcePath()

virtual bool GZ_COMMON_TESTING_VISIBLE ProjectSourcePath ( std::string & _sourceDir)
pure virtual

brief Populate the path to the root project source directory

Parameters
[out]_sourceDirpath to the root project source directory
Returns
True if path successfully found and set, false otherwise

Implemented in BazelTestPaths, and CMakeTestPaths.

◆ TestTmpPath()

virtual bool GZ_COMMON_TESTING_VISIBLE TestTmpPath ( std::string & _tmpDir)
pure virtual

Populate the path to a temporary directory.

Parameters
[out]_tmpDirpath to the root temporary directory
Returns
True if path successfully found and set, false otherwise

Implemented in BazelTestPaths, and CMakeTestPaths.

Member Data Documentation

◆ projectSourcePath

std::string projectSourcePath
protected

Path to the root of the project source.


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