API  4.2
For MATLAB, Python, Java, and C++ users
OpenSim::FileDeletionThrower Class Reference

This class helps a user cause an exception within the code. More...

Public Member Functions

 FileDeletionThrower ()
 
 FileDeletionThrower (std::string filepath)
 
 ~FileDeletionThrower ()
 
void throwIfDeleted () const
 

Detailed Description

This class helps a user cause an exception within the code.

The constructor writes a file, and the destructor deletes the file. The programmer can call throwIfDeleted() to throw the FileDeletionThrowerException exception if the file is deleted (by a user) before the object is destructed. If the file could not be written by the constructor, then throwIfDeleted() does not throw an exception.

Constructor & Destructor Documentation

◆ FileDeletionThrower() [1/2]

OpenSim::FileDeletionThrower::FileDeletionThrower ( )
inline

◆ FileDeletionThrower() [2/2]

OpenSim::FileDeletionThrower::FileDeletionThrower ( std::string  filepath)
inline

◆ ~FileDeletionThrower()

OpenSim::FileDeletionThrower::~FileDeletionThrower ( )
inline

Member Function Documentation

◆ throwIfDeleted()

void OpenSim::FileDeletionThrower::throwIfDeleted ( ) const
inline

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