Ignore:
Timestamp:
Mar 5, 2010, 12:53:13 PM (15 years ago)
Author:
Saskia Metzler <metzler@…>
Children:
5aefaa
Parents:
4938aa
Message:

the XYZ parser

File:
1 moved

Legend:

Unmodified
Added
Removed
  • molecuilder/src/Parser/ChangeTracker.cpp

    r4938aa rf2efcf  
    1010ChangeTracker* ChangeTracker::instance = NULL;
    1111
     12/**
     13 * Constructor. Signs on as an observer for the World.
     14 */
    1215ChangeTracker::ChangeTracker() {
    1316  isConsistent = true;
     
    1518}
    1619
     20/**
     21 * Destructor. Signs off from the World.
     22 */
    1723ChangeTracker::~ChangeTracker() {
    1824  World::get()->signOff(this);
    1925}
    2026
     27/**
     28 * Returns the change tracker instance.
     29 *
     30 * \return this
     31 */
    2132ChangeTracker* ChangeTracker::get() {
    2233  if (instance == NULL) {
     
    2738}
    2839
     40/**
     41 * Destroys the change tracker instance. Be careful, the change tracker is a
     42 * singleton and destruction might lead to a loss of consistency.
     43 */
    2944void ChangeTracker::destroy() {
    3045  delete instance;
     
    3247}
    3348
     49/**
     50 * With this, the World can update the change tracker's state.
     51 */
    3452void ChangeTracker::update(Observable *publisher) {
    3553  isConsistent = false;
    3654}
    3755
     56/**
     57 * Gets whether there are non-saved changes.
     58 *
     59 * \param true if there are any changes, false otherwise
     60 */
    3861bool ChangeTracker::hasChanged() {
    3962  return !isConsistent;
    4063}
    4164
     65/**
     66 * Tells all observers (which are the different parsers) that they are supposed
     67 * to save the current state.
     68 */
    4269void ChangeTracker::saveStatus() {
    4370  if (hasChanged()) {
Note: See TracChangeset for help on using the changeset viewer.