Version: 8.3.0
YACS::BASES Namespace Reference

Classes

class  AlternateThreadPT
 This class provides a mechanism to run two threads alternately. More...
 
class  AutoLocker
 
class  AutoRefCnt
 
class  AutoCppPtr
 
class  DynLibLoaderGNU
 
class  DynLibLoaderWin
 
class  MutexPT
 
class  ConditionPT
 
class  SemaphorePT
 
class  ThreadPT
 

Functions

template<class T , class U >
YACS::BASES::AutoRefCnt< U > DynamicCast (typename YACS::BASES::AutoRefCnt< T > &autoSubPtr) throw ()
 
template<class T , class U >
YACS::BASES::AutoRefCnt< U > DynamicCastSafe (typename YACS::BASES::AutoRefCnt< T > &autoSubPtr)
 

Function Documentation

template<class T , class U >
YACS::BASES::AutoRefCnt<U> YACS::BASES::DynamicCast ( typename YACS::BASES::AutoRefCnt< T > &  autoSubPtr) throw ()

Definition at line 55 of file AutoRefCnt.hxx.

References PMMLBasicsTestLauncher::ret.

56  {
57  T *subPtr(autoSubPtr);
58  U *ptr(dynamic_cast<U *>(subPtr));
59  typename YACS::BASES::AutoRefCnt<U> ret(ptr);
60  if(ptr)
61  ptr->incrRef();
62  return ret;
63  }
template<class T , class U >
YACS::BASES::AutoRefCnt<U> YACS::BASES::DynamicCastSafe ( typename YACS::BASES::AutoRefCnt< T > &  autoSubPtr)

Definition at line 66 of file AutoRefCnt.hxx.

References PMMLBasicsTestLauncher::ret.

67  {
68  T *subPtr(autoSubPtr);
69  U *ptr(dynamic_cast<U *>(subPtr));
70  if(subPtr && !ptr)
71  throw Exception("DynamicCastSafe : U is not a subtype of T !");
72  typename YACS::BASES::AutoRefCnt<U> ret(ptr);
73  if(ptr)
74  ptr->incrRef();
75  return ret;
76  }