Changeset c8cb0d for src/World.cpp


Ignore:
Timestamp:
Dec 26, 2025, 9:40:14 PM (6 weeks ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.1, stable
Children:
033646
Parents:
f2d5ce
git-author:
Frederik Heber <frederik.heber@…> (12/10/25 16:15:28)
git-committer:
Frederik Heber <frederik.heber@…> (12/26/25 21:40:14)
Message:

Streamlines channel creation in Observables.

  • CodePatterns is now version 1.3.4.
  • we no longer need to add the channels manually in the cstor of a class that derives from Observable. Instead, we just need to pass the maximum number of channels (as they are typically enumerated anyway) and they are generated and added.
  • added mutex protection when inserting.
  • adjusted class Relay to forward similar convenience cstors.
  • adjusted all call sites in molecuilder.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/World.cpp

    rf2d5ce rc8cb0d  
    10551055
    10561056World::World() :
    1057     Observable("World"),
     1057    Observable("World", NotificationType_MAX),
    10581058    BG(new BondGraph(true)),  // assume Angstroem for the moment
    10591059    periode(new periodentafel(true)),
     
    10771077  LCcontroller = new LinkedCell::LinkedCell_Controller(*cell_size);
    10781078  defaultName = "none";
    1079   Channels *OurChannel = new Channels;
    1080   Observable::insertNotificationChannel( std::make_pair( static_cast<Observable *>(this), OurChannel) );
    1081   for (size_t type = 0; type < (size_t)NotificationType_MAX; ++type)
    1082     OurChannel->addChannel(type);
    10831079}
    10841080
Note: See TracChangeset for help on using the changeset viewer.