xlnt/source/detail/workbook_impl.hpp

53 lines
1.5 KiB
C++
Raw Normal View History

2014-05-31 06:42:25 +08:00
#pragma once
2014-07-24 08:51:28 +08:00
#include <iterator>
2014-05-31 06:42:25 +08:00
#include <vector>
namespace xlnt {
2014-05-31 06:42:25 +08:00
namespace detail {
struct workbook_impl
{
workbook_impl();
2014-07-25 05:31:46 +08:00
2014-07-24 08:51:28 +08:00
workbook_impl &operator=(const workbook_impl &other)
{
active_sheet_index_ = other.active_sheet_index_;
worksheets_.clear();
std::copy(other.worksheets_.begin(), other.worksheets_.end(), back_inserter(worksheets_));
relationships_.clear();
std::copy(other.relationships_.begin(), other.relationships_.end(), std::back_inserter(relationships_));
drawings_.clear();
std::copy(other.drawings_.begin(), other.drawings_.end(), back_inserter(drawings_));
properties_ = other.properties_;
2014-07-25 05:31:46 +08:00
guess_types_ = other.guess_types_;
data_only_ = other.data_only_;
2014-07-24 08:51:28 +08:00
return *this;
}
2014-07-25 05:31:46 +08:00
workbook_impl(const workbook_impl &other)
: active_sheet_index_(other.active_sheet_index_),
worksheets_(other.worksheets_),
relationships_(other.relationships_),
drawings_(other.drawings_),
properties_(other.properties_),
guess_types_(other.guess_types_),
data_only_(other.data_only_)
2014-07-24 08:51:28 +08:00
{
}
2014-07-25 05:31:46 +08:00
//bool guess_types_;
//bool data_only_;
int active_sheet_index_;
std::vector<worksheet_impl> worksheets_;
std::vector<relationship> relationships_;
std::vector<drawing> drawings_;
2014-07-20 04:59:05 +08:00
document_properties properties_;
2014-07-25 05:31:46 +08:00
bool guess_types_;
bool data_only_;
};
2014-05-31 06:42:25 +08:00
} // namespace detail
} // namespace xlnt