ClassLoader.cpp

Go to the documentation of this file.
00001 
00005 /* Copyright © 2009, 2010 James Legg.
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 
00012 #include "ClassLoader.h"
00013 
00014 #include "TrackAttachment.h"
00015 #include "StartingPosition.h"
00016 #include "TrackBooster.h"
00017 
00018 namespace Track
00019 {
00020 
00021 void register_all_classes_with_savable_class_list()
00022 {
00023     // I don't like having a big list here, but if these are declared in the
00024     // source file their class uses, then they might not be initalized ever.
00025     static ClassLoader<TrackAttachment> track_attachment(TrackAttachment().get_class_identifier());
00026     static ClassLoader<StartingPosition> starting_position(StartingPosition().get_class_identifier());
00027     static ClassLoader<TrackBooster> track_booster(TrackBooster().get_class_identifier());
00028 }
00029 
00030 SaveableClassList::SaveableClassList()
00031 {
00032 }
00033 
00034 SaveableClassList * SaveableClassList::get_instance()
00035 {
00036     static SaveableClassList * the_savable_class_list_instance = new SaveableClassList();
00037     return the_savable_class_list_instance;
00038 }
00039 
00040 }

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:11 2010 by Doxygen version 1.4.7 for Racer version svn335.