Macros.hh 842 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University         //
// All rights reserved.                                                       //
////////////////////////////////////////////////////////////////////////////////

#ifndef ACGL_BASE_MACROS_HH
#define ACGL_BASE_MACROS_HH

//Macro to make a class not copyable
10 11 12 13 14 15
#define ACGL_NOT_COPYABLE(Class) \
private:\
    Class(const Class& other){ }\
    void operator=(Class& other){ }

#define ACGL_SHARED_TYPEDEF(Class) \
16
    typedef std::tr1::shared_ptr<Class> Shared ## Class; \
17 18 19
    typedef std::tr1::shared_ptr<const Class> ConstShared ## Class; \
    typedef std::tr1::weak_ptr<Class> Weak ## Class; \
    typedef std::tr1::weak_ptr<const Class> ConstWeak ## Class;
20 21 22


#endif // MACROS_HH