+++ /dev/null
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#pragma once\r
-\r
-#include "Enums.h"\r
-#include "Result.h"\r
-\r
-using System::Runtime::InteropServices::OutAttribute;\r
-\r
-namespace SlimDX\r
-{\r
- /// <summary>\r
- /// Used to control global options that affect all of SlimDX.\r
- /// </summary>\r
- public ref class Configuration sealed\r
- {\r
- private:\r
- static System::Collections::Generic::Dictionary<Result,ResultWatchFlags>^ m_Watches;\r
- \r
- static Configuration();\r
- \r
- Configuration();\r
- \r
- internal:\r
- static bool TryGetResultWatch( Result result, [Out] ResultWatchFlags% flags );\r
-\r
- public:\r
- /// <summary>\r
- /// Gets or sets whether SlimDX is currently tracking call stacks from object creation. If set to <c>false</c>,\r
- /// objects will not carry a call stack from when they were created. The default value is <c>false</c>.\r
- /// </summary>\r
- /// <remarks>Object tracking is a useful debugging facility, but may have a significant negative\r
- /// impact on performance. The default value is <c>false</c>.</remarks>\r
- static property bool EnableObjectTracking;\r
-\r
- /// <summary>\r
- /// Gets or sets whether SlimDX defaults to throwing exceptions on <see cref="Result">result codes</see>\r
- /// that indicate errors. The default value is <c>true</c>.\r
- /// </summary>\r
- static property bool ThrowOnError;\r
-\r
- /// <summary>\r
- /// Gets or sets whether SlimDX defaults to throwing exceptions when a shader or effect compilation fails. The default value is <c>true</c>.\r
- /// </summary>\r
- static property bool ThrowOnShaderCompileError;\r
-\r
- /// <summary>\r
- /// Gets or sets whether SlimDX detects double disposal of objects. If set to <c>true</c>, SlimDX will throw\r
- /// an <see cref="System::ObjectDisposedException"/> when an already disposed object is disposed. If set to <c>false</c>, double\r
- /// disposals will be silently ignored. The default value is <c>false</c>.\r
- /// </summary>\r
- static property bool DetectDoubleDispose;\r
-\r
- /// <summary>\r
- /// Gets or sets the SlimDX wide timer object.\r
- /// </summary>\r
- /// <remarks>This Timer is automatically created and started when SlimDX is loaded.</remarks>\r
- static property System::Diagnostics::Stopwatch^ Timer;\r
-\r
- /// <summary>\r
- /// Adds a watch indicating the action to be taken when a method returns the\r
- /// specified <see cref="Result">result code</see>.\r
- /// </summary>\r
- /// <param name="result">The result code to watch for.</param>\r
- /// <param name="flags">The action to take when the specified result code occurs.</param>\r
- static void AddResultWatch( Result result, ResultWatchFlags flags );\r
-\r
- /// <summary>\r
- /// Removes a watch on the specified <see cref="Result">result code</see>.\r
- /// If no watch was set, this call is ignored.\r
- /// </summary>\r
- /// <param>The result code to stop watching.</param>\r
- static void RemoveResultWatch( Result result );\r
-\r
- /// <summary>\r
- /// Clears out all watches on all <see cref="Result">result codes</see>.\r
- /// </summary>\r
- static void ClearResultWatches();\r
- };\r
-}
\ No newline at end of file