Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 25, 2011, 2:47:49 PM (13 years ago)
Author:
landauf
Message:

output contexts are now defined as functions instead of global constants. this should avoid a static initialization fiasco and reduces the amount of context registrations (previosly it was N*M registrations with N = number of contexts and M = number of source files, now they are registered on demand). slightly worse performance though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/util/output/OutputStream.cc

    r8776 r8777  
    4848    }
    4949
    50     void OutputStream::setOutputAttributes(OutputLevel level, OutputContext context)
     50    void OutputStream::setOutputAttributes(OutputLevel level, OutputContextFunction context)
    5151    {
    5252        this->level_ = level;
    53         this->context_ = context;
     53        this->context_ = context();
    5454
    55         this->bAcceptsOutput_ = OutputManager::getInstanceAndCreateListeners().acceptsOutput(level, context);
     55        this->bAcceptsOutput_ = OutputManager::getInstanceAndCreateListeners().acceptsOutput(this->level_, this->context_);
    5656    }
    5757}
Note: See TracChangeset for help on using the changeset viewer.