assimp/port/Assimp.NET/Assimp.NET_CS/Logger.cs

105 lines
3.2 KiB
C#

/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.40
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
using System;
using System.Runtime.InteropServices;
public class Logger : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal Logger(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(Logger obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~Logger() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
Assimp_NETPINVOKE.delete_Logger(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public void debug(string message) {
Assimp_NETPINVOKE.Logger_debug(swigCPtr, message);
if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve();
}
public void info(string message) {
Assimp_NETPINVOKE.Logger_info(swigCPtr, message);
if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve();
}
public void warn(string message) {
Assimp_NETPINVOKE.Logger_warn(swigCPtr, message);
if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve();
}
public void error(string message) {
Assimp_NETPINVOKE.Logger_error(swigCPtr, message);
if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve();
}
public void setLogSeverity(Logger.LogSeverity log_severity) {
Assimp_NETPINVOKE.Logger_setLogSeverity(swigCPtr, (int)log_severity);
}
public Logger.LogSeverity getLogSeverity() {
Logger.LogSeverity ret = (Logger.LogSeverity)Assimp_NETPINVOKE.Logger_getLogSeverity(swigCPtr);
return ret;
}
public virtual bool attachStream(LogStream pStream, uint severity) {
bool ret = Assimp_NETPINVOKE.Logger_attachStream__SWIG_0(swigCPtr, LogStream.getCPtr(pStream), severity);
return ret;
}
public virtual bool attachStream(LogStream pStream) {
bool ret = Assimp_NETPINVOKE.Logger_attachStream__SWIG_1(swigCPtr, LogStream.getCPtr(pStream));
return ret;
}
public virtual bool detatchStream(LogStream pStream, uint severity) {
bool ret = Assimp_NETPINVOKE.Logger_detatchStream__SWIG_0(swigCPtr, LogStream.getCPtr(pStream), severity);
return ret;
}
public virtual bool detatchStream(LogStream pStream) {
bool ret = Assimp_NETPINVOKE.Logger_detatchStream__SWIG_1(swigCPtr, LogStream.getCPtr(pStream));
return ret;
}
public enum LogSeverity {
NORMAL,
VERBOSE
}
public enum ErrorSeverity {
DEBUGGING = 1,
INFO = 2,
WARN = 4,
ERR = 8
}
}