Changeset 643

Show
Ignore:
Timestamp:
05/02/08 01:03:33 (14 months ago)
Author:
mloskot
Message:

Added test for liblas::LASError class (Ticket #30).

Location:
trunk
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/build/msvc80/liblas_test/liblas_test.vcproj

    r641 r643  
    208208                </File> 
    209209                <File 
     210                        RelativePath="..\..\..\test\unit\laserror_test.cpp" 
     211                        > 
     212                </File> 
     213                <File 
    210214                        RelativePath="..\..\..\test\unit\lasfile_test.cpp" 
    211215                        > 
  • trunk/include/liblas/laserror.hpp

    r374 r643  
    1717namespace liblas { 
    1818 
    19 /// \todo To be documented. 
     19/// Definition of error notification used on the level of C API. 
     20/// This class describes details of error condition occured in 
     21/// libLAS core. All errors are stacked by C API layer, so it's 
     22/// possible to track problem down to its source. 
    2023class LASError 
    2124{ 
    2225public: 
    2326 
     27    /// Custom constructor. 
     28    /// This is the main and the only tool to initialize error instance. 
    2429    LASError(int code, std::string const& message, std::string const& method); 
     30 
     31    /// Copy constructor. 
     32    /// Error objects are copyable. 
    2533    LASError(LASError const& other); 
     34 
     35    /// Assignment operator. 
     36    /// Error objects are assignable. 
    2637    LASError& operator=(LASError const& rhs); 
    2738 
     
    2940    //        char const* GetMethod() const { return m_method.c_str(); }, etc. 
    3041 
    31     std::string GetMethod() const { return m_method; }; 
     42    int GetCode() const { return m_code; }; 
    3243    std::string GetMessage() const { return m_message; }; 
    33     int GetCode() const {return m_code; }; 
     44    std::string GetMethod() const { return m_method; };     
    3445 
    3546private: 
     47 
    3648    int m_code; 
    3749    std::string m_message;