MCPcopy Create free account
hub / github.com/csmith-project/csmith / CreateInstance

Method CreateInstance

src/DefaultOutputMgr.cpp:65–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63DefaultOutputMgr *DefaultOutputMgr::instance_ = NULL;
64
65DefaultOutputMgr *
66DefaultOutputMgr::CreateInstance()
67{
68 if (DefaultOutputMgr::instance_)
69 return DefaultOutputMgr::instance_;
70
71 std::string ofile_str = CGOptions::output_file();
72 if (!ofile_str.empty()) {
73 ofstream *ofile = new ofstream(ofile_str.c_str());
74 DefaultOutputMgr::instance_ = new DefaultOutputMgr(ofile);
75 }
76 else {
77 DefaultOutputMgr::instance_ = new DefaultOutputMgr();
78 }
79 // DefaultOutputMgr::instance_ = new DefaultOutputMgr();
80 assert(DefaultOutputMgr::instance_);
81 DefaultOutputMgr::instance_->init();
82 return DefaultOutputMgr::instance_;
83}
84
85ofstream *
86DefaultOutputMgr::open_one_output_file(int num)

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected