output.hh (8634:8390f2d80227) output.hh (8734:79592b2b1d55)
1/*
2 * Copyright (c) 2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 59 unchanged lines hidden (view full) ---

68 * streams.
69 *
70 * @param name name of file to check
71 * @return output stream for standard output or error stream if name
72 * corresponds to one or the other; NULL otherwise
73 */
74 std::ostream *checkForStdio(const std::string &name) const;
75
1/*
2 * Copyright (c) 2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 59 unchanged lines hidden (view full) ---

68 * streams.
69 *
70 * @param name name of file to check
71 * @return output stream for standard output or error stream if name
72 * corresponds to one or the other; NULL otherwise
73 */
74 std::ostream *checkForStdio(const std::string &name) const;
75
76 public:
77 /** Constructor. */
78 OutputDirectory();
79
80 /** Destructor. */
81 ~OutputDirectory();
82
76 /** Opens a file (optionally compressed).
77 *
78 * Will open a file as a compressed stream if filename ends in .gz.
79 *
80 * @param filename file to open
81 * @param mode attributes to open file with
82 * @return stream pointer to opened file; will cause sim fail on error
83 */
84 std::ostream *openFile(const std::string &filename,
85 std::ios_base::openmode mode = std::ios::trunc);
86
83 /** Opens a file (optionally compressed).
84 *
85 * Will open a file as a compressed stream if filename ends in .gz.
86 *
87 * @param filename file to open
88 * @param mode attributes to open file with
89 * @return stream pointer to opened file; will cause sim fail on error
90 */
91 std::ostream *openFile(const std::string &filename,
92 std::ios_base::openmode mode = std::ios::trunc);
93
87 public:
88 /** Constructor. */
89 OutputDirectory();
90
91 /** Destructor. */
92 ~OutputDirectory();
93
94 /**
95 * Sets name of this directory.
96 * @param dir name of this directory
97 */
98 void setDirectory(const std::string &dir);
99
100 /**
101 * Gets name of this directory.

--- 83 unchanged lines hidden ---
94 /**
95 * Sets name of this directory.
96 * @param dir name of this directory
97 */
98 void setDirectory(const std::string &dir);
99
100 /**
101 * Gets name of this directory.

--- 83 unchanged lines hidden ---