Created
December 27, 2012 10:49
-
-
Save anonymous/4387313 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::ofstream cluster_stream(path.string().c_str(), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); | |
const typename merged_cell::value_type* first_cell = *(base::cell()->cells().begin()); | |
gcl::Participant* reference_participant = first_cell->connection()->pair().second->participant(); | |
BOOST_FOREACH(const typename merged_cell::value_type* cell, base::cell()->cells()){ | |
boost::filesystem::path reference_paragraphs_directory = boost::filesystem::path(reference_participant->heading()) / "paragraphs"; | |
boost::filesystem::path relative_path = reference_paragraphs_directory / base::cell_name(cell); | |
boost::filesystem::path absolute_path = root_path / relative_path; | |
std::ifstream stream(absolute_path.string().c_str(), std::ios_base::in | std::ios_base::binary); | |
std::copy(std::istream_iterator<char>(stream), std::istream_iterator<char>(), std::ostream_iterator<char>(cluster_stream)); | |
stream.close(); | |
} | |
cluster_stream.close(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment