//Auto-generated by kalyptus. DO NOT EDIT.
namespace Soprano.Error {
    using Soprano;
    using System;
    using Qyoto;

    public interface IErrorCache {
    }
    /// <remarks>
    ///  \class ErrorCache error.h Soprano/Error/ErrorCache
    ///  \brief Core class of %Soprano's exception system.
    ///  The ErrorCache caches Error instances for different threads.
    ///  Each thread has its own last error. This mechanism tries to
    ///  replace the missing exceptions for methods that do not return
    ///  an error code or another value that can state the success of the
    ///  method's operation.
    ///  \author Sebastian Trueg <trueg@kde.org>
    ///  \sa \ref soprano_error_handling
    ///          </remarks>        <short>    \class ErrorCache error.</short>
    [SmokeClass("Soprano::Error::ErrorCache")]
    public class ErrorCache : Object, IErrorCache, IDisposable {
        protected SmokeInvocation interceptor = null;
        private IntPtr smokeObject;
        protected ErrorCache(Type dummy) {}
        protected void CreateProxy() {
            interceptor = new SmokeInvocation(typeof(ErrorCache), this);
        }
        // Error lastError(); >>>> NOT CONVERTED
        // void setError(const Error& arg1); >>>> NOT CONVERTED
        /// <remarks>
        ///  Get the last error that occured in the current thread.
        ///              </remarks>        <short>    Get the last error that occured in the current thread.</short>
        public ErrorCache() : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("ErrorCache", "ErrorCache()", typeof(void));
        }
        /// <remarks>
        ///  Reset the error for the current thread to no error.
        ///              </remarks>        <short>    Reset the error for the current thread to no error.</short>
        protected void ClearError() {
            interceptor.Invoke("clearError", "clearError() const", typeof(void));
        }
        /// <remarks>
        ///  Set the last occured error. This method is const to allow setting
        ///  of errors in all types of methods. The last error is as such a 
        ///  mutable property.
        ///              </remarks>        <short>    Set the last occured error.</short>
        /// <remarks>
        ///  Convenience method to set simple string error messages with a default
        ///  error code ErrorUnknown.
        ///              </remarks>        <short>    Convenience method to set simple string error messages with a default  error code ErrorUnknown.</short>
        protected void SetError(string errorMessage, int code) {
            interceptor.Invoke("setError$$", "setError(const QString&, int) const", typeof(void), typeof(string), errorMessage, typeof(int), code);
        }
        protected void SetError(string errorMessage) {
            interceptor.Invoke("setError$", "setError(const QString&) const", typeof(void), typeof(string), errorMessage);
        }
        ~ErrorCache() {
            interceptor.Invoke("~ErrorCache", "~ErrorCache()", typeof(void));
        }
        public void Dispose() {
            interceptor.Invoke("~ErrorCache", "~ErrorCache()", typeof(void));
        }
    }
}
