gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
OS.h File Reference
#include <string>
#include <stdio.h>
Include dependency graph for OS.h:

Go to the source code of this file.

Functions

FILE * Fopen (const char *f, const char *mode)
 
std::string GetEnvironmentVar (const std::string &var)
 
void SetEnvironmentVar (const std::string &var, const std::string &val)
 
void SleepInSeconds (double s)
 
void CheckResources ()
 
double Cpu ()
 
double TotalRam ()
 
double TimeOfDay ()
 
long GetMemoryUsage ()
 
int GetProcessId ()
 
std::string GetExecutableFileName ()
 
std::string GetAbsolutePath (const std::string &fileName)
 
std::string GetHostName ()
 
int UnlinkFile (const std::string &fileName)
 
int StatFile (const std::string &fileName)
 
int KillProcess (int pid)
 
int CreateSingleDir (const std::string &dirName)
 
void CreatePath (const std::string &fullPath)
 
int SystemCall (const std::string &command, bool blocking=false)
 
int SystemCallExe (const std::string &exe, const std::string &argsOrCommand, bool blocking=false)
 
void RedirectIOToConsole ()
 
void UnzipFile (const std::string &fileName, const std::string &prependDir="")
 

Function Documentation

◆ CheckResources()

void CheckResources ( )

Definition at line 347 of file OS.cpp.

Referenced by GmshInitialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cpu()

◆ CreatePath()

void CreatePath ( const std::string &  fullPath)

Definition at line 513 of file OS.cpp.

Referenced by GMSH_BoundaryAnglesPlugin::execute(), and UnzipFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSingleDir()

int CreateSingleDir ( const std::string &  dirName)

Definition at line 502 of file OS.cpp.

Referenced by CreatePath(), and VTKData::initVTKFile().

Here is the caller graph for this function:

◆ Fopen()

FILE* Fopen ( const char *  f,
const char *  mode 
)

Definition at line 273 of file OS.cpp.

Referenced by _printTris(), GModel::_readMSH2(), GModel::_readMSH3(), GModel::_readMSH4(), GModel::_writeMSH2(), GModel::_writeMSH3(), GModel::_writeMSH4(), GModel::_writePartitionedMSH2(), GModel::checkMeshCoherence(), ConvertFileToString(), CreateOutputFile(), GMSH_BubblesPlugin::execute(), GMSH_NearToFarFieldPlugin::execute(), elasticitySolver::exportKb(), smooth_data::exportview(), Msg::InitializeOnelab(), DocRecord::makePosView(), MergeFile(), MergePostProcessingFile(), modifyInitialMeshForBoundaryLayers(), outputScalarField(), ParseFile(), ParseString(), backgroundMesh::print(), print_pgf(), DocRecord::printMedialAxis(), PrintMesh2dStatistics(), printNodes(), PrintOptions(), PrintOptionsDoc(), GModel::readACTRAN(), GModel::readBDF(), GModel::readDIFF(), GModel::readGEOM(), elasticitySolver::readInputFile(), GModel::readMESH(), PView::readMSH(), GModel::readMSH(), GModel::readOFF(), GModel::readP3D(), GModel::readPLY(), GModel::readPLY2(), PView::readPOS(), GModel::readSAMCEF(), GModel::readSTL(), GModel::readVRML(), GModel::readVTK(), scriptAddCommand(), scriptRemoveLastCommand(), Msg::SetLogFile(), trueBoundary(), GModel::writeBDF(), GModel::writeCELUM(), GModel::writeDIFF(), GModel::writeGEO(), GModel::writeINP(), GModel::writeIR3(), GModel::writeKEY(), GModel::writeMAIL(), GModel::writeMATLAB(), GModel::writeMESH(), PViewDataList::writeMSH(), PViewDataGModel::writeMSH(), GModel::writeNEU(), GModel::writeOFF(), GModel::writeP3D(), GModel::writePartitionedTopology(), GModel::writePLY2(), PViewDataList::writePOS(), PViewData::writePOS(), GModel::writePOS(), GModel::writePY(), GModel::writeRAD(), PViewData::writeSTL(), GModel::writeSTL(), GModel::writeSU2(), GModel::writeTOCHNOG(), PViewData::writeTXT(), GModel::writeUNV(), GModel::writeVRML(), GModel::writeVTK(), PView::writeX3D(), and GModel::writeX3D().

Here is the call graph for this function:

◆ GetAbsolutePath()

std::string GetAbsolutePath ( const std::string &  fileName)

Definition at line 454 of file OS.cpp.

Referenced by GMSH_BoundaryAnglesPlugin::execute(), and GModel::setFileName().

Here is the caller graph for this function:

◆ GetEnvironmentVar()

std::string GetEnvironmentVar ( const std::string &  var)

Definition at line 284 of file OS.cpp.

Referenced by addGmshPathToEnvironmentVar(), and CTX::init().

Here is the caller graph for this function:

◆ GetExecutableFileName()

std::string GetExecutableFileName ( )

Definition at line 423 of file OS.cpp.

Referenced by Msg::Initialize().

Here is the caller graph for this function:

◆ GetHostName()

std::string GetHostName ( )

Definition at line 472 of file OS.cpp.

◆ GetMemoryUsage()

long GetMemoryUsage ( )

Definition at line 406 of file OS.cpp.

Referenced by Msg::PrintResources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetProcessId()

int GetProcessId ( )

Definition at line 414 of file OS.cpp.

Referenced by GetOtherOption().

Here is the caller graph for this function:

◆ KillProcess()

int KillProcess ( int  pid)

Definition at line 525 of file OS.cpp.

◆ RedirectIOToConsole()

void RedirectIOToConsole ( )

Definition at line 642 of file OS.cpp.

Referenced by GmshInitialize().

Here is the caller graph for this function:

◆ SetEnvironmentVar()

void SetEnvironmentVar ( const std::string &  var,
const std::string &  val 
)

Definition at line 305 of file OS.cpp.

Referenced by addGmshPathToEnvironmentVar().

Here is the caller graph for this function:

◆ SleepInSeconds()

void SleepInSeconds ( double  s)

Definition at line 315 of file OS.cpp.

Referenced by CreateOutputFile().

Here is the caller graph for this function:

◆ StatFile()

int StatFile ( const std::string &  fileName)

Definition at line 489 of file OS.cpp.

Referenced by drawContext::generateTextureForImage(), MergeFile(), scriptAddCommand(), scriptRemoveLastCommand(), and SystemCallExe().

Here is the caller graph for this function:

◆ SystemCall()

int SystemCall ( const std::string &  command,
bool  blocking = false 
)

Definition at line 637 of file OS.cpp.

Referenced by DoSystemUncompress(), and Msg::LoadOnelabClient().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SystemCallExe()

int SystemCallExe ( const std::string &  exe,
const std::string &  argsOrCommand,
bool  blocking = false 
)

Definition at line 539 of file OS.cpp.

Referenced by SystemCall().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TimeOfDay()

◆ TotalRam()

double TotalRam ( )

Definition at line 374 of file OS.cpp.

Referenced by VertexArray::VertexArray().

Here is the caller graph for this function:

◆ UnlinkFile()

int UnlinkFile ( const std::string &  fileName)

Definition at line 479 of file OS.cpp.

Referenced by CreateOutputFile(), DeleteAllModelsAndViews(), and ParseString().

Here is the caller graph for this function:

◆ UnzipFile()

void UnzipFile ( const std::string &  fileName,
const std::string &  prependDir = "" 
)

Definition at line 696 of file OS.cpp.

Here is the call graph for this function: