- Main Page
- Namespaces
- Classes
- Files

# proto/Source/context.cpp

Go to the documentation of this file.

    00001
    00011 // We use numeric_limits<> here.
    00012 #include <limits>
    00013
    00014 #include "context.h"
    00015
    00016 namespace ace {
    00017
    00018 // Narrow flag bitmask use the most significant bit of frequency data.
    00019 const context_frequency_t PartOfContext::_max_frequency = std::numeric_limits<context_frequency_t>::max() >> 1;
    00020 const context_frequency_t PartOfContext::_narrow_flag_bitmask = ~PartOfContext::_max_frequency;
    00021
    00022 /*  Interface item implementation - for info see description in header file.
    00023  */
    00024 void PartOfContext::inc(void) {
    00025     if ( _frequency == _max_frequency ) {
    00026         // Maximum count reached - do nothing.
    00027         return;
    00028     }
    00029     // Increase.
    00030     ++_frequency;
    00031 }
    00032
    00033 } // namespace ace