Home | History | Annotate | Download | only in base

Lines Matching refs:Type

13 // Default traits for Singleton<Type>. Calls operator new and operator delete on
16 template<typename Type>
19 static Type* New() {
20 // The parenthesis is very important here; it forces POD type
22 return new Type();
26 static void Delete(Type* x) {
36 // Alternate traits for use with the Singleton<Type>. Identical to
39 template<typename Type>
40 struct LeakySingletonTraits : public DefaultSingletonTraits<Type> {
45 // The Singleton<Type, Traits, DifferentiatingType> class manages a single
46 // instance of Type which will be created on first use and will be destroyed at
62 // or at global level since it is acting as a POD type.
64 // This class is itself thread-safe. The underlying Type must of course be
73 // object of this type to be instantiated. AtExitManager mimics the semantics
105 template <typename Type,
106 typename Traits = DefaultSingletonTraits<Type>,
107 typename DifferentiatingType = Type>
114 static Type* get() {
123 return reinterpret_cast<Type*>(value);
133 Type* newval = Traits::New();
164 return reinterpret_cast<Type*>(value);
168 Type& operator*() {
172 Type* operator->() {
182 Traits::Delete(reinterpret_cast<Type*>(
188 template <typename Type, typename Traits, typename DifferentiatingType>
189 base::subtle::AtomicWord Singleton<Type, Traits, DifferentiatingType>::