Skip to content

Commit

Permalink
E57SimpleWriter: Pass file guid via WriterOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel Stewart committed Sep 27, 2022
1 parent 6ed6b3e commit 00943f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
12 changes: 11 additions & 1 deletion include/E57SimpleWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@

namespace e57
{
struct E57_DLL WriterOptions
{
ustring guid; //!< Optional file guid
ustring coordinateMetaData; //!< Information describing the Coordinate Reference System to be used for the file
};

//! @brief Used for writing of the E57 file with E57 Simple API
class E57_DLL Writer
Expand All @@ -43,7 +48,12 @@ namespace e57
//! @brief This function is the constructor for the writer class
//! @param [in] filePath file path to E57 file
//! @param [in] coordinateMetaData Information describing the Coordinate Reference System to be used for the file
Writer( const ustring &filePath, const ustring &coordinateMetaData = {}, const ustring &guid = {} );
Writer( const ustring &filePath, const ustring &coordinateMetaData = {} );

//! @brief This function is the constructor for the writer class
//! @param [in] filePath file path to E57 file
//! @param [in] options Options to be used for the file
Writer( const ustring &filePath, const WriterOptions &options );

//! @brief This function returns true if the file is open
bool IsOpen() const;
Expand Down
9 changes: 7 additions & 2 deletions src/E57SimpleWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@
namespace e57
{

Writer::Writer( const ustring &filePath, const ustring &coordinateMetaData, const ustring &guid ) :
impl_( new WriterImpl( filePath, coordinateMetaData, guid ) )
Writer::Writer( const ustring &filePath, const ustring &coordinateMetaData ) :
impl_( new WriterImpl( filePath, coordinateMetaData, {} ) )
{
}

Writer::Writer( const ustring &filePath, const WriterOptions &options ) :
impl_( new WriterImpl( filePath, options.coordinateMetaData, options.guid ) )
{
}

Expand Down

0 comments on commit 00943f7

Please sign in to comment.