AndroMeta  2.0.0
AndroMeta/include/AndroMeta/MObjectBase.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009-2012 AndroMeta LLC. All rights reserved.
00003  *
00004  * AndroMeta LLC retains all intellectual property and proprietary 
00005  * rights to this software and related documentation and any modifications 
00006  * thereto.  Any use, reproduction, disclosure, or distribution of this 
00007  * software and related documentation without an express license agreement 
00008  * from AndroMeta LLC is strictly prohibited.
00009  * 
00010  */
00011 
00018 #ifndef ANDROMETA_M_OBJECT_BASE_H
00019 #define ANDROMETA_M_OBJECT_BASE_H
00020 
00021 #include <AndroMeta/MVar.h>
00022 
00023 namespace Meta{
00024 
00034   class MObjectBase{
00035   public:
00036     enum RestoreOpt{
00037       Restore
00038     };
00039 
00040     typedef uint32_t ClassIdType;
00041 
00042     MObjectBase();
00043 
00047     MObjectBase(const MVar& v, RestoreOpt opt);
00048 
00049     virtual ~MObjectBase();
00050     
00056     virtual bool instanceOf(ClassIdType classId) const;
00057 
00061     virtual void store(mvar& v) const;
00062 
00063     virtual void ref();
00064 
00065     virtual size_t deref();
00066 
00067     virtual const mstr& className() const;
00068 
00069     virtual void setClassName(const mstr& name);
00070     
00071     virtual void enableRestricted();
00072     
00073     virtual bool isRestricted() const;
00074 
00078     virtual MObjectBase* clone() const;
00079   };
00080 
00081 } // end namespace Meta
00082 
00083 #endif // ANDROMETA_M_OBJECT_BASE_H