output.hh (9398:6a348f61220c) output.hh (11259:4006183015a1)
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;

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

81 std::string resolve(const std::string &name) const;
82
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
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;

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

81 std::string resolve(const std::string &name) const;
82
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 * @param no_gz true to disable opening the file as a gzip compressed output
90 * stream; false otherwise
89 * @return stream pointer to opened file; will cause sim fail on error
90 */
91 std::ostream *openFile(const std::string &filename,
91 * @return stream pointer to opened file; will cause sim fail on error
92 */
93 std::ostream *openFile(const std::string &filename,
92 std::ios_base::openmode mode = std::ios::trunc);
94 std::ios_base::openmode mode = std::ios::trunc,
95 bool no_gz = false);
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 /**

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

106 /**
107 * Creates a file in this directory (optionally compressed).
108 *
109 * Will open a file as a compressed stream if filename ends in .gz.
110 *
111 * @param name name of file to create (without this directory's name
112 * leading it)
113 * @param binary true to create a binary file; false otherwise
96
97 /**
98 * Sets name of this directory.
99 * @param dir name of this directory
100 */
101 void setDirectory(const std::string &dir);
102
103 /**

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

109 /**
110 * Creates a file in this directory (optionally compressed).
111 *
112 * Will open a file as a compressed stream if filename ends in .gz.
113 *
114 * @param name name of file to create (without this directory's name
115 * leading it)
116 * @param binary true to create a binary file; false otherwise
117 * @param no_gz true to disable creating a gzip compressed output stream;
118 * false otherwise
114 * @return stream to the opened file
115 */
119 * @return stream to the opened file
120 */
116 std::ostream *create(const std::string &name, bool binary = false);
121 std::ostream *create(const std::string &name, bool binary = false,
122 bool no_gz = false);
117
118 /**
119 * Closes a file stream.
120 *
121 * Stream must have been opened through this interface, or sim will fail.
122 *
123 * @param openStream open stream to close
124 */

--- 60 unchanged lines hidden ---
123
124 /**
125 * Closes a file stream.
126 *
127 * Stream must have been opened through this interface, or sim will fail.
128 *
129 * @param openStream open stream to close
130 */

--- 60 unchanged lines hidden ---