VSM C++ SDK
Vehicle Specific Modules SDK
ugcs::vsm::File_processor::Stream::Mode Class Reference

Mode for file opening. More...

#include <file_processor.h>

Public Member Functions

 Mode (const std::string &mode_str)
 Parse and validate mode string into binary structure. More...
 

Public Attributes

bool read:1
 Read access. More...
 
bool write:1
 Write access. More...
 
bool extended:1
 Extended access (corresponds to "+" in opening mode string. More...
 
bool should_not_exist:1
 File should not exist 1) When used with write access: If specified, opening fails if file is already existing. More...
 

Detailed Description

Mode for file opening.

Constructor & Destructor Documentation

ugcs::vsm::File_processor::Stream::Mode::Mode ( const std::string &  mode_str)

Parse and validate mode string into binary structure.

Parameters
mode_strMode string, format is similar to fopen() function mode argument.
Exceptions
Invalid_param_exceptionif mode string is not valid.

Member Data Documentation

bool ugcs::vsm::File_processor::Stream::Mode::extended

Extended access (corresponds to "+" in opening mode string.

File is not truncated when opened for write and also can be read. Also can be written when opened for read.

bool ugcs::vsm::File_processor::Stream::Mode::read

Read access.

bool ugcs::vsm::File_processor::Stream::Mode::should_not_exist

File should not exist 1) When used with write access: If specified, opening fails if file is already existing.

If not specified, new file is created if it does not exist. 2) When used with read access: If specified, file is created if file does not exist. If not specified, opening fails if file does not exist. NOTE 'x' with 'r' combination is not allowed in standard fopen() call. It is our extension to allow creation new file while opening it in read-only mode. (Does not mean that file on filesystem is read only.)

bool ugcs::vsm::File_processor::Stream::Mode::write

Write access.

File is truncated when opened.


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