• entries
7
2
• views
5200

# Photon re-re-rewritten

294 views

I finally decided on a reasonable design for my Core/Task/Kernel issues. A Core simply registers a simple Updater class with the Kernel and then reads any data from the Updater, a reasonable example is below:

class Core{    public:        Core() :            task_(new CoreUpdater())        {            Kernel::getInstance().addTask(task_);        }        // core interface    private:        class CoreUpdater : public Task        {        friend class Core;        public:            void update();        private:            // data members        };        CoreUpdater task_;};

This works very nicely, it also prevents Application and the various Tasks from being Singletons. I'm still dissatisfied with my current use of Singletons, Log, Kernel and each of the Cores are singletons. If anyone has any suggestions (or actually reads this thing) I'd love to hear them, if you want I'd even give you credit for your design suggestion if I really like it and go with it)

As far as other news is concerned, I've been bored lately, now that I've been in classes a week I feel comfortable commenting on how they seem:
Univ. Physics II - seems easy enough, new material but a good pair of teachers, tons of webassign homework though
Discrete Math II - pretty awkward teacher, hard to follow and spends 30 minutes of class making awkward statements
Professional Communications - not the most interesting class, but seems alright. I get to write a user manual / do a presentation on some software I like. I will probably choose something like SCons.
Computer Organizaiton - I was worried after the first day, because it seemed like tons of new material. I read a little and I'm already ahead. Won't be bad but won't be a breeze like CS4 either. Assembler/Logic Design are the two halfs of the course. Only bad part of CompOrg is this kid in the class that I hardly know but he seemingly refuses to acknowledge me when I've said hi before, I've never really dealt with this before so it sort of annoys me, even though I know I haven't done anything to him.

There are no comments to display.

## Create an account

Register a new account