~ubuntu-branches/ubuntu/quantal/aspectc++/quantal

« back to all changes in this revision

Viewing changes to Puma/src/aspects/PragmaOnceUnitState.ah

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef __PragmaOnceUnitState__
20
20
#define __PragmaOnceUnitState__
21
21
 
22
 
using namespace Puma;
23
 
 
24
22
aspect PragmaOnceUnitState {
25
23
  /******************************************************/
26
24
  /* specific #pragma once unit state                   */
42
40
  advice construction (unitstate ()) : after () {
43
41
    thisJoinPoint->that ()->_once = false;
44
42
  }
 
43
  
 
44
  // initialize new flag for all managed units 
 
45
  advice execution ("void Puma::UnitManager::init()") : after() {
 
46
    // go through the whole unit hash table and reset the 
 
47
    // `#pragma once' state of the units
 
48
    typename JoinPoint::That::UMapIter iter;
 
49
    for (iter = tjp->that()->_umap.begin (); iter != tjp->that()->_umap.end (); ++iter)
 
50
      (*iter).second->state ().onlyOnce (false);
 
51
  }
45
52
 
46
53
protected:
47
54
  // this aspect should never be instantiated directly