The writer for storing Objects into a ply stream.
More...
#include <io.h>
The writer for storing Objects into a ply stream.
- See Also
- Reader.
PLY::Writer::Writer |
( |
Header & |
h) | |
|
|
inline |
Base constructor.
In order to be able to share a Header, for example with a Writer, it is stored as a reference.
- Parameters
-
PLY::Writer::Writer |
( |
Header & |
h, |
|
|
std::ostream & |
os |
|
) |
| |
|
inline |
Construct from existing stream.
It is assumed that the stream was opened correctly. In order to be able to write any binary file, the stream must be opened in binary mode.
- Parameters
-
[in,out] | h | the Header to use. |
[in,out] | os | the stream to use. |
Construct and open a file.
This constructor tries to open a file for writing
- Parameters
-
[in,out] | h | the Header to use. |
| file_name | the name of the file to read. |
| type | the storage type to use for the data. |
void PLY::Writer::close_file |
( |
) | |
|
Close the stream.
Note that this will throw an exception when trying to close a standard io stream.
bool PLY::Writer::open_file |
( |
const char * |
file_name, |
|
|
const Stream_type & |
type = ASCII |
|
) |
| |
Open a file for writing.
- Parameters
-
file_name | the file to open. |
type | the storage type to use for the data. |
- Returns
- true if the file could be successfully opened.
bool PLY::Writer::write_data |
( |
Storage * |
store) | |
|
Write the Object data to the current stream.
Note that this method writes the Header and all the Objects to the stream.
- Parameters
-
- Returns
- true if all the data could be successfully written.
bool PLY::Writer::write_element |
( |
const Element & |
elem, |
|
|
Array * |
collect |
|
) |
| |
Write all Objects of one Element.
- Parameters
-
- Returns
- true if all the data could be successfully written.
bool PLY::Writer::write_header |
( |
) | |
|
Write the Header to the current stream.
Note that you should not change the num values of the Elements after writing the Header, as then the header and data no longer match.
- Returns
- true if the header could be correctly written.
bool PLY::Writer::write_object |
( |
const Element & |
elem, |
|
|
Object * |
obj |
|
) |
| |
|
inline |
Write an Object.
- Parameters
-
- Returns
- true if the Object could be successfully written.
The documentation for this struct was generated from the following files: