That's fine. Just add a note in the comments as to why it's public instead
of private. I'm sure I'll forget later..


On Wed, Feb 20, 2013 at 2:30 PM, Robert Carlsen <notifications@github.com>wrote:

> In src/Core/Utility/EventManager.h:
>
> > +  private:
> > +    bool isValidSchema(event_ptr ev);
> > +    void notifyBackends();
> > +    void addEvent(event_ptr ev);
> > +
> > +    std::list<event_ptr> events_;
> > +    std::map<std::string, event_ptr> schemas_;
> > +    std::list<EventBackend*> backs_;
> > +    unsigned int dump_count_;
> > +
> > +    /// A pointer to singleton EventManager.
> > +    static EventManager* instance_;
> > +
> > +  public:
> > +
> > +    /// create a new event manager with default dump countuency.
>
> The reason I didn't make constructor private is for that very reason - I
> don't think singletons are that great either. And it makes testing more
> pleasant. Eventually I see us passing a 'context' to each agent whenever we
> tick/tock it - the context will contain refs to things like the event
> manager, current time, etc. If we agree that this is where things are going
> I am inclined to leave it public - sound reasonable?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cyclus/cyclus/pull/456/files#r3088072>.
>
>