NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Compiler::File Class Reference

Represents for a file at a specific path. More...

#include <File.hpp>

Public Member Functions

 File (std::string path)
 Constructor for a file at a specific path. More...
 
std::string getPath () const
 Returns the path of the file. More...
 
std::string read () const
 Reads the file as a string. More...
 
void print () const
 Prints the file to the log. More...
 
std::mutex & getFileMutex ()
 Gives access to a mutex to lock the file. More...
 

Static Public Member Functions

static std::shared_ptr< FilecreateFile (const std::string &absoluteFilePath, const std::string &content)
 Creates a new file form a string. More...
 

Detailed Description

Represents for a file at a specific path.

Constructor & Destructor Documentation

◆ File()

NES::Compiler::File::File ( std::string  path)
explicit

Constructor for a file at a specific path.

Parameters
path

Member Function Documentation

◆ createFile()

std::shared_ptr< File > NES::Compiler::File::createFile ( const std::string &  absoluteFilePath,
const std::string &  content 
)
static

Creates a new file form a string.

Parameters
absoluteFilePathtarget absoluteFilePath of the file.
contentof the file
Returns
std::shared_ptr<File>

References NES_DEBUG.

Referenced by NES::Compiler::CPPCompiler::compile().

Here is the caller graph for this function:

◆ getFileMutex()

std::mutex & NES::Compiler::File::getFileMutex ( )

Gives access to a mutex to lock the file.

Returns
std::mutex

◆ getPath()

std::string NES::Compiler::File::getPath ( ) const

Returns the path of the file.

Returns
path

◆ print()

void NES::Compiler::File::print ( ) const

Prints the file to the log.

References NES_DEBUG, and read().

Here is the call graph for this function:

◆ read()

std::string NES::Compiler::File::read ( ) const

Reads the file as a string.

Returns
file content

Referenced by print().

Here is the caller graph for this function:

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