41 |
|
*/ |
42 |
|
|
43 |
|
/** |
44 |
< |
* @file basic_ifstrstream.cpp |
44 |
> |
* @file ifstrstream.cpp |
45 |
|
* @author Teng Lin |
46 |
|
* @date 10/14/2004 |
47 |
|
* @version 1.0 |
72 |
|
|
73 |
|
/** |
74 |
|
* Explicit constructor |
75 |
< |
* @filename String containing the name of the file to be opened |
76 |
< |
* @mode Flags describing the requested i/o mode for the file, default value is ios_base::in |
77 |
< |
* @checkFilename Flags indicating checking the file name in parallel |
75 |
> |
* @param filename String containing the name of the file to be opened |
76 |
> |
* @param mode Flags describing the requested i/o mode for the file, default value is ios_base::in |
77 |
> |
* @param checkFilename Flags indicating checking the file name in parallel |
78 |
|
*/ |
79 |
|
#ifdef IS_MPI |
80 |
|
ifstrstream::ifstrstream(const char* filename, std::ios_base::openmode mode, bool checkFilename) |
103 |
|
* Opens a file and associats a buffer with the specified file to perform the i/o operations |
104 |
|
* (single mode). Master reads a file and brocasts its content to the other slave nodes. After |
105 |
|
* brocasting, every nodes fall back to stringstream (parallel mode). |
106 |
< |
* @filename String containing the name of the file to be opened |
107 |
< |
* @mode Flags describing the requested i/o mode for the file |
108 |
< |
* @checkFilename Flags indicating checking the file name in parallel |
106 |
> |
* @param filename String containing the name of the file to be opened |
107 |
> |
* @param mode Flags describing the requested i/o mode for the file |
108 |
> |
* @param checkFilename Flags indicating checking the file name in parallel |
109 |
|
*/ |
110 |
|
void ifstrstream::open(const char* filename, std::ios_base::openmode mode, bool checkFilename){ |
111 |
|
|
160 |
|
* Internal function used to open the file |
161 |
|
* @return true if succesfully opens a file (single mode) or gets the file content (parallel mode) |
162 |
|
* otherwise return false |
163 |
< |
* @filename String containing the name of the file to be opened |
164 |
< |
* @mode Flags describing the requested i/o mode for the file |
163 |
> |
* @param filename String containing the name of the file to be opened |
164 |
> |
* @param mode Flags describing the requested i/o mode for the file |
165 |
> |
* @param checkFilename Flags indicating checking the file name in parallel |
166 |
|
* @todo use try - catch syntax to make the program more readable |
167 |
|
*/ |
168 |
|
|