| 101 |
|
|
| 102 |
|
/** |
| 103 |
|
* Explicit constructor |
| 104 |
< |
* @filename String containing the name of the file to be opened |
| 105 |
< |
* @mode Flags describing the requested i/o mode for the file, default value is ios_base::in |
| 106 |
< |
* @checkFilename Flags indicating checking the file name in parallel |
| 104 |
> |
* @param filename String containing the name of the file to be opened |
| 105 |
> |
* @param mode Flags describing the requested i/o mode for the file, default value is ios_base::in |
| 106 |
> |
* @param checkFilename Flags indicating checking the file name in parallel |
| 107 |
|
*/ |
| 108 |
|
explicit ifstrstream(const char* filename, std::ios_base::openmode mode = std::ios_base::in, bool checkFilename = false); |
| 109 |
|
|
| 116 |
|
* Opens a file and associats a buffer with the specified file to perform the i/o operations |
| 117 |
|
* (single mode). Master reads a file and brocasts its content to the other slave nodes. After |
| 118 |
|
* brocasting, every nodes fall back to stringstream (parallel mode). |
| 119 |
< |
* @filename String containing the name of the file to be opened |
| 120 |
< |
* @mode Flags describing the requested i/o mode for the file |
| 121 |
< |
* @checkFilename Flags indicating checking the file name in parallel |
| 119 |
> |
* @param filename String containing the name of the file to be opened |
| 120 |
> |
* @param mode Flags describing the requested i/o mode for the file |
| 121 |
> |
* @param checkFilename Flags indicating checking the file name in parallel |
| 122 |
|
*/ |
| 123 |
|
void open(const char* filename, std::ios_base::openmode mode = std::ios_base::in, bool checkFilename = false); |
| 124 |
|
|
| 149 |
|
* Internal function used to open the file |
| 150 |
|
* @return true if succesfully opens a file (single mode) or gets the file content (parallel mode) |
| 151 |
|
* otherwise return false |
| 152 |
< |
* @filename String containing the name of the file to be opened |
| 153 |
< |
* @mode Flags describing the requested i/o mode for the file |
| 152 |
> |
* @param filename String containing the name of the file to be opened |
| 153 |
> |
* @param mode Flags describing the requested i/o mode for the file |
| 154 |
> |
* @param checkFilename Flags indicating checking the file name in parallel |
| 155 |
|
* @todo use try - catch syntax to make the program more readable |
| 156 |
|
*/ |
| 157 |
|
bool internalOpen(const char* filename, std::ios_base::openmode mode, bool checkFilename); |