mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:10:06 +00:00
Adding map context to simplify parameter passing
This commit is contained in:
parent
afb174a8fe
commit
f7f86ec24a
12 changed files with 140 additions and 124 deletions
|
|
@ -10,14 +10,27 @@ namespace map
|
|||
class GenericLayerImpl
|
||||
{
|
||||
public:
|
||||
explicit GenericLayerImpl() {}
|
||||
explicit GenericLayerImpl(std::shared_ptr<MapContext> context) :
|
||||
context_ {context}
|
||||
{
|
||||
}
|
||||
|
||||
~GenericLayerImpl() {}
|
||||
|
||||
std::shared_ptr<MapContext> context_;
|
||||
};
|
||||
|
||||
GenericLayer::GenericLayer() : p(std::make_unique<GenericLayerImpl>()) {}
|
||||
GenericLayer::GenericLayer(std::shared_ptr<MapContext> context) :
|
||||
p(std::make_unique<GenericLayerImpl>(context))
|
||||
{
|
||||
}
|
||||
GenericLayer::~GenericLayer() = default;
|
||||
|
||||
std::shared_ptr<MapContext> GenericLayer::context() const
|
||||
{
|
||||
return p->context_;
|
||||
}
|
||||
|
||||
} // namespace map
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue