- Separate template definition from template declaration

- Explicitly instantiate Singleton templates to be exported from libbackend.so
- Install only header files that are backend interfaces to be exposed to the user
- Don't use full path for including templates in header files
- Instantiate a couple of smart_ptr templates to have their symbols exported outside the DSO. This happens in history.cc. FIXME: the interface for History will definitely need to be reworked, and the two smart_ptr explicit instantiations removed.
- Change SWIG exported interface to make use of Schedulable instead of (Dynamic|Static)Schedulable
- Fix provided policies to make use of the new interface
- TODO: limit the use of smart_ptrs.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@653 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-06-23 13:06:39 +00:00
parent 56db7cd6a2
commit 66d46db357
37 changed files with 153 additions and 145 deletions

View file

@ -47,13 +47,10 @@ namespace sgpem
private:
static Instantiated_class* _instance;
static Glib::StaticMutex _mutex;
static Glib::StaticMutex SG_DLLLOCAL _mutex;
}; //~ class Singleton
} //~ namespace sgpem
#include "singleton.tcc"
#endif //~ SINGLETON_HH

View file

@ -85,41 +85,41 @@ namespace memory {
smart_ptr& operator=(const smart_ptr& sptr) throw();
inline bool operator==(const smart_ptr& sptr) const throw();
inline bool operator!=(const smart_ptr& sptr) const throw();
bool operator==(const smart_ptr& sptr) const throw();
bool operator!=(const smart_ptr& sptr) const throw();
/** \brief Access to stored object's members
*
* Use this operator to access object
* methods and data. */
inline T* operator->() throw();
T* operator->() throw();
/** \brief Access to stored object's members
*
* Const version of the above operator. */
inline const T* operator->() const throw();
const T* operator->() const throw();
/** \brief Access to stored object
*
* \warning Use with care */
inline T& operator*() throw();
T& operator*() throw();
/** \brief Access to stored object
*
* \warning Use with care */
inline const T& operator*() const throw();
const T& operator*() const throw();
/** \brief Convenience operator for use in predicates
*
* \return true if the stored pointer is valid,
* false otherwise. */
inline operator bool() const throw();
operator bool() const throw();
/** \brief Returns the number of alive references to
* the stored object
*
* \return The number of references */
inline unsigned int alive_refs() const throw();
unsigned int alive_refs() const throw();
/** \brief Dynamic cast the stored pointer
* to another type, returning a smart_ptr
@ -133,7 +133,7 @@ namespace memory {
* the cast isn't successful or doable
*/
template<typename U>
inline smart_ptr<U,isArray> cast_to() throw(std::bad_cast);
smart_ptr<U,isArray> cast_to() throw(std::bad_cast);
/** \brief Dynamic cast the stored pointer
* to another type, returning a smart_ptr
@ -147,7 +147,7 @@ namespace memory {
* the cast isn't successful or doable
*/
template<typename U>
inline const smart_ptr<U,isArray> cast_to() const throw(std::bad_cast);
const smart_ptr<U,isArray> cast_to() const throw(std::bad_cast);
private:
template<typename U>
@ -160,7 +160,5 @@ namespace memory {
};
}
#include "smartp.tcc"
#endif