24 void add (
const std::string sourcePath,
const std::string bufferPath)
26 const int bufsize = 4096;
27 char *buf =
new char[bufsize];
29 std::ostringstream contents;
30 std::ifstream buffer (bufferPath);
32 buffer.get (buf, bufsize, 0);
34 }
while (! buffer.eof());
38 sourcePath_.push_back (sourcePath);
39 contents_.push_back (contents.str());
40 unsavedFile_.resize (sourcePath_.size());
42 CXUnsavedFile & unsavedFile = unsavedFile_.back();
43 unsavedFile.Filename = sourcePath_.back().c_str();
44 unsavedFile.Contents = contents_.back().c_str();
45 unsavedFile.Length = contents_.back().size();
52 unsigned int size ()
const {
53 return sourcePath_.size();
61 return &(unsavedFile_[0]);
65 std::vector<std::string> sourcePath_;
66 std::vector<std::string> contents_;
67 std::vector<CXUnsavedFile> unsavedFile_;