fix indention
This commit is contained in:
parent
adc5eca399
commit
368a4ab284
1 changed files with 33 additions and 32 deletions
|
@ -40,53 +40,54 @@ namespace events {
|
||||||
class mouse_handler;
|
class mouse_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
class reports {
|
class reports
|
||||||
public:
|
|
||||||
|
|
||||||
class context
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
context(const display_context & dc, display & disp, const tod_manager & tod, boost::shared_ptr<wb::manager> wb, boost::optional<events::mouse_handler &> mhb) : dc_(dc), disp_(disp), tod_(tod), wb_(wb), mhb_(mhb) {}
|
|
||||||
|
|
||||||
const std::vector<team> & teams() { return dc_.teams(); }
|
class context
|
||||||
const unit_map & units() { return dc_.units(); }
|
{
|
||||||
const gamemap & map() { return dc_.map(); }
|
public:
|
||||||
|
context(const display_context & dc, display & disp, const tod_manager & tod, boost::shared_ptr<wb::manager> wb, boost::optional<events::mouse_handler &> mhb) : dc_(dc), disp_(disp), tod_(tod), wb_(wb), mhb_(mhb) {}
|
||||||
|
|
||||||
const display_context & dc() { return dc_; }
|
const std::vector<team> & teams() { return dc_.teams(); }
|
||||||
display & screen() { return disp_; }
|
const unit_map & units() { return dc_.units(); }
|
||||||
const tod_manager & tod() { return tod_; }
|
const gamemap & map() { return dc_.map(); }
|
||||||
boost::shared_ptr<wb::manager> wb() { return wb_; }
|
|
||||||
boost::optional<events::mouse_handler&> mhb() { return mhb_; }
|
|
||||||
|
|
||||||
private:
|
const display_context & dc() { return dc_; }
|
||||||
const display_context & dc_;
|
display & screen() { return disp_; }
|
||||||
display & disp_;
|
const tod_manager & tod() { return tod_; }
|
||||||
const tod_manager & tod_;
|
boost::shared_ptr<wb::manager> wb() { return wb_; }
|
||||||
boost::shared_ptr<wb::manager> wb_;
|
boost::optional<events::mouse_handler&> mhb() { return mhb_; }
|
||||||
boost::optional<events::mouse_handler&> mhb_;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct generator
|
private:
|
||||||
{
|
const display_context & dc_;
|
||||||
virtual config generate(context & ct) = 0;
|
display & disp_;
|
||||||
virtual ~generator() {}
|
const tod_manager & tod_;
|
||||||
};
|
boost::shared_ptr<wb::manager> wb_;
|
||||||
|
boost::optional<events::mouse_handler&> mhb_;
|
||||||
|
};
|
||||||
|
|
||||||
void register_generator(const std::string &name, generator *);
|
struct generator
|
||||||
|
{
|
||||||
|
virtual config generate(context & ct) = 0;
|
||||||
|
virtual ~generator() {}
|
||||||
|
};
|
||||||
|
|
||||||
config generate_report(const std::string &name, context & ct, bool only_static = false);
|
void register_generator(const std::string &name, generator *);
|
||||||
|
|
||||||
const std::set<std::string> &report_list();
|
config generate_report(const std::string &name, context & ct, bool only_static = false);
|
||||||
|
|
||||||
|
const std::set<std::string> &report_list();
|
||||||
|
|
||||||
|
|
||||||
typedef config (*generator_function)(reports::context & );
|
typedef config (*generator_function)(reports::context & );
|
||||||
typedef std::map<std::string, boost::shared_ptr<reports::generator> > dynamic_report_generators;
|
typedef std::map<std::string, boost::shared_ptr<reports::generator> > dynamic_report_generators;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::set<std::string> all_reports_;
|
std::set<std::string> all_reports_;
|
||||||
|
|
||||||
dynamic_report_generators dynamic_generators_;
|
dynamic_report_generators dynamic_generators_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue