Changeset 42918b


Ignore:
Timestamp:
Feb 5, 2010, 2:59:41 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
d2d8f5
Parents:
181488
git-author:
Tillmann Crueger <crueger@…> (02/05/10 14:53:21)
git-committer:
Tillmann Crueger <crueger@…> (02/05/10 14:59:41)
Message:

Fixed some problems with the usage of Boost::threads

Location:
molecuilder
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/configure.ac

    r181488 r42918b  
    2727
    2828# Boost libraries
    29 #AX_BOOST_BASE([1.33.1])
     29AX_BOOST_BASE([1.33.1])
    3030#AX_BOOST_PROGRAM_OPTIONS
    3131#AX_BOOST_FOREACH
    3232#AX_BOOST_FILESYSTEM
    33 #AX_BOOST_THREAD
     33AX_BOOST_THREAD
    3434#AX_BOOST_PROGRAM_OPTIONS
    3535#AX_BOOST_SERIALIZATION
  • molecuilder/src/Makefile.am

    r181488 r42918b  
    2727# deleted once everything is fully refactored
    2828LEGACYSOURCE = Legacy/oldmenu.cpp
    29 LEGACYHEADER = Legacy/oldmenu.hpp
     29LEGACYHEADER = Legacy/oldmenu.hpp Legacy/WorldContent.hpp Legacy/WorldContent_impl.hpp
    3030
    3131SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} ${PATTERNSOURCE} ${UISOURCE} ${LEGACYSOURCE} bond.cpp bondgraph.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp World.cpp
     
    4242libgslwrapper_a_SOURCES = ${LINALGSOURCE} ${LINALGHEADER}
    4343molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db
    44 molecuilder_LDFLAGS = $(BOOST_LIB)
    45 #molecuilder_CXXFLAGS = -DNO_CACHING
     44molecuilder_LDFLAGS = $(BOOST_LDFLAGS)
     45molecuilder_CXXFLAGS = $(BOOST_CPPFLAGS)
     46#molecuilder_CXXFLAGS += -DNO_CACHING
    4647molecuilder_SOURCES = builder.cpp
    47 molecuilder_LDADD = libmolecuilder.a libgslwrapper.a
     48molecuilder_LDADD = libmolecuilder.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
    4849joiner_SOURCES = joiner.cpp datacreator.cpp parser.cpp datacreator.hpp helpers.hpp parser.hpp periodentafel.hpp
    49 joiner_LDADD = libmolecuilder.a
     50joiner_LDADD = libmolecuilder.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
    5051analyzer_SOURCES = analyzer.cpp datacreator.cpp parser.cpp helpers.hpp periodentafel.hpp parser.hpp datacreator.hpp
    51 analyzer_LDADD = libmolecuilder.a
     52analyzer_LDADD = libmolecuilder.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
    5253
    5354#EXTRA_DIST = ${molecuilder_DATA}
  • molecuilder/src/World.cpp

    r181488 r42918b  
    88#include "World.hpp"
    99
     10#include <iostream>
     11
    1012/******************************* getter and setter ************************/
    1113periodentafel* World::getPeriode(){
     
    1517/******************************* Singleton Stuff **************************/
    1618
     19// TODO: Hide boost-thread using Autotools stuff when no threads are used
    1720World* World::theWorld = 0;
     21boost::mutex World::worldLock;
     22
    1823
    1924
     
    6772  return molecules;
    6873}
     74
     75
     76// methods for WorldContent CRTP mechanism
     77void World::registerContent(atom *atom){
     78  std::cout << "############### some kind of Atom created ##################" << std::endl;
     79}
  • molecuilder/src/World.hpp

    r181488 r42918b  
    1717class periodentafel;
    1818class MoleculeListClass;
     19class atom;
    1920
    2021class World : public Observable
     
    4950public:
    5051  MoleculeListClass *getMolecules();
     52
     53  // functions used for the WorldContent template mechanism
     54  void registerContent(atom *theAtom);
    5155private:
    5256  MoleculeListClass *molecules;
  • molecuilder/src/unittests/Makefile.am

    r181488 r42918b  
    3535noinst_PROGRAMS = $(TESTS)
    3636
     37GSLLIBS = ../libgslwrapper.a
     38ALLLIBS = ../libmolecuilder.a ${GSLLIBS} $(BOOST_LIB) ${BOOST_THREAD_LIB}
     39
    3740ActOnAllUnitTest_SOURCES = ../test/ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp
    38 ActOnAllUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     41ActOnAllUnitTest_LDADD = ${ALLLIBS}
    3942
    4043AnalysisBondsUnitTests_SOURCES = analysisbondsunittest.cpp analysisbondsunittest.hpp
    41 AnalysisBondsUnitTests_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     44AnalysisBondsUnitTests_LDADD = ${ALLLIBS}
    4245
    4346AnalysisCorrelationToPointUnitTest_SOURCES = analysis_correlation.hpp AnalysisCorrelationToPointUnitTest.cpp AnalysisCorrelationToPointUnitTest.hpp
    44 AnalysisCorrelationToPointUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     47AnalysisCorrelationToPointUnitTest_LDADD = ${ALLLIBS}
    4548
    4649AnalysisCorrelationToSurfaceUnitTest_SOURCES = analysis_correlation.hpp AnalysisCorrelationToSurfaceUnitTest.cpp AnalysisCorrelationToSurfaceUnitTest.hpp
    47 AnalysisCorrelationToSurfaceUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     50AnalysisCorrelationToSurfaceUnitTest_LDADD = ${ALLLIBS}
    4851
    4952AnalysisPairCorrelationUnitTest_SOURCES = analysis_correlation.hpp AnalysisPairCorrelationUnitTest.cpp AnalysisPairCorrelationUnitTest.hpp
    50 AnalysisPairCorrelationUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     53AnalysisPairCorrelationUnitTest_LDADD = ${ALLLIBS}
    5154
    5255BondGraphUnitTest_SOURCES = bondgraphunittest.cpp bondgraphunittest.hpp
    53 BondGraphUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     56BondGraphUnitTest_LDADD = ${ALLLIBS}
    5457
    5558GSLMatrixSymmetricUnitTest_SOURCES = gslmatrixsymmetricunittest.cpp gslmatrixsymmetricunittest.hpp
    56 GSLMatrixSymmetricUnitTest_LDADD = ../libgslwrapper.a
     59GSLMatrixSymmetricUnitTest_LDADD = ${GSLLIBS}
    5760
    5861GSLMatrixUnitTest_SOURCES = gslmatrixunittest.cpp gslmatrixunittest.hpp
    59 GSLMatrixUnitTest_LDADD = ../libgslwrapper.a
     62GSLMatrixUnitTest_LDADD = ${GSLLIBS}
    6063
    6164GSLVectorUnitTest_SOURCES = gslvectorunittest.cpp gslvectorunittest.hpp
    62 GSLVectorUnitTest_LDADD = ../libgslwrapper.a
     65GSLVectorUnitTest_LDADD = ${GSLLIBS}
    6366
    6467InfoUnitTest_SOURCES = infounittest.cpp infounittest.hpp
    65 InfoUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     68InfoUnitTest_LDADD = ${ALLLIBS}
    6669
    6770LinearSystemOfEquationsUnitTest_SOURCES = linearsystemofequationsunittest.cpp linearsystemofequationsunittest.hpp
    68 LinearSystemOfEquationsUnitTest_LDADD = ../libgslwrapper.a ../libmolecuilder.a
     71LinearSystemOfEquationsUnitTest_LDADD = ${ALLLIBS}
    6972
    7073ListOfBondsUnitTest_SOURCES = listofbondsunittest.cpp listofbondsunittest.hpp
    71 ListOfBondsUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     74ListOfBondsUnitTest_LDADD = ${ALLLIBS}
    7275
    7376LogUnitTest_SOURCES = logunittest.cpp logunittest.hpp
    74 LogUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     77LogUnitTest_LDADD = ${ALLLIBS}
    7578
    7679MemoryAllocatorUnitTest_SOURCES = memoryallocatorunittest.cpp memoryallocatorunittest.hpp
    77 MemoryAllocatorUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     80MemoryAllocatorUnitTest_LDADD = ${ALLLIBS}
    7881
    7982MemoryUsageObserverUnitTest_SOURCES = memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp
    80 MemoryUsageObserverUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     83MemoryUsageObserverUnitTest_LDADD = ${ALLLIBS}
    8184
    8285StackClassUnitTest_SOURCES = stackclassunittest.cpp stackclassunittest.hpp
    83 StackClassUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     86StackClassUnitTest_LDADD = ${ALLLIBS}
    8487
    8588TesselationUnitTest_SOURCES = tesselationunittest.cpp tesselationunittest.hpp
    86 TesselationUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     89TesselationUnitTest_LDADD = ${ALLLIBS}
    8790
    8891Tesselation_BoundaryTriangleUnitTest_SOURCES = tesselation_boundarytriangleunittest.cpp tesselation_boundarytriangleunittest.hpp
    89 Tesselation_BoundaryTriangleUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     92Tesselation_BoundaryTriangleUnitTest_LDADD = ${ALLLIBS}
    9093
    9194Tesselation_InOutsideUnitTest_SOURCES = tesselation_insideoutsideunittest.cpp tesselation_insideoutsideunittest.hpp
    92 Tesselation_InOutsideUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     95Tesselation_InOutsideUnitTest_LDADD = ${ALLLIBS}
    9396
    9497VectorUnitTest_SOURCES = vectorunittest.cpp vectorunittest.hpp
    95 VectorUnitTest_LDADD = ../libmolecuilder.a ../libgslwrapper.a
     98VectorUnitTest_LDADD = ${ALLLIBS}
    9699
    97100ActionSequenceTest_SOURCES = ActionSequenceTest.cpp ActionSequenceTest.hpp
    98 ActionSequenceTest_LDADD = ../libmolecuilder.a
     101ActionSequenceTest_LDADD = ${ALLLIBS}
    99102
    100103ObserverTest_SOURCES = ObserverTest.cpp ObserverTest.hpp
    101 ObserverTest_LDADD = ../libmolecuilder.a
     104ObserverTest_LDADD = ${ALLLIBS}
    102105
    103106CacheableTest_SOURCES = CacheableTest.cpp CacheableTest.hpp
    104 CacheableTest_LDADD = ../libmolecuilder.a
     107CacheableTest_LDADD = ${ALLLIBS}
    105108
    106109#AUTOMAKE_OPTIONS = parallel-tests
Note: See TracChangeset for help on using the changeset viewer.