//**************************************************************************************************
//
// BASE MEMBERS FOR DISPOSABLE OBJECT:
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// RuntimeForStatic base library | C+- (SysRoutine) | Author: Sergei Y.Kitáev
#pragma once
#include "include_restrictions.h"
namespace RuntimeForStatic {

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$Disposable"-CLASS:
//
//==================================================================================================
class $Disposable
{
protected:
   $Disposable();
   $Disposable(bool interlockedAccess);
public:
   ~$Disposable();
   bool Dispose();
public:
   __declspec(property(get = GetIsValidDisposable  )) bool IsValidDisposable;
   __declspec(property(get = GetDisposed           )) bool Disposed;
   __declspec(property(get = GetDisposing          )) bool Disposing;
public:
   bool GetIsValidDisposable() const;
   bool GetDisposed() const;
   bool GetDisposing() const;
   void VerifyValidDisposable($O) const;
protected:
   __declspec(property(get = GetWasCreated         )) bool WasCreated;
   __declspec(property(get = GetInterlockedAccess  )) bool InterlockedAccess;
protected:
   bool GetInterlockedAccess() const;
   bool GetWasCreated() const;
   void ValidateDisposable($CI_REF);
   void InvalidateDisposable();
   virtual void DoDispose($CI_REF) $nop;
private:
#include "..\private\Disposable.private.h"
}; // $Disposable
//==================================================================================================

} // RuntimeForStatic
