Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-10 14:04:43 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-10 14:04:43 +0400
commit5d600f2b50e918c9b16ef8fcc735c8aa8daaa5ce (patch)
tree2299060657217bf91eac18e905f15c7922505df1 /mert/FeatureArray.h
parent3ce46da4cd4c9c7779401548accf235f0c331059 (diff)
Remove hard-coded "/dev/stdout".
This will improve the portability. We also change the interface of I/O functions for ease of the development unit tests.
Diffstat (limited to 'mert/FeatureArray.h')
-rw-r--r--mert/FeatureArray.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/mert/FeatureArray.h b/mert/FeatureArray.h
index fa5590ac1..1581120db 100644
--- a/mert/FeatureArray.h
+++ b/mert/FeatureArray.h
@@ -11,7 +11,6 @@
#include <vector>
#include <iostream>
-#include <fstream>
#include "FeatureStats.h"
using namespace std;
@@ -89,17 +88,16 @@ public:
m_features = f;
}
- void savetxt(ofstream& outFile);
- void savebin(ofstream& outFile);
- void save(ofstream& outFile, bool bin=false);
+ void savetxt(std::ostream* os);
+ void savebin(std::ostream* os);
+ void save(std::ostream* os, bool bin=false);
+
void save(const std::string &file, bool bin=false);
- inline void save(bool bin=false) {
- save("/dev/stdout",bin);
- }
+ void save(bool bin=false);
- void loadtxt(ifstream& inFile, size_t n);
- void loadbin(ifstream& inFile, size_t n);
- void load(ifstream& inFile);
+ void loadtxt(std::istream* is, size_t n);
+ void loadbin(std::istream* is, size_t n);
+ void load(std::istream* is);
void load(const std::string &file);
bool check_consistency() const;