Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 8, 2013, 11:16:56 PM (12 years ago)
Author:
landauf
Message:

small refactoring in LogWriter and tests added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/src/libraries/util/output/LogWriter.h

    r9536 r9538  
    6161            virtual ~LogWriter();
    6262
    63             void setLogPath(const std::string& path);
     63            void setLogDirectory(const std::string& directory);
     64
     65            /** @brief Returns the path to the logfile. */
     66            inline std::string getPath() const
     67                { return this->directory_ + '/' + this->filename_; }
     68            /** @brief Returns the open file stream. */
     69            inline const std::ofstream& getFile() const
     70                { return this->file_; }
    6471
    6572        protected:
     
    7077            void closeFile();
    7178
    72             std::string filename_;  ///< The name of the log-file (without directories)
    73             std::string path_;      ///< The path of the log-file (without file-name)
    74             bool bDefaultPath_;     ///< If true, the log-file resides at the default path (which is usually a temporary directory)
    75 
     79            std::string filename_;  ///< The name of the log-file (without directory)
     80            std::string directory_; ///< The directory where the log-file resided (without file-name)
    7681            std::ofstream file_;    ///< The output file stream.
    7782    };
Note: See TracChangeset for help on using the changeset viewer.