Unused, and meaningless for pipes.
File::File(const std::string &filename,
File::Mode mode)
File::File(const std::string &filename,
File::Mode mode)
- : m_filename(filename),
- m_mode(mode),
- if (!m_filename.empty()) {
- open(m_filename, m_mode);
+ if (!filename.empty()) {
+ open(filename, m_mode);
bool isOpened() const;
File::Mode mode() const;
bool isOpened() const;
File::Mode mode() const;
- std::string filename() const;
-
bool open(const std::string &filename, File::Mode mode);
bool write(const void *buffer, size_t length);
bool read(void *buffer, size_t length);
bool open(const std::string &filename, File::Mode mode);
bool write(const void *buffer, size_t length);
bool read(void *buffer, size_t length);
virtual void rawFlush() = 0;
protected:
virtual void rawFlush() = 0;
protected:
- std::string m_filename;
File::Mode m_mode;
bool m_isOpened;
};
File::Mode m_mode;
bool m_isOpened;
};
-inline std::string File::filename() const
-{
- return m_filename;
-}
-
inline bool File::open(const std::string &filename, File::Mode mode)
{
if (m_isOpened) {
inline bool File::open(const std::string &filename, File::Mode mode)
{
if (m_isOpened) {