macad.occt解析extentions,tkernel

2024-04-12 06:12

本文主要是介绍macad.occt解析extentions,tkernel,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1.

#include "OcctPCH.h"  // 包含预编译头文件 OcctPCH.h// 包含生成的 BRep 和 TopoDS 头文件
#include "..\Generated\BRep.h"
#include "..\Generated\TopoDS.h"// 返回 BRep_TEdge 对象的曲线表示列表
System::Collections::Generic::List<Macad::Occt::BRep_CurveRepresentation^>^ Macad::Occt::BRep_TEdge::CurvesList()
{// 获取本地实例的曲线列表const auto curves = NativeInstance->Curves();// 创建一个用于存储曲线表示的 List 对象auto list = gcnew System::Collections::Generic::List<Macad::Occt::BRep_CurveRepresentation^>(curves.Size());// 迭代曲线列表::BRep_ListIteratorOfListOfCurveRepresentation it;for (it.Initialize(curves); it.More(); it.Next())// 将每个曲线表示添加到 List 中list->Add(Macad::Occt::BRep_CurveRepresentation::CreateDowncasted(it.Value().get()));// 返回曲线列表return list;
}
  • BRep_TEdge::CurvesList() 方法返回 BRep_TEdge 对象的曲线表示列表。
  • NativeInstance->Curves() 获取本地实例的曲线列表。
  • 使用 BRep_ListIteratorOfListOfCurveRepresentation 迭代曲线列表。
  • list->Add(...) 将每个曲线表示添加到 List 中。
  • 返回包含曲线列表的 List 对象。

2.

// 包含预编译头文件和生成的头文件
#include "OcctPCH.h"
#include "..\Generated\Geom2dAPI.h"// 定义函数 Params,用于获取相交曲线的参数
System::Tuple<double,double>^ Macad::Occt::Geom2dAPI_InterCurveCurve::Params(const int Index)
{// 检查参数索引是否有效,如果不在有效范围内,抛出异常if(Index < 1 || Index > NativeInstance->NbPoints())throw ::Standard_OutOfRange("Geom2dAPI_InterCurveCurve::Param");// 获取相交点对象::IntRes2d_IntersectionPoint interPnt = NativeInstance->Intersector().Point(Index);// 创建并返回包含相交点参数的 Tuple 对象return gcnew System::Tuple<double,double>(interPnt.ParamOnFirst(), interPnt.ParamOnSecond());
}

这段代码是一个函数定义,用于获取两条曲线之间相交点的参数。具体来说,它的作用是:

  1. 检查传入的参数索引是否在有效范围内,如果超出范围则抛出异常。
  2. 获取相交计算器的引用,并从中获取相交点对象。
  3. 从相交点对象中获取相交点在两条曲线上的参数值。
  4. 将参数值封装到 System::Tuple<double,double> 对象中,并返回。

总之,这段代码的主要作用是提供了一个函数,可以方便地获取相交曲线上的参数值。

3.

#include "OcctPCH.h"               // 包含预编译头文件
#include "..\Generated\TopTools.h" // 包含生成的头文件
#include "..\Generated\TopoDS.h"   // 包含生成的头文件// 定义一个函数,用于将 TopTools_ListOfShape 类型对象转换为 List<TopoDS_Shape^> 类型对象
System::Collections::Generic::List<Macad::Occt::TopoDS_Shape^>^ Macad::Occt::TopTools_ListOfShape::ToList()
{// 创建一个 List<TopoDS_Shape^> 对象auto list = gcnew System::Collections::Generic::List<Macad::Occt::TopoDS_Shape^>(Size());// 创建 TopTools_ListIteratorOfListOfShape 迭代器::TopTools_ListIteratorOfListOfShape it;// 使用迭代器遍历 TopTools_ListOfShape 对象中的每个元素for (it.Initialize(*NativeInstance); it.More(); it.Next()){// 将每个元素转换为 TopoDS_Shape 对象,并添加到 list 中list->Add(gcnew Macad::Occt::TopoDS_Shape(new ::TopoDS_Shape(it.Value())));}// 返回转换后的 List<TopoDS_Shape^> 对象return list;
}

整段代码的作用是定义了一个函数 ToList(),用于将 TopTools_ListOfShape 类型的对象转换为 System::Collections::Generic::List<Macad::Occt::TopoDS_Shape^> 类型的对象。具体实现包括遍历 TopTools_ListOfShape 对象的元素,并将每个元素转换为 TopoDS_Shape 对象,然后添加到一个新的 List 中,并最终返回这个新的 List 对象。

4.

#include "OcctPCH.h"                   // 包含预编译头文件
#include "..\Generated\V3d.h"          // 包含生成的头文件
#include "..\Generated\Graphic3d.h"    // 包含生成的头文件// 定义函数 ChangeRenderingParams,用于更改渲染参数
Macad::Occt::Graphic3d_RenderingParams^ Macad::Occt::V3d_View::ChangeRenderingParams()
{// 调用 NativeInstance 的 ChangeRenderingParams 方法,并使用其返回值构造 Graphic3d_RenderingParams 对象,然后返回该对象return gcnew Macad::Occt::Graphic3d_RenderingParams(NativeInstance->ChangeRenderingParams());
}

这段代码定义了一个函数 ChangeRenderingParams(),用于更改视图的渲染参数,并返回一个 Graphic3d_RenderingParams 对象。

5.generated

// 包含预编译头文件和相关头文件
#include "OcctPCH.h"
#include "Message.h"// 使用命名空间 System::Runtime::InteropServices
using namespace System::Runtime::InteropServices;// 包含一些其他头文件,如 NCollection.h、TCollection.h 和 Standard.h
#include "NCollection.h"
#include "TCollection.h"
#include "Standard.h"//---------------------------------------------------------------------
//  Class  Message_ListOfAlert
//---------------------------------------------------------------------// 构造函数,初始化一个空的 Message_ListOfAlert 对象
Macad::Occt::Message_ListOfAlert::Message_ListOfAlert(): Macad::Occt::NCollection_BaseList(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Message_ListOfAlert();
}// 构造函数,使用指定的内存分配器初始化一个空的 Message_ListOfAlert 对象
Macad::Occt::Message_ListOfAlert::Message_ListOfAlert(Macad::Occt::NCollection_BaseAllocator^ theAllocator): Macad::Occt::NCollection_BaseList(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Message_ListOfAlert(Handle(::NCollection_BaseAllocator)(theAllocator->NativeInstance));
}// 构造函数,使用另一个 Message_ListOfAlert 对象进行初始化
Macad::Occt::Message_ListOfAlert::Message_ListOfAlert(Macad::Occt::Message_ListOfAlert^ theOther): Macad::Occt::NCollection_BaseList(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Message_ListOfAlert(*(::Message_ListOfAlert*)theOther->NativeInstance);
}// 获取列表的大小
int Macad::Occt::Message_ListOfAlert::Size()
{int _result = ((::Message_ListOfAlert*)_NativeInstance)->Size();return _result;
}// 将列表赋值为另一个列表
Macad::Occt::Message_ListOfAlert^ Macad::Occt::Message_ListOfAlert::Assign(Macad::Occt::Message_ListOfAlert^ theOther)
{::Message_ListOfAlert* _result = new ::Message_ListOfAlert();*_result = ((::Message_ListOfAlert*)_NativeInstance)->Assign(*(::Message_ListOfAlert*)theOther->NativeInstance);return _result == nullptr ? nullptr : gcnew Macad::Occt::Message_ListOfAlert(_result);
}// 清空列表,使用指定的内存分配器
void Macad::Occt::Message_ListOfAlert::Clear(Macad::Occt::NCollection_BaseAllocator^ theAllocator)
{((::Message_ListOfAlert*)_NativeInstance)->Clear(Handle(::NCollection_BaseAllocator)(theAllocator->NativeInstance));
}// 清空列表
void Macad::Occt::Message_ListOfAlert::Clear()
{((::Message_ListOfAlert*)_NativeInstance)->Clear(0L);
}// 将另一个列表追加到当前列表末尾
void Macad::Occt::Message_ListOfAlert::Append(Macad::Occt::Message_ListOfAlert^ theOther)
{((::Message_ListOfAlert*)_NativeInstance)->Append(*(::Message_ListOfAlert*)theOther->NativeInstance);
}// 将另一个列表追加到当前列表开头
void Macad::Occt::Message_ListOfAlert::Prepend(Macad::Occt::Message_ListOfAlert^ theOther)
{((::Message_ListOfAlert*)_NativeInstance)->Prepend(*(::Message_ListOfAlert*)theOther->NativeInstance);
}// 移除列表的第一个元素
void Macad::Occt::Message_ListOfAlert::RemoveFirst()
{((::Message_ListOfAlert*)_NativeInstance)->RemoveFirst();
}// 反转列表中的元素顺序
void Macad::Occt::Message_ListOfAlert::Reverse()
{((::Message_ListOfAlert*)_NativeInstance)->Reverse();
}//---------------------------------------------------------------------
//  Class  Message_Printer
//---------------------------------------------------------------------// 构造函数,抛出未实现异常,因为原生类是抽象类
Macad::Occt::Message_Printer::Message_Printer(Macad::Occt::Message_Printer^ parameter1): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{throw gcnew System::NotImplementedException("Native class is abstract");
}// 获取跟踪级别
Macad::Occt::Message_Gravity Macad::Occt::Message_Printer::GetTraceLevel()
{::Message_Gravity _result = ((::Message_Printer*)_NativeInstance)->GetTraceLevel();return (Macad::Occt::Message_Gravity)_result;
}// 设置跟踪级别
void Macad::Occt::Message_Printer::SetTraceLevel(Macad::Occt::Message_Gravity theTraceLevel)
{((::Message_Printer*)_NativeInstance)->SetTraceLevel((::Message_Gravity)theTraceLevel);
}// 发送消息
void Macad::Occt::Message_Printer::Send(Macad::Occt::TCollection_ExtendedString^ theString, Macad::Occt::Message_Gravity theGravity)
{((::Message_Printer*)_NativeInstance)->Send(*(::TCollection_ExtendedString*)theString->NativeInstance, (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Printer::Send(System::String^ theString, Macad::Occt::Message_Gravity theGravity)
{const char* sz_theString = (char*)(void*)Marshal::StringToHGlobalAnsi(theString);((::Message_Printer*)_NativeInstance)->Send(sz_theString, (::Message_Gravity)theGravity);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theString);
}// 发送消息
void Macad::Occt::Message_Printer::Send(Macad::Occt::TCollection_AsciiString^ theString, Macad::Occt::Message_Gravity theGravity)
{((::Message_Printer*)_NativeInstance)->Send(*(::TCollection_AsciiString*)theString->NativeInstance, (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Printer::SendObject(Macad::Occt::Standard_Transient^ theObject, Macad::Occt::Message_Gravity theGravity)
{((::Message_Printer*)_NativeInstance)->SendObject(Handle(::Standard_Transient)(theObject->NativeInstance), (::Message_Gravity)theGravity);
}// 创建 Downcasted 的 Message_Printer 对象
Macad::Occt::Message_Printer^ Macad::Occt::Message_Printer::CreateDowncasted(::Message_Printer* instance)
{return gcnew Macad::Occt::Message_Printer(instance);
}//---------------------------------------------------------------------
//  Class  Message_Messenger
//---------------------------------------------------------------------// 构造函数,初始化一个空的 Message_Messenger 对象
Macad::Occt::Message_Messenger::Message_Messenger(): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Message_Messenger();
}// 构造函数,使用给定的 Message_Printer 初始化一个 Message_Messenger 对象
Macad::Occt::Message_Messenger::Message_Messenger(Macad::Occt::Message_Printer^ thePrinter): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Message_Messenger(Handle(::Message_Printer)(thePrinter->NativeInstance));
}// 构造函数,使用另一个 Message_Messenger 对象进行初始化
Macad::Occt::Message_Messenger::Message_Messenger(Macad::Occt::Message_Messenger^ parameter1): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Message_Messenger(*(::Message_Messenger*)parameter1->NativeInstance);
}// 添加打印机到 Messenger
bool Macad::Occt::Message_Messenger::AddPrinter(Macad::Occt::Message_Printer^ thePrinter)
{bool _result = ((::Message_Messenger*)_NativeInstance)->AddPrinter(Handle(::Message_Printer)(thePrinter->NativeInstance));return _result;
}// 从 Messenger 中移除打印机
bool Macad::Occt::Message_Messenger::RemovePrinter(Macad::Occt::Message_Printer^ thePrinter)
{bool _result = ((::Message_Messenger*)_NativeInstance)->RemovePrinter(Handle(::Message_Printer)(thePrinter->NativeInstance));return _result;
}// 发送消息
void Macad::Occt::Message_Messenger::Send(System::String^ theString, Macad::Occt::Message_Gravity theGravity)
{const char* sz_theString = (char*)(void*)Marshal::StringToHGlobalAnsi(theString);((::Message_Messenger*)_NativeInstance)->Send(sz_theString, (::Message_Gravity)theGravity);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theString);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(System::String^ theString)
{const char* sz_theString = (char*)(void*)Marshal::StringToHGlobalAnsi(theString);((::Message_Messenger*)_NativeInstance)->Send(sz_theString, Message_Warning);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theString);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_AsciiString^ theString, Macad::Occt::Message_Gravity theGravity)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_AsciiString*)theString->NativeInstance, (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_AsciiString^ theString)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_AsciiString*)theString->NativeInstance, Message_Warning);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_ExtendedString^ theString, Macad::Occt::Message_Gravity theGravity)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_ExtendedString*)theString->NativeInstance, (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_ExtendedString^ theString)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_ExtendedString*)theString->NativeInstance, Message_Warning);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::Standard_Transient^ theObject, Macad::Occt::Message_Gravity theGravity)
{((::Message_Messenger*)_NativeInstance)->Send(Handle(::Standard_Transient)(theObject->NativeInstance), (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::Standard_Transient^ theObject)
{((::Message_Messenger*)_NativeInstance)->Send(Handle(::Standard_Transient)(theObject->NativeInstance), Message_Warning);
}// 发送失败消息
void Macad::Occt::Message_Messenger::SendFail(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendFail(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送警告消息
void Macad::Occt::Message_Messenger::SendAlarm(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendAlarm(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送警告消息
void Macad::Occt::Message_Messenger::SendWarning(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendWarning(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送信息消息
void Macad::Occt::Message_Messenger::SendInfo(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendInfo(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送跟踪消息
void Macad::Occt::Message_Messenger::SendTrace(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendTrace(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 输出消息为 JSON 格式
void Macad::Occt::Message_Messenger::DumpJson(System::IO::TextWriter^ theOStream, int theDepth)
{std::ostringstream oss_theOStream;((::Message_Messenger*)_NativeInstance)->DumpJson(oss_theOStream, theDepth);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}// 输出消息为 JSON 格式
void Macad::Occt::Message_Messenger::DumpJson(System::IO::TextWriter^ theOStream)
{std::ostringstream oss_theOStream;((::Message_Messenger*)_NativeInstance)->DumpJson(oss_theOStream, -1);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}// 创建下转型对象
Macad::Occt::Message_Messenger^ Macad::Occt::Message_Messenger::CreateDowncasted(::Message_Messenger* instance)
{return gcnew Macad::Occt::Message_Messenger(instance);
}// 构造函数,初始化一个空的 Message_Messenger 对象
Macad::Occt::Message_Messenger::Message_Messenger(): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Message_Messenger();
}// 构造函数,使用给定的 Message_Printer 初始化一个 Message_Messenger 对象
Macad::Occt::Message_Messenger::Message_Messenger(Macad::Occt::Message_Printer^ thePrinter): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Message_Messenger(Handle(::Message_Printer)(thePrinter->NativeInstance));
}// 构造函数,使用另一个 Message_Messenger 对象进行初始化
Macad::Occt::Message_Messenger::Message_Messenger(Macad::Occt::Message_Messenger^ parameter1): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Message_Messenger(*(::Message_Messenger*)parameter1->NativeInstance);
}// 添加打印机到 Messenger
bool Macad::Occt::Message_Messenger::AddPrinter(Macad::Occt::Message_Printer^ thePrinter)
{bool _result = ((::Message_Messenger*)_NativeInstance)->AddPrinter(Handle(::Message_Printer)(thePrinter->NativeInstance));return _result;
}// 从 Messenger 中移除打印机
bool Macad::Occt::Message_Messenger::RemovePrinter(Macad::Occt::Message_Printer^ thePrinter)
{bool _result = ((::Message_Messenger*)_NativeInstance)->RemovePrinter(Handle(::Message_Printer)(thePrinter->NativeInstance));return _result;
}// 发送消息
void Macad::Occt::Message_Messenger::Send(System::String^ theString, Macad::Occt::Message_Gravity theGravity)
{const char* sz_theString = (char*)(void*)Marshal::StringToHGlobalAnsi(theString);((::Message_Messenger*)_NativeInstance)->Send(sz_theString, (::Message_Gravity)theGravity);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theString);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(System::String^ theString)
{const char* sz_theString = (char*)(void*)Marshal::StringToHGlobalAnsi(theString);((::Message_Messenger*)_NativeInstance)->Send(sz_theString, Message_Warning);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theString);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_AsciiString^ theString, Macad::Occt::Message_Gravity theGravity)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_AsciiString*)theString->NativeInstance, (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_AsciiString^ theString)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_AsciiString*)theString->NativeInstance, Message_Warning);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_ExtendedString^ theString, Macad::Occt::Message_Gravity theGravity)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_ExtendedString*)theString->NativeInstance, (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::TCollection_ExtendedString^ theString)
{((::Message_Messenger*)_NativeInstance)->Send(*(::TCollection_ExtendedString*)theString->NativeInstance, Message_Warning);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::Standard_Transient^ theObject, Macad::Occt::Message_Gravity theGravity)
{((::Message_Messenger*)_NativeInstance)->Send(Handle(::Standard_Transient)(theObject->NativeInstance), (::Message_Gravity)theGravity);
}// 发送消息
void Macad::Occt::Message_Messenger::Send(Macad::Occt::Standard_Transient^ theObject)
{((::Message_Messenger*)_NativeInstance)->Send(Handle(::Standard_Transient)(theObject->NativeInstance), Message_Warning);
}// 发送失败消息
void Macad::Occt::Message_Messenger::SendFail(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendFail(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送警告消息
void Macad::Occt::Message_Messenger::SendAlarm(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendAlarm(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送警告消息
void Macad::Occt::Message_Messenger::SendWarning(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendWarning(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送信息消息
void Macad::Occt::Message_Messenger::SendInfo(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendInfo(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 发送跟踪消息
void Macad::Occt::Message_Messenger::SendTrace(Macad::Occt::TCollection_AsciiString^ theMessage)
{((::Message_Messenger*)_NativeInstance)->SendTrace(*(::TCollection_AsciiString*)theMessage->NativeInstance);
}// 输出消息为 JSON 格式
void Macad::Occt::Message_Messenger::DumpJson(System::IO::TextWriter^ theOStream, int theDepth)
{std::ostringstream oss_theOStream;((::Message_Messenger*)_NativeInstance)->DumpJson(oss_theOStream, theDepth);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}// 输出消息为 JSON 格式
void Macad::Occt::Message_Messenger::DumpJson(System::IO::TextWriter^ theOStream)
{std::ostringstream oss_theOStream;((::Message_Messenger*)_NativeInstance)->DumpJson(oss_theOStream, -1);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}// 创建下转型对象
Macad::Occt::Message_Messenger^ Macad::Occt::Message_Messenger::CreateDowncasted(::Message_Messenger* instance)
{return gcnew Macad::Occt::Message_Messenger(instance);
}

这段代码是针对 OpenCascade(OCCT)库中的消息系统进行了 C++/CLI 封装,提供了对消息打印和传递的功能。主要包括了以下几个类和功能:

  1. Message_ListOfAlert 类:封装了 OCCT 中的 Message_ListOfAlert 类,提供了操作 Alert 列表的方法,如添加、移除、清空等。

  2. Message_Printer 类:封装了 OCCT 中的 Message_Printer 类,用于处理消息的输出。它提供了设置消息的重要性级别、发送消息的方法,并且支持多种字符串格式。

  3. Message_Messenger 类:封装了 OCCT 中的 Message_Messenger 类,用于管理消息的传递。它可以添加和移除打印机(即消息输出设备),发送各种类型的消息,以及输出消息的 JSON 格式。

  4. Message_Report 类:封装了 OCCT 中的 Message_Report 类,用于管理和处理消息报告。它可以激活或停用特定的报告、合并报告、设置消息限制等。

  5. Message 类:封装了 OCCT 中的一些消息相关的静态方法,用于发送特定类型的消息、获取默认的消息传递对象和消息报告对象等。

这段代码的作用是将 OCCT 中的消息系统封装为 C++/CLI 类,使得开发人员可以在 .NET 环境下方便地使用 OCCT 的消息功能。

6.

// Generated wrapper code for package NCollection// 包含预编译的头文件 OcctPCH.h 和 NCollection.h
#include "OcctPCH.h"
#include "NCollection.h"// 引入 System::Runtime::InteropServices 命名空间,用于 Marshal 类的使用
using namespace System::Runtime::InteropServices;// 包含一系列 OCCT 的头文件
#include "gp.h"
#include "TColStd.h"
#include "Message.h"
#include "IntAna.h"
#include "TopoDS.h"
#include "BRep.h"
#include "TopTools.h"
#include "BRepCheck.h"
#include "Graphic3d.h"
#include "PrsMgr.h"
#include "SelectMgr.h"
#include "Prs3d.h"
#include "AIS.h"
#include "V3d.h"
#include "Image.h"//---------------------------------------------------------------------
//  Class  NCollection_CellFilter_InspectorXYZ
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_CellFilter_InspectorXYZ::NCollection_CellFilter_InspectorXYZ(): Macad::Occt::BaseClass<::NCollection_CellFilter_InspectorXYZ>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_CellFilter_InspectorXYZ();
}// 拷贝构造函数的实现
Macad::Occt::NCollection_CellFilter_InspectorXYZ::NCollection_CellFilter_InspectorXYZ(Macad::Occt::NCollection_CellFilter_InspectorXYZ^ parameter1): Macad::Occt::BaseClass<::NCollection_CellFilter_InspectorXYZ>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_CellFilter_InspectorXYZ(*(::NCollection_CellFilter_InspectorXYZ*)parameter1->NativeInstance);
}// 对 Coord 方法进行封装,处理 XYZ 坐标
double Macad::Occt::NCollection_CellFilter_InspectorXYZ::Coord(int i, Macad::Occt::XYZ thePnt)
{pin_ptr<Macad::Occt::XYZ> pp_thePnt = &thePnt;double _result = ::NCollection_CellFilter_InspectorXYZ::Coord(i, *(gp_XYZ*)pp_thePnt);return _result;
}// 对 Shift 方法进行封装,处理 XYZ 坐标的平移
Macad::Occt::XYZ Macad::Occt::NCollection_CellFilter_InspectorXYZ::Shift(Macad::Occt::XYZ thePnt, double theTol)
{pin_ptr<Macad::Occt::XYZ> pp_thePnt = &thePnt;::gp_XYZ _nativeResult = ((::NCollection_CellFilter_InspectorXYZ*)_NativeInstance)->Shift(*(gp_XYZ*)pp_thePnt, theTol);return Macad::Occt::XYZ(_nativeResult);
}//---------------------------------------------------------------------
//  Class  NCollection_CellFilter_InspectorXY
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_CellFilter_InspectorXY::NCollection_CellFilter_InspectorXY(): Macad::Occt::BaseClass<::NCollection_CellFilter_InspectorXY>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_CellFilter_InspectorXY();
}// 拷贝构造函数的实现
Macad::Occt::NCollection_CellFilter_InspectorXY::NCollection_CellFilter_InspectorXY(Macad::Occt::NCollection_CellFilter_InspectorXY^ parameter1): Macad::Occt::BaseClass<::NCollection_CellFilter_InspectorXY>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_CellFilter_InspectorXY(*(::NCollection_CellFilter_InspectorXY*)parameter1->NativeInstance);
}// 对 Coord 方法进行封装,处理 XY 坐标
double Macad::Occt::NCollection_CellFilter_InspectorXY::Coord(int i, Macad::Occt::XY thePnt)
{pin_ptr<Macad::Occt::XY> pp_thePnt = &thePnt;double _result = ::NCollection_CellFilter_InspectorXY::Coord(i, *(gp_XY*)pp_thePnt);return _result;
}// 对 Shift 方法进行封装,处理 XY 坐标的平移
Macad::Occt::XY Macad::Occt::NCollection_CellFilter_InspectorXY::Shift(Macad::Occt::XY thePnt, double theTol)
{pin_ptr<Macad::Occt::XY> pp_thePnt = &thePnt;::gp_XY _nativeResult = ((::NCollection_CellFilter_InspectorXY*)_NativeInstance)->Shift(*(gp_XY*)pp_thePnt, theTol);return Macad::Occt::XY(_nativeResult);
}//---------------------------------------------------------------------
//  Class  NCollection_BaseAllocator
//---------------------------------------------------------------------// Allocate 方法的实现
System::IntPtr Macad::Occt::NCollection_BaseAllocator::Allocate(long long unsigned int size)
{void* _result = ((::NCollection_BaseAllocator*)_NativeInstance)->Allocate(size);return System::IntPtr(_result);
}// Free 方法的实现
void Macad::Occt::NCollection_BaseAllocator::Free(System::IntPtr anAddress)
{((::NCollection_BaseAllocator*)_NativeInstance)->Free(anAddress.ToPointer());
}// CommonBaseAllocator 方法的实现
Macad::Occt::NCollection_BaseAllocator^ Macad::Occt::NCollection_BaseAllocator::CommonBaseAllocator()
{Handle(::NCollection_BaseAllocator) _result = ::NCollection_BaseAllocator::CommonBaseAllocator();return _result.IsNull() ? nullptr : Macad::Occt::NCollection_BaseAllocator::CreateDowncasted(_result.get());
}// StandardCallBack 方法的实现
void Macad::Occt::NCollection_BaseAllocator::StandardCallBack(bool theIsAlloc, System::IntPtr theStorage, long long unsigned int theRoundSize, long long unsigned int theSize)
{::NCollection_BaseAllocator::StandardCallBack(theIsAlloc, theStorage.ToPointer(), theRoundSize, theSize);
}// PrintMemUsageStatistics 方法的实现
void Macad::Occt::NCollection_BaseAllocator::PrintMemUsageStatistics()
{::NCollection_BaseAllocator::PrintMemUsageStatistics();
}// CreateDowncasted 方法的实现
Macad::Occt::NCollection_BaseAllocator^ Macad::Occt::NCollection_BaseAllocator::CreateDowncasted(::NCollection_BaseAllocator* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::NCollection_AccAllocator)))return Macad::Occt::NCollection_AccAllocator::CreateDowncasted((::NCollection_AccAllocator*)instance);if (instance->IsKind(STANDARD_TYPE(::NCollection_AlignedAllocator)))return Macad::Occt::NCollection_AlignedAllocator::CreateDowncasted((::NCollection_AlignedAllocator*)instance);if (instance->IsKind(STANDARD_TYPE(::NCollection_IncAllocator)))return Macad::Occt::NCollection_IncAllocator::CreateDowncasted((::NCollection_IncAllocator*)instance);if (instance->IsKind(STANDARD_TYPE(::NCollection_HeapAllocator)))return Macad::Occt::NCollection_HeapAllocator::CreateDowncasted((::NCollection_HeapAllocator*)instance);if (instance->IsKind(STANDARD_TYPE(::NCollection_WinHeapAllocator)))return Macad::Occt::NCollection_WinHeapAllocator::CreateDowncasted((::NCollection_WinHeapAllocator*)instance);return gcnew Macad::Occt::NCollection_BaseAllocator( instance );
}//---------------------------------------------------------------------
//  Class  NCollection_BaseList
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_BaseList::NCollection_BaseList(Macad::Occt::NCollection_BaseList^ parameter1): Macad::Occt::BaseClass<::NCollection_BaseList>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_BaseList(*(::NCollection_BaseList*)parameter1->NativeInstance);
}// Extent 方法的实现
int Macad::Occt::NCollection_BaseList::Extent()
{int _result = ((::NCollection_BaseList*)_NativeInstance)->Extent();return _result;
}// IsEmpty 方法的实现
bool Macad::Occt::NCollection_BaseList::IsEmpty()
{bool _result = ((::NCollection_BaseList*)_NativeInstance)->IsEmpty();return _result;
}// Allocator 方法的实现
Macad::Occt::NCollection_BaseAllocator^ Macad::Occt::NCollection_BaseList::Allocator()
{Handle(::NCollection_BaseAllocator) _result = ((::NCollection_BaseList*)_NativeInstance)->Allocator();return _result.IsNull() ? nullptr : Macad::Occt::NCollection_BaseAllocator::CreateDowncasted(_result.get());
}//---------------------------------------------------------------------
//  Class  NCollection_BaseList::Iterator
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_BaseList::Iterator::Iterator(): Macad::Occt::BaseClass<::NCollection_BaseList::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_BaseList::Iterator();
}// 构造函数的实现
Macad::Occt::NCollection_BaseList::Iterator::Iterator(Macad::Occt::NCollection_BaseList^ theList): Macad::Occt::BaseClass<::NCollection_BaseList::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_BaseList::Iterator(*(::NCollection_BaseList*)theList->NativeInstance);
}// 构造函数的实现
Macad::Occt::NCollection_BaseList::Iterator::Iterator(Macad::Occt::NCollection_BaseList::Iterator^ parameter1): Macad::Occt::BaseClass<::NCollection_BaseList::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::NCollection_BaseList::Iterator(*(::NCollection_BaseList::Iterator*)parameter1->NativeInstance);
}// Init 方法的实现
void Macad::Occt::NCollection_BaseList::Iterator::Init(Macad::Occt::NCollection_BaseList^ theList)
{((::NCollection_BaseList::Iterator*)_NativeInstance)->Init(*(::NCollection_BaseList*)theList->NativeInstance);
}// Initialize 方法的实现
void Macad::Occt::NCollection_BaseList::Iterator::Initialize(Macad::Occt::NCollection_BaseList^ theList)
{((::NCollection_BaseList::Iterator*)_NativeInstance)->Initialize(*(::NCollection_BaseList*)theList->NativeInstance);
}// More 方法的实现
bool Macad::Occt::NCollection_BaseList::Iterator::More()
{bool _result = ((::NCollection_BaseList::Iterator*)_NativeInstance)->More();return _result;
}// IsEqual 方法的实现
bool Macad::Occt::NCollection_BaseList::Iterator::IsEqual(Macad::Occt::NCollection_BaseList::Iterator^ theOther)
{bool _result = ((::NCollection_BaseList::Iterator*)_NativeInstance)->IsEqual(*(::NCollection_BaseList::Iterator*)theOther->NativeInstance);return _result;
}//---------------------------------------------------------------------
//  Class  NCollection_AccAllocator
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_AccAllocator::NCollection_AccAllocator(long long unsigned int theBlockSize): Macad::Occt::NCollection_BaseAllocator(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_AccAllocator(theBlockSize);
}// 默认构造函数的实现
Macad::Occt::NCollection_AccAllocator::NCollection_AccAllocator(): Macad::Occt::NCollection_BaseAllocator(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_AccAllocator(::NCollection_AccAllocator::DefaultBlockSize);
}// Allocate 方法的实现
System::IntPtr Macad::Occt::NCollection_AccAllocator::Allocate(long long unsigned int theSize)
{void* _result = ((::NCollection_AccAllocator*)_NativeInstance)->Allocate(theSize);return System::IntPtr(_result);
}// Free 方法的实现
void Macad::Occt::NCollection_AccAllocator::Free(System::IntPtr theAddress)
{((::NCollection_AccAllocator*)_NativeInstance)->Free(theAddress.ToPointer());
}// CreateDowncasted 方法的实现
Macad::Occt::NCollection_AccAllocator^ Macad::Occt::NCollection_AccAllocator::CreateDowncasted(::NCollection_AccAllocator* instance)
{return gcnew Macad::Occt::NCollection_AccAllocator( instance );
}//---------------------------------------------------------------------
//  Class  NCollection_AlignedAllocator
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_AlignedAllocator::NCollection_AlignedAllocator(long long unsigned int theAlignment): Macad::Occt::NCollection_BaseAllocator(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_AlignedAllocator(theAlignment);
}// Allocate 方法的实现
System::IntPtr Macad::Occt::NCollection_AlignedAllocator::Allocate(long long unsigned int theSize)
{void* _result = ((::NCollection_AlignedAllocator*)_NativeInstance)->Allocate(theSize);return System::IntPtr(_result);
}// Free 方法的实现
void Macad::Occt::NCollection_AlignedAllocator::Free(System::IntPtr thePtr)
{((::NCollection_AlignedAllocator*)_NativeInstance)->Free(thePtr.ToPointer());
}// CreateDowncasted 方法的实现
Macad::Occt::NCollection_AlignedAllocator^ Macad::Occt::NCollection_AlignedAllocator::CreateDowncasted(::NCollection_AlignedAllocator* instance)
{return gcnew Macad::Occt::NCollection_AlignedAllocator( instance );
}//---------------------------------------------------------------------
//  Class  NCollection_Buffer
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_Buffer::NCollection_Buffer(Macad::Occt::NCollection_BaseAllocator^ theAlloc, long long unsigned int theSize, unsigned char% theData): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{pin_ptr<unsigned char> pp_theData = &theData;NativeInstance = new ::NCollection_Buffer(Handle(::NCollection_BaseAllocator)(theAlloc->NativeInstance), theSize, (unsigned char*)pp_theData);
}// 构造函数的实现
Macad::Occt::NCollection_Buffer::NCollection_Buffer(Macad::Occt::NCollection_BaseAllocator^ theAlloc, long long unsigned int theSize): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_Buffer(Handle(::NCollection_BaseAllocator)(theAlloc->NativeInstance), theSize, 0);
}// 构造函数的实现
Macad::Occt::NCollection_Buffer::NCollection_Buffer(Macad::Occt::NCollection_BaseAllocator^ theAlloc): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_Buffer(Handle(::NCollection_BaseAllocator)(theAlloc->NativeInstance), 0, 0);
}// 构造函数的实现
Macad::Occt::NCollection_Buffer::NCollection_Buffer(Macad::Occt::NCollection_Buffer^ parameter1): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_Buffer(*(::NCollection_Buffer*)parameter1->NativeInstance);
}// Data 方法的实现
unsigned char Macad::Occt::NCollection_Buffer::Data()
{throw gcnew System::NotImplementedException();
}// ChangeData 方法的实现
unsigned char Macad::Occt::NCollection_Buffer::ChangeData()
{throw gcnew System::NotImplementedException();
}// IsEmpty 方法的实现
bool Macad::Occt::NCollection_Buffer::IsEmpty()
{bool _result = ((::NCollection_Buffer*)_NativeInstance)->IsEmpty();return _result;
}// Size 方法的实现
long long unsigned int Macad::Occt::NCollection_Buffer::Size()
{long long unsigned int _result = ((::NCollection_Buffer*)_NativeInstance)->Size();return _result;
}// Allocator 方法的实现
Macad::Occt::NCollection_BaseAllocator^ Macad::Occt::NCollection_Buffer::Allocator()
{Handle(::NCollection_BaseAllocator) _result = ((::NCollection_Buffer*)_NativeInstance)->Allocator();return _result.IsNull() ? nullptr : Macad::Occt::NCollection_BaseAllocator::CreateDowncasted(_result.get());
}// SetAllocator 方法的实现
void Macad::Occt::NCollection_Buffer::SetAllocator(Macad::Occt::NCollection_BaseAllocator^ theAlloc)
{((::NCollection_Buffer*)_NativeInstance)->SetAllocator(Handle(::NCollection_BaseAllocator)(theAlloc->NativeInstance));
}// Allocate 方法的实现
bool Macad::Occt::NCollection_Buffer::Allocate(long long unsigned int theSize)
{bool _result = ((::NCollection_Buffer*)_NativeInstance)->Allocate(theSize);return _result;
}// Free 方法的实现
void Macad::Occt::NCollection_Buffer::Free()
{((::NCollection_Buffer*)_NativeInstance)->Free();
}// DumpJson 方法的实现
void Macad::Occt::NCollection_Buffer::DumpJson(System::IO::TextWriter^ theOStream, int theDepth)
{std::ostringstream oss_theOStream;((::NCollection_Buffer*)_NativeInstance)->DumpJson(oss_theOStream, theDepth);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}// DumpJson 方法的实现
void Macad::Occt::NCollection_Buffer::DumpJson(System::IO::TextWriter^ theOStream)
{std::ostringstream oss_theOStream;((::NCollection_Buffer*)_NativeInstance)->DumpJson(oss_theOStream, -1);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}// CreateDowncasted 方法的实现
Macad::Occt::NCollection_Buffer^ Macad::Occt::NCollection_Buffer::CreateDowncasted(::NCollection_Buffer* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Image_PixMapData)))return Macad::Occt::Image_PixMapData::CreateDowncasted((::Image_PixMapData*)instance);if (instance->IsKind(STANDARD_TYPE(::Graphic3d_BoundBuffer)))return Macad::Occt::Graphic3d_BoundBuffer::CreateDowncasted((::Graphic3d_BoundBuffer*)instance);return gcnew Macad::Occt::NCollection_Buffer( instance );
}//---------------------------------------------------------------------
//  Class  NCollection_IncAllocator
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_IncAllocator::NCollection_IncAllocator(long long unsigned int theBlockSize): Macad::Occt::NCollection_BaseAllocator(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_IncAllocator(theBlockSize);
}// 默认构造函数的实现
Macad::Occt::NCollection_IncAllocator::NCollection_IncAllocator(): Macad::Occt::NCollection_BaseAllocator(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_IncAllocator(::NCollection_IncAllocator::DefaultBlockSize);
}// SetThreadSafe 方法的实现
void Macad::Occt::NCollection_IncAllocator::SetThreadSafe(bool theIsThreadSafe)
{((::NCollection_IncAllocator*)_NativeInstance)->SetThreadSafe(theIsThreadSafe);
}// SetThreadSafe 方法的实现
void Macad::Occt::NCollection_IncAllocator::SetThreadSafe()
{((::NCollection_IncAllocator*)_NativeInstance)->SetThreadSafe(true);
}// Allocate 方法的实现
System::IntPtr Macad::Occt::NCollection_IncAllocator::Allocate(long long unsigned int size)
{void* _result = ((::NCollection_IncAllocator*)_NativeInstance)->Allocate(size);return System::IntPtr(_result);
}// Free 方法的实现
void Macad::Occt::NCollection_IncAllocator::Free(System::IntPtr anAddress)
{((::NCollection_IncAllocator*)_NativeInstance)->Free(anAddress.ToPointer());
}// CreateDowncasted 方法的实现
Macad::Occt::NCollection_IncAllocator^ Macad::Occt::NCollection_IncAllocator::CreateDowncasted(::NCollection_IncAllocator* instance)
{return gcnew Macad::Occt::NCollection_IncAllocator( instance );
}//---------------------------------------------------------------------
//  Class  NCollection_HeapAllocator
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_HeapAllocator::NCollection_HeapAllocator(): Macad::Occt::NCollection_BaseAllocator(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_HeapAllocator();
}// Allocate 方法的实现
System::IntPtr Macad::Occt::NCollection_HeapAllocator::Allocate(long long unsigned int theSize)
{void* _result = ((::NCollection_HeapAllocator*)_NativeInstance)->Allocate(theSize);return System::IntPtr(_result);
}// Free 方法的实现
void Macad::Occt::NCollection_HeapAllocator::Free(System::IntPtr theAddress)
{((::NCollection_HeapAllocator*)_NativeInstance)->Free(theAddress.ToPointer());
}// CreateDowncasted 方法的实现
Macad::Occt::NCollection_HeapAllocator^ Macad::Occt::NCollection_HeapAllocator::CreateDowncasted(::NCollection_HeapAllocator* instance)
{return gcnew Macad::Occt::NCollection_HeapAllocator( instance );
}//---------------------------------------------------------------------
//  Class  NCollection_WinHeapAllocator
//---------------------------------------------------------------------// 构造函数的实现
Macad::Occt::NCollection_WinHeapAllocator::NCollection_WinHeapAllocator(): Macad::Occt::NCollection_BaseAllocator(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::NCollection_WinHeapAllocator();
}// Allocate 方法的实现
System::IntPtr Macad::Occt::NCollection_WinHeapAllocator::Allocate(long long unsigned int theSize)
{void* _result = ((::NCollection_WinHeapAllocator*)_NativeInstance)->Allocate(theSize);return System::IntPtr(_result);
}// Free 方法的实现
void Macad::Occt::NCollection_WinHeapAllocator::Free(System::IntPtr theAddress)
{((::NCollection_WinHeapAllocator*)_NativeInstance)->Free(theAddress.ToPointer());
}// CreateDowncasted 方法的实现
Macad::Occt::NCollection_WinHeapAllocator^ Macad::Occt::NCollection_WinHeapAllocator::CreateDowncasted(::NCollection_WinHeapAllocator* instance)
{return gcnew Macad::Occt::NCollection_WinHeapAllocator( instance );
}

这段代码是C++/CLI语言的实现,用于将OpenCascade(OCC)的NCollection框架中的一些类和方法封装为.NET可用的托管代码。

具体来说,它包括以下几个类的实现:

  1. NCollection_AlignedAllocator: 一个内存分配器,用于分配对齐的内存块。
  2. NCollection_Buffer: 一个缓冲区类,用于管理数据缓冲区的分配、释放和操作。
  3. NCollection_IncAllocator: 一个增量分配器,用于按需分配和释放内存。
  4. NCollection_HeapAllocator: 一个堆分配器,用于分配和释放内存。
  5. NCollection_WinHeapAllocator: 一个特定于Windows平台的堆分配器,用于分配和释放内存。

这些类的实现涉及构造函数、内存分配和释放方法,以及其他一些相关的功能,例如设置线程安全性和导出到.NET的方法。这些类被设计为在.NET中使用,以便更轻松地与OpenCascade库进行交互。

7.

#include "OcctPCH.h" // 包含OpenCASCADE的预编译头文件
#include "Quantity.h" // 包含Quantity命名空间的头文件using namespace System::Runtime::InteropServices; // 使用System::Runtime::InteropServices命名空间中的Marshal类#include "gp.h" // 包含gp命名空间的头文件
#include "TCollection.h" // 包含TCollection命名空间的头文件
#include "Graphic3d.h" // 包含Graphic3d命名空间的头文件//---------------------------------------------------------------------
//  Class  Quantity_Array1OfColor
//---------------------------------------------------------------------// Quantity_Array1OfColor类的默认构造函数
Macad::Occt::Quantity_Array1OfColor::Quantity_Array1OfColor(): Macad::Occt::BaseClass<::Quantity_Array1OfColor>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor(); // 创建Quantity_Array1OfColor的实例对象
}// Quantity_Array1OfColor类的带参数的构造函数,指定下限和上限
Macad::Occt::Quantity_Array1OfColor::Quantity_Array1OfColor(int theLower, int theUpper): Macad::Occt::BaseClass<::Quantity_Array1OfColor>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor(theLower, theUpper); // 创建Quantity_Array1OfColor的实例对象
}// Quantity_Array1OfColor类的拷贝构造函数
Macad::Occt::Quantity_Array1OfColor::Quantity_Array1OfColor(Macad::Occt::Quantity_Array1OfColor^ theOther): Macad::Occt::BaseClass<::Quantity_Array1OfColor>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor(*(::Quantity_Array1OfColor*)theOther->NativeInstance); // 创建Quantity_Array1OfColor的实例对象
}// Quantity_Array1OfColor类的带参数的构造函数,指定初始颜色、下限和上限
Macad::Occt::Quantity_Array1OfColor::Quantity_Array1OfColor(Macad::Occt::Quantity_Color^ theBegin, int theLower, int theUpper): Macad::Occt::BaseClass<::Quantity_Array1OfColor>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor(*(::Quantity_Color*)theBegin->NativeInstance, theLower, theUpper); // 创建Quantity_Array1OfColor的实例对象
}// 初始化数组中的所有元素为指定的颜色
void Macad::Occt::Quantity_Array1OfColor::Init(Macad::Occt::Quantity_Color^ theValue)
{((::Quantity_Array1OfColor*)_NativeInstance)->Init(*(::Quantity_Color*)theValue->NativeInstance); // 调用OpenCASCADE的Init方法初始化颜色数组
}// 获取数组的大小(元素个数)
int Macad::Occt::Quantity_Array1OfColor::Size()
{int _result = ((::Quantity_Array1OfColor*)_NativeInstance)->Size(); // 调用OpenCASCADE的Size方法获取数组大小return _result;
}// 获取数组的长度(元素个数)
int Macad::Occt::Quantity_Array1OfColor::Length()
{int _result = ((::Quantity_Array1OfColor*)_NativeInstance)->Length(); // 调用OpenCASCADE的Length方法获取数组长度return _result;
}// 检查数组是否为空
bool Macad::Occt::Quantity_Array1OfColor::IsEmpty()
{bool _result = ((::Quantity_Array1OfColor*)_NativeInstance)->IsEmpty(); // 调用OpenCASCADE的IsEmpty方法检查数组是否为空return _result;
}// 获取数组的下限
int Macad::Occt::Quantity_Array1OfColor::Lower()
{int _result = ((::Quantity_Array1OfColor*)_NativeInstance)->Lower(); // 调用OpenCASCADE的Lower方法获取数组下限return _result;
}// 获取数组的上限
int Macad::Occt::Quantity_Array1OfColor::Upper()
{int _result = ((::Quantity_Array1OfColor*)_NativeInstance)->Upper(); // 调用OpenCASCADE的Upper方法获取数组上限return _result;
}// 检查数组是否可删除
bool Macad::Occt::Quantity_Array1OfColor::IsDeletable()
{bool _result = ((::Quantity_Array1OfColor*)_NativeInstance)->IsDeletable(); // 调用OpenCASCADE的IsDeletable方法检查数组是否可删除return _result;
}// 检查数组是否已分配
bool Macad::Occt::Quantity_Array1OfColor::IsAllocated()
{bool _result = ((::Quantity_Array1OfColor*)_NativeInstance)->IsAllocated(); // 调用OpenCASCADE的IsAllocated方法检查数组是否已分配return _result;
}// 分配另一个数组的值给当前数组
Macad::Occt::Quantity_Array1OfColor^ Macad::Occt::Quantity_Array1OfColor::Assign(Macad::Occt::Quantity_Array1OfColor^ theOther)
{::Quantity_Array1OfColor* _result = new ::Quantity_Array1OfColor(); // 创建Quantity_Array1OfColor的实例对象*_result = ((::Quantity_Array1OfColor*)_NativeInstance)->Assign(*(::Quantity_Array1OfColor*)theOther->NativeInstance); // 调用OpenCASCADE的Assign方法return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Array1OfColor(_result); // 返回赋值后的数组
}// 移动另一个数组的值给当前数组
Macad::Occt::Quantity_Array1OfColor^ Macad::Occt::Quantity_Array1OfColor::Move(Macad::Occt::Quantity_Array1OfColor^ theOther)
{::Quantity_Array1OfColor* _result = new ::Quantity_Array1OfColor(); // 创建Quantity_Array1OfColor的实例对象*_result = ((::Quantity_Array1OfColor*)_NativeInstance)->Move(*(::Quantity_Array1OfColor*)theOther->NativeInstance); // 调用OpenCASCADE的Move方法return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Array1OfColor(_result); // 返回移动后的数组
}// 获取数组的第一个颜色
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::First()
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = (::Quantity_Color)((::Quantity_Array1OfColor*)_NativeInstance)->First(); // 调用OpenCASCADE的First方法获取第一个颜色return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回第一个颜色
}// 修改数组的第一个颜色
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::ChangeFirst()
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = ((::Quantity_Array1OfColor*)_NativeInstance)->ChangeFirst(); // 调用OpenCASCADE的ChangeFirst方法修改第一个颜色return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回修改后的第一个颜色
}// 获取数组的最后一个颜色
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::Last()
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = (::Quantity_Color)((::Quantity_Array1OfColor*)_NativeInstance)->Last(); // 调用OpenCASCADE的Last方法获取最后一个颜色return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回最后一个颜色
}// 修改数组的最后一个颜色
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::ChangeLast()
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = ((::Quantity_Array1OfColor*)_NativeInstance)->ChangeLast(); // 调用OpenCASCADE的ChangeLast方法修改最后一个颜色return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回修改后的最后一个颜色
}// 获取数组指定索引处的颜色
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::Value(int theIndex)
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = (::Quantity_Color)((::Quantity_Array1OfColor*)_NativeInstance)->Value(theIndex); // 调用OpenCASCADE的Value方法获取指定索引处的颜色return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回指定索引处的颜色
}// 修改数组指定索引处的颜色
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::ChangeValue(int theIndex)
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = ((::Quantity_Array1OfColor*)_NativeInstance)->ChangeValue(theIndex); // 调用OpenCASCADE的ChangeValue方法修改指定索引处的颜色return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回修改后的指定索引处的颜色
}// 设置数组指定索引处的颜色
void Macad::Occt::Quantity_Array1OfColor::SetValue(int theIndex, Macad::Occt::Quantity_Color^ theItem)
{((::Quantity_Array1OfColor*)_NativeInstance)->SetValue(theIndex, *(::Quantity_Color*)theItem->NativeInstance); // 调用OpenCASCADE的SetValue方法设置指定索引处的颜色
}// 调整数组的大小,并可选地复制数据
void Macad::Occt::Quantity_Array1OfColor::Resize(int theLower, int theUpper, bool theToCopyData)
{((::Quantity_Array1OfColor*)_NativeInstance)->Resize(theLower, theUpper, theToCopyData); // 调用OpenCASCADE的Resize方法调整数组的大小
}// 获取迭代器,用于遍历数组
System::Collections::Generic::IEnumerator<Macad::Occt::Quantity_Color^>^ Macad::Occt::Quantity_Array1OfColor::GetEnumerator()
{return gcnew IndexEnumerator<Macad::Occt::Quantity_Color^>(this, Lower(), Upper()); // 返回数组的迭代器
}// 获取迭代器,用于遍历数组
System::Collections::IEnumerator^ Macad::Occt::Quantity_Array1OfColor::GetEnumerator2()
{return gcnew IndexEnumerator<Macad::Occt::Quantity_Color^>(this, Lower(), Upper()); // 返回数组的迭代器
}//---------------------------------------------------------------------
//  Class  Quantity_Array1OfColor::Iterator
//---------------------------------------------------------------------// Quantity_Array1OfColor::Iterator类的默认构造函数
Macad::Occt::Quantity_Array1OfColor::Iterator::Iterator(): Macad::Occt::BaseClass<::Quantity_Array1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor::Iterator(); // 创建Quantity_Array1OfColor::Iterator的实例对象
}// Quantity_Array1OfColor::Iterator类的带参数的构造函数,指定数组和是否指向末尾
Macad::Occt::Quantity_Array1OfColor::Iterator::Iterator(Macad::Occt::Quantity_Array1OfColor^ theArray, bool theToEnd): Macad::Occt::BaseClass<::Quantity_Array1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor::Iterator(*(::Quantity_Array1OfColor*)theArray->NativeInstance, theToEnd); // 创建Quantity_Array1OfColor::Iterator的实例对象
}// Quantity_Array1OfColor::Iterator类的带参数的构造函数,指定数组
Macad::Occt::Quantity_Array1OfColor::Iterator::Iterator(Macad::Occt::Quantity_Array1OfColor^ theArray): Macad::Occt::BaseClass<::Quantity_Array1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor::Iterator(*(::Quantity_Array1OfColor*)theArray->NativeInstance, false); // 创建Quantity_Array1OfColor::Iterator的实例对象
}// Quantity_Array1OfColor::Iterator类的拷贝构造函数
Macad::Occt::Quantity_Array1OfColor::Iterator::Iterator(Macad::Occt::Quantity_Array1OfColor::Iterator^ parameter1): Macad::Occt::BaseClass<::Quantity_Array1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Array1OfColor::Iterator(*(::Quantity_Array1OfColor::Iterator*)parameter1->NativeInstance); // 创建Quantity_Array1OfColor::Iterator的实例对象
}// 初始化迭代器
void Macad::Occt::Quantity_Array1OfColor::Iterator::Init(Macad::Occt::Quantity_Array1OfColor^ theArray)
{((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->Init(*(::Quantity_Array1OfColor*)theArray->NativeInstance); // 调用OpenCASCADE的Init方法初始化迭代器
}// 检查是否还有更多的元素
bool Macad::Occt::Quantity_Array1OfColor::Iterator::More()
{bool _result = ((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->More(); // 调用OpenCASCADE的More方法检查是否还有更多的元素return _result;
}// 移动到下一个元素
void Macad::Occt::Quantity_Array1OfColor::Iterator::Next()
{((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->Next(); // 调用OpenCASCADE的Next方法移动到下一个元素
}// 移动到上一个元素
void Macad::Occt::Quantity_Array1OfColor::Iterator::Previous()
{((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->Previous(); // 调用OpenCASCADE的Previous方法移动到上一个元素
}// 偏移指定数量的元素
void Macad::Occt::Quantity_Array1OfColor::Iterator::Offset(long long int theOffset)
{((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->Offset(theOffset); // 调用OpenCASCADE的Offset方法偏移指定数量的元素
}// 计算与另一个迭代器之间的差异
long long int Macad::Occt::Quantity_Array1OfColor::Iterator::Differ(Macad::Occt::Quantity_Array1OfColor::Iterator^ theOther)
{long long int _result = ((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->Differ(*(::Quantity_Array1OfColor::Iterator*)theOther->NativeInstance); // 调用OpenCASCADE的Differ方法计算与另一个迭代器之间的差异return _result;
}// 获取当前元素的值
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::Iterator::Value()
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = (::Quantity_Color)((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->Value(); // 调用OpenCASCADE的Value方法获取当前元素的值return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回当前元素的值
}// 修改当前元素的值
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Array1OfColor::Iterator::ChangeValue()
{::Quantity_Color* _result = new ::Quantity_Color(); // 创建Quantity_Color的实例对象*_result = ((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->ChangeValue(); // 调用OpenCASCADE的ChangeValue方法修改当前元素的值return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result); // 返回修改后的当前元素的值
}// 检查是否与另一个迭代器相等
bool Macad::Occt::Quantity_Array1OfColor::Iterator::IsEqual(Macad::Occt::Quantity_Array1OfColor::Iterator^ theOther)
{bool _result = ((::Quantity_Array1OfColor::Iterator*)_NativeInstance)->IsEqual(*(::Quantity_Array1OfColor::Iterator*)theOther->NativeInstance); // 调用OpenCASCADE的IsEqual方法检查是否与另一个迭代器相等return _result;
}
//---------------------------------------------------------------------
//  Class  Quantity_ColorHasher
//---------------------------------------------------------------------// Quantity_ColorHasher 类的定义开始Macad::Occt::Quantity_ColorHasher::Quantity_ColorHasher(): Macad::Occt::BaseClass<::Quantity_ColorHasher>(BaseClass::InitMode::Uninitialized)
{// 默认构造函数,创建一个未初始化的 Quantity_ColorHasher 实例_NativeInstance = new ::Quantity_ColorHasher();
}Macad::Occt::Quantity_ColorHasher::Quantity_ColorHasher(Macad::Occt::Quantity_ColorHasher^ parameter1): Macad::Occt::BaseClass<::Quantity_ColorHasher>(BaseClass::InitMode::Uninitialized)
{// 复制构造函数,通过传递另一个 Quantity_ColorHasher 对象来初始化新对象_NativeInstance = new ::Quantity_ColorHasher(*(::Quantity_ColorHasher*)parameter1->NativeInstance);
}int Macad::Occt::Quantity_ColorHasher::HashCode(Macad::Occt::Quantity_Color^ theColor, int theUpperBound)
{// 计算给定颜色对象的哈希码int _result = ::Quantity_ColorHasher::HashCode(*(::Quantity_Color*)theColor->NativeInstance, theUpperBound);return _result;
}bool Macad::Occt::Quantity_ColorHasher::IsEqual(Macad::Occt::Quantity_Color^ theColor1, Macad::Occt::Quantity_Color^ theColor2)
{// 比较两个颜色对象是否相等bool _result = ::Quantity_ColorHasher::IsEqual(*(::Quantity_Color*)theColor1->NativeInstance, *(::Quantity_Color*)theColor2->NativeInstance);return _result;
}//---------------------------------------------------------------------
//  Class  Quantity_ColorRGBAHasher
//---------------------------------------------------------------------// Quantity_ColorRGBAHasher 类的定义开始Macad::Occt::Quantity_ColorRGBAHasher::Quantity_ColorRGBAHasher(): Macad::Occt::BaseClass<::Quantity_ColorRGBAHasher>(BaseClass::InitMode::Uninitialized)
{// 默认构造函数,创建一个未初始化的 Quantity_ColorRGBAHasher 实例_NativeInstance = new ::Quantity_ColorRGBAHasher();
}Macad::Occt::Quantity_ColorRGBAHasher::Quantity_ColorRGBAHasher(Macad::Occt::Quantity_ColorRGBAHasher^ parameter1): Macad::Occt::BaseClass<::Quantity_ColorRGBAHasher>(BaseClass::InitMode::Uninitialized)
{// 复制构造函数,通过传递另一个 Quantity_ColorRGBAHasher 对象来初始化新对象_NativeInstance = new ::Quantity_ColorRGBAHasher(*(::Quantity_ColorRGBAHasher*)parameter1->NativeInstance);
}int Macad::Occt::Quantity_ColorRGBAHasher::HashCode(Macad::Occt::Quantity_ColorRGBA^ theColor, int theUpperBound)
{// 计算给定 RGBA 颜色对象的哈希码int _result = ::Quantity_ColorRGBAHasher::HashCode(*(::Quantity_ColorRGBA*)theColor->NativeInstance, theUpperBound);return _result;
}bool Macad::Occt::Quantity_ColorRGBAHasher::IsEqual(Macad::Occt::Quantity_ColorRGBA^ theColor1, Macad::Occt::Quantity_ColorRGBA^ theColor2)
{// 比较两个 RGBA 颜色对象是否相等bool _result = ::Quantity_ColorRGBAHasher::IsEqual(*(::Quantity_ColorRGBA*)theColor1->NativeInstance, *(::Quantity_ColorRGBA*)theColor2->NativeInstance);return _result;
}
//---------------------------------------------------------------------
//  Class  Quantity_Color
//---------------------------------------------------------------------// Quantity_Color 类的定义开始Macad::Occt::Quantity_Color::Quantity_Color(): Macad::Occt::BaseClass<::Quantity_Color>(BaseClass::InitMode::Uninitialized)
{// 默认构造函数,创建一个未初始化的 Quantity_Color 实例_NativeInstance = new ::Quantity_Color();
}Macad::Occt::Quantity_Color::Quantity_Color(Macad::Occt::Quantity_NameOfColor theName): Macad::Occt::BaseClass<::Quantity_Color>(BaseClass::InitMode::Uninitialized)
{// 使用给定的颜色名称创建一个未初始化的 Quantity_Color 实例_NativeInstance = new ::Quantity_Color((::Quantity_NameOfColor)theName);
}Macad::Occt::Quantity_Color::Quantity_Color(double theC1, double theC2, double theC3, Macad::Occt::Quantity_TypeOfColor theType): Macad::Occt::BaseClass<::Quantity_Color>(BaseClass::InitMode::Uninitialized)
{// 使用给定的颜色分量和颜色类型创建一个未初始化的 Quantity_Color 实例_NativeInstance = new ::Quantity_Color(theC1, theC2, theC3, (::Quantity_TypeOfColor)theType);
}Macad::Occt::Quantity_Color::Quantity_Color(Macad::Occt::gp_Vec3f^ theRgb): Macad::Occt::BaseClass<::Quantity_Color>(BaseClass::InitMode::Uninitialized)
{// 使用给定的 RGB 向量创建一个未初始化的 Quantity_Color 实例_NativeInstance = new ::Quantity_Color(*(::gp_Vec3f*)theRgb->NativeInstance);
}Macad::Occt::Quantity_Color::Quantity_Color(Macad::Occt::Quantity_Color^ parameter1): Macad::Occt::BaseClass<::Quantity_Color>(BaseClass::InitMode::Uninitialized)
{// 复制构造函数,通过传递另一个 Quantity_Color 对象来初始化新对象_NativeInstance = new ::Quantity_Color(*(::Quantity_Color*)parameter1->NativeInstance);
}Macad::Occt::Quantity_NameOfColor Macad::Occt::Quantity_Color::Name()
{// 获取颜色的名称::Quantity_NameOfColor _result = ((::Quantity_Color*)_NativeInstance)->Name();return (Macad::Occt::Quantity_NameOfColor)_result;
}void Macad::Occt::Quantity_Color::SetValues(Macad::Occt::Quantity_NameOfColor theName)
{// 设置颜色的值为指定的颜色名称((::Quantity_Color*)_NativeInstance)->SetValues((::Quantity_NameOfColor)theName);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Rgb()
{// 获取颜色的 RGB 分量值::gp_Vec3f* _result = new ::gp_Vec3f();*_result = (::gp_Vec3f)((::Quantity_Color*)_NativeInstance)->Rgb();return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}void Macad::Occt::Quantity_Color::Values(double% theC1, double% theC2, double% theC3, Macad::Occt::Quantity_TypeOfColor theType)
{// 获取颜色的分量值pin_ptr<double> pp_theC1 = &theC1;pin_ptr<double> pp_theC2 = &theC2;pin_ptr<double> pp_theC3 = &theC3;((::Quantity_Color*)_NativeInstance)->Values(*(double*)pp_theC1, *(double*)pp_theC2, *(double*)pp_theC3, (::Quantity_TypeOfColor)theType);
}void Macad::Occt::Quantity_Color::SetValues(double theC1, double theC2, double theC3, Macad::Occt::Quantity_TypeOfColor theType)
{// 设置颜色的分量值((::Quantity_Color*)_NativeInstance)->SetValues(theC1, theC2, theC3, (::Quantity_TypeOfColor)theType);
}double Macad::Occt::Quantity_Color::Red()
{// 获取颜色的红色分量值double _result = ((::Quantity_Color*)_NativeInstance)->Red();return _result;
}double Macad::Occt::Quantity_Color::Green()
{// 获取颜色的绿色分量值double _result = ((::Quantity_Color*)_NativeInstance)->Green();return _result;
}double Macad::Occt::Quantity_Color::Blue()
{// 获取颜色的蓝色分量值double _result = ((::Quantity_Color*)_NativeInstance)->Blue();return _result;
}double Macad::Occt::Quantity_Color::Hue()
{// 获取颜色的色调值double _result = ((::Quantity_Color*)_NativeInstance)->Hue();return _result;
}double Macad::Occt::Quantity_Color::Light()
{// 获取颜色的亮度值double _result = ((::Quantity_Color*)_NativeInstance)->Light();return _result;
}void Macad::Occt::Quantity_Color::ChangeIntensity(double theDelta)
{// 改变颜色的强度值((::Quantity_Color*)_NativeInstance)->ChangeIntensity(theDelta);
}double Macad::Occt::Quantity_Color::Saturation()
{// 获取颜色的饱和度值double _result = ((::Quantity_Color*)_NativeInstance)->Saturation();return _result;
}void Macad::Occt::Quantity_Color::ChangeContrast(double theDelta)
{// 改变颜色的对比度((::Quantity_Color*)_NativeInstance)->ChangeContrast(theDelta);
}bool Macad::Occt::Quantity_Color::IsDifferent(Macad::Occt::Quantity_Color^ theOther)
{// 检查颜色是否与另一个颜色不同bool _result = ((::Quantity_Color*)_NativeInstance)->IsDifferent(*(::Quantity_Color*)theOther->NativeInstance);return _result;
}bool Macad::Occt::Quantity_Color::IsEqual(Macad::Occt::Quantity_Color^ theOther)
{// 检查颜色是否与另一个颜色相等bool _result = ((::Quantity_Color*)_NativeInstance)->IsEqual(*(::Quantity_Color*)theOther->NativeInstance);return _result;
}double Macad::Occt::Quantity_Color::Distance(Macad::Occt::Quantity_Color^ theColor)
{// 计算颜色与另一个颜色之间的距离double _result = ((::Quantity_Color*)_NativeInstance)->Distance(*(::Quantity_Color*)theColor->NativeInstance);return _result;
}double Macad::Occt::Quantity_Color::SquareDistance(Macad::Occt::Quantity_Color^ theColor)
{// 计算颜色与另一个颜色之间的平方距离double _result = ((::Quantity_Color*)_NativeInstance)->SquareDistance(*(::Quantity_Color*)theColor->NativeInstance);return _result;
}void Macad::Occt::Quantity_Color::Delta(Macad::Occt::Quantity_Color^ theColor, double% DC, double% DI)
{// 计算颜色与另一个颜色之间的差异pin_ptr<double> pp_DC = &DC;pin_ptr<double> pp_DI = &DI;((::Quantity_Color*)_NativeInstance)->Delta(*(::Quantity_Color*)theColor->NativeInstance, *(double*)pp_DC, *(double*)pp_DI);
}double Macad::Occt::Quantity_Color::DeltaE2000(Macad::Occt::Quantity_Color^ theOther)
{// 计算颜色与另一个颜色之间的 DeltaE2000 值double _result = ((::Quantity_Color*)_NativeInstance)->DeltaE2000(*(::Quantity_Color*)theOther->NativeInstance);return _result;
}Macad::Occt::Quantity_NameOfColor Macad::Occt::Quantity_Color::Name(double theR, double theG, double theB)
{// 获取给定 RGB 分量值对应的颜色名称::Quantity_NameOfColor _result = ::Quantity_Color::Name(theR, theG, theB);return (Macad::Occt::Quantity_NameOfColor)_result;
}System::String^ Macad::Occt::Quantity_Color::StringName(Macad::Occt::Quantity_NameOfColor theColor)
{// 获取颜色名称的字符串表示Standard_CString _result = ::Quantity_Color::StringName((::Quantity_NameOfColor)theColor);return gcnew System::String(_result);
}bool Macad::Occt::Quantity_Color::ColorFromName(System::String^ theName, Macad::Occt::Quantity_NameOfColor% theColor)
{// 从颜色名称字符串获取颜色名称枚举值const char* sz_theName = (char*)(void*)Marshal::StringToHGlobalAnsi(theName);pin_ptr<Macad::Occt::Quantity_NameOfColor> pp_theColor = &theColor;bool _result = ::Quantity_Color::ColorFromName(sz_theName, *(::Quantity_NameOfColor*)pp_theColor);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theName);return _result;
}bool Macad::Occt::Quantity_Color::ColorFromName(System::String^ theColorNameString, Macad::Occt::Quantity_Color^ theColor)
{// 从颜色名称字符串获取颜色对象const char* sz_theColorNameString = (char*)(void*)Marshal::StringToHGlobalAnsi(theColorNameString);bool _result = ::Quantity_Color::ColorFromName(sz_theColorNameString, *(::Quantity_Color*)theColor->NativeInstance);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theColorNameString);return _result;
}bool Macad::Occt::Quantity_Color::ColorFromHex(System::String^ theHexColorString, Macad::Occt::Quantity_Color^ theColor)
{// 从十六进制颜色字符串获取颜色对象const char* sz_theHexColorString = (char*)(void*)Marshal::StringToHGlobalAnsi(theHexColorString);bool _result = ::Quantity_Color::ColorFromHex(sz_theHexColorString, *(::Quantity_Color*)theColor->NativeInstance);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theHexColorString);return _result;
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Quantity_Color::ColorToHex(Macad::Occt::Quantity_Color^ theColor, bool theToPrefixHash)
{// 将颜色对象转换为十六进制表示的字符串::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Quantity_Color::ColorToHex(*(::Quantity_Color*)theColor->NativeInstance, theToPrefixHash);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Quantity_Color::ColorToHex(Macad::Occt::Quantity_Color^ theColor)
{// 将颜色对象转换为十六进制表示的字符串,带有前缀 # ::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Quantity_Color::ColorToHex(*(::Quantity_Color*)theColor->NativeInstance, true);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_sRGB_To_HLS(Macad::Occt::gp_Vec3f^ theRgb)
{// 将 sRGB 颜色转换为 HLS 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_sRGB_To_HLS(*(::gp_Vec3f*)theRgb->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_HLS_To_sRGB(Macad::Occt::gp_Vec3f^ theHls)
{// 将 HLS 颜色转换为 sRGB 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_HLS_To_sRGB(*(::gp_Vec3f*)theHls->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_LinearRGB_To_HLS(Macad::Occt::gp_Vec3f^ theRgb)
{// 将线性 RGB 颜色转换为 HLS 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_LinearRGB_To_HLS(*(::gp_Vec3f*)theRgb->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_HLS_To_LinearRGB(Macad::Occt::gp_Vec3f^ theHls)
{// 将 HLS 颜色转换为线性 RGB 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_HLS_To_LinearRGB(*(::gp_Vec3f*)theHls->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_LinearRGB_To_Lab(Macad::Occt::gp_Vec3f^ theRgb)
{// 将线性 RGB 颜色转换为 Lab 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_LinearRGB_To_Lab(*(::gp_Vec3f*)theRgb->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_Lab_To_Lch(Macad::Occt::gp_Vec3f^ theLab)
{// 将 Lab 颜色转换为 Lch 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_Lab_To_Lch(*(::gp_Vec3f*)theLab->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_Lab_To_LinearRGB(Macad::Occt::gp_Vec3f^ theLab)
{// 将 Lab 颜色转换为线性 RGB 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_Lab_To_LinearRGB(*(::gp_Vec3f*)theLab->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}Macad::Occt::gp_Vec3f^ Macad::Occt::Quantity_Color::Convert_Lch_To_Lab(Macad::Occt::gp_Vec3f^ theLch)
{// 将 Lch 颜色转换为 Lab 颜色::gp_Vec3f* _result = new ::gp_Vec3f();*_result = ::Quantity_Color::Convert_Lch_To_Lab(*(::gp_Vec3f*)theLch->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::gp_Vec3f(_result);
}void Macad::Occt::Quantity_Color::Color2argb(Macad::Occt::Quantity_Color^ theColor, int% theARGB)
{// 将颜色对象转换为 ARGB 表示的颜色值pin_ptr<int> pp_theARGB = &theARGB;::Quantity_Color::Color2argb(*(::Quantity_Color*)theColor->NativeInstance, *(int*)pp_theARGB);
}void Macad::Occt::Quantity_Color::Argb2color(int theARGB, Macad::Occt::Quantity_Color^ theColor)
{// 将 ARGB 表示的颜色值转换为颜色对象::Quantity_Color::Argb2color(theARGB, *(::Quantity_Color*)theColor->NativeInstance);
}double Macad::Occt::Quantity_Color::Convert_LinearRGB_To_sRGB(double theLinearValue)
{// 将线性 RGB 分量值转换为 sRGB 分量值double _result = ::Quantity_Color::Convert_LinearRGB_To_sRGB(theLinearValue);return _result;
}float Macad::Occt::Quantity_Color::Convert_LinearRGB_To_sRGB(float theLinearValue)
{// 将线性 RGB 分量值转换为 sRGB 分量值float _result = ::Quantity_Color::Convert_LinearRGB_To_sRGB(theLinearValue);return _result;
}double Macad::Occt::Quantity_Color::Convert_sRGB_To_LinearRGB(double theNonLinearValue)
{// 将 sRGB 分量值转换为线性 RGB 分量值double _result = ::Quantity_Color::Convert_sRGB_To_LinearRGB(theNonLinearValue);return _result;
}float Macad::Occt::Quantity_Color::Convert_sRGB_To_LinearRGB(float theNonLinearValue)
{// 将 sRGB 分量值转换为线性 RGB 分量值float _result = ::Quantity_Color::Convert_sRGB_To_LinearRGB(theNonLinearValue);return _result;
}double Macad::Occt::Quantity_Color::Convert_sRGB_To_LinearRGB_22(double theNonLinearValue)
{// 将 sRGB 分量值转换为线性 RGB 分量值,使用 2.2 指数double _result = ::Quantity_Color::Convert_sRGB_To_LinearRGB_22(theNonLinearValue);return _result;
}float Macad::Occt::Quantity_Color::Convert_sRGB_To_LinearRGB_22(float theNonLinearValue)
{// 将 sRGB 分量值转换为线性 RGB 分量值,使用 2.2 指数float _result = ::Quantity_Color::Convert_sRGB_To_LinearRGB_22(theNonLinearValue);return _result;
}double Macad::Occt::Quantity_Color::Convert_LinearRGB_To_sRGB_22(double theLinearValue)
{// 将线性 RGB 分量值转换为 sRGB 分量值,使用 2.2 指数double _result = ::Quantity_Color::Convert_LinearRGB_To_sRGB_22(theLinearValue);return _result;
}float Macad::Occt::Quantity_Color::Convert_LinearRGB_To_sRGB_22(float theLinearValue)
{// 将线性 RGB 分量值转换为 sRGB 分量值,使用 2.2 指数float _result = ::Quantity_Color::Convert_LinearRGB_To_sRGB_22(theLinearValue);return _result;
}double Macad::Occt::Quantity_Color::Convert_LinearRGB_To_LinearHSL(double theLinearRGBValue)
{// 将线性 RGB 分量值转换为线性 HSL 分量值double _result = ::Quantity_Color::Convert_LinearRGB_To_LinearHSL(theLinearRGBValue);return _result;
}double Macad::Occt::Quantity_Color::Convert_LinearHSL_To_LinearRGB(double theLinearHSLValue)
{// 将线性 HSL 分量值转换为线性 RGB 分量值double _result = ::Quantity_Color::Convert_LinearHSL_To_LinearRGB(theLinearHSLValue);return _result;
}Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Color::FromHSB(double theH, double theS, double theB)
{// 根据 HSB(色调、饱和度、亮度)值创建颜色对象::Quantity_Color* _result = new ::Quantity_Color();*_result = ::Quantity_Color::FromHSB(theH, theS, theB);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Color::FromHSL(double theH, double theS, double theL)
{// 根据 HSL(色调、饱和度、亮度)值创建颜色对象::Quantity_Color* _result = new ::Quantity_Color();*_result = ::Quantity_Color::FromHSL(theH, theS, theL);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Color::FromLab(double theL, double theA, double theB)
{// 根据 Lab(亮度、颜色 a、颜色 b)值创建颜色对象::Quantity_Color* _result = new ::Quantity_Color();*_result = ::Quantity_Color::FromLab(theL, theA, theB);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Color::FromRGB(double theR, double theG, double theB)
{// 根据 RGB 值创建颜色对象::Quantity_Color* _result = new ::Quantity_Color();*_result = ::Quantity_Color::FromRGB(theR, theG, theB);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Color::FromHSV(double theH, double theS, double theV)
{// 根据 HSV(色调、饱和度、值)值创建颜色对象::Quantity_Color* _result = new ::Quantity_Color();*_result = ::Quantity_Color::FromHSV(theH, theS, theV);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_Color::FromRGBA(int theRGBA)
{// 根据 RGBA 表示的颜色值创建颜色对象::Quantity_Color* _result = new ::Quantity_Color();*_result = ::Quantity_Color::FromRGBA(theRGBA);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}int Macad::Occt::Quantity_Color::ToRGBA(Macad::Occt::Quantity_Color^ theColor)
{// 将颜色对象转换为 RGBA 表示的颜色值int _result = ::Quantity_Color::ToRGBA(*(::Quantity_Color*)theColor->NativeInstance);return _result;
}void Macad::Occt::Quantity_Color::Dump(Macad::Occt::Quantity_Color^ theColor, System::String^ theDumpString, int theHexFormat)
{// 将颜色对象的信息转储到字符串中const char* sz_theDumpString = (char*)(void*)Marshal::StringToHGlobalAnsi(theDumpString);::Quantity_Color::Dump(*(::Quantity_Color*)theColor->NativeInstance, sz_theDumpString, theHexFormat);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theDumpString);
}System::String^ Macad::Occt::Quantity_Color::Dump(Macad::Occt::Quantity_Color^ theColor, int theHexFormat)
{// 将颜色对象的信息转储到字符串中::TCollection_AsciiString _result;_result = ::Quantity_Color::Dump(*(::Quantity_Color*)theColor->NativeInstance, theHexFormat);return gcnew System::String(_result.ToCString());
}
//---------------------------------------------------------------------
//  Class  Quantity_ColorRGBA
//---------------------------------------------------------------------// 默认构造函数
Macad::Occt::Quantity_ColorRGBA::Quantity_ColorRGBA(): Macad::Occt::BaseClass<::Quantity_ColorRGBA>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_ColorRGBA();
}// 从Quantity_Color转换构造函数
Macad::Occt::Quantity_ColorRGBA::Quantity_ColorRGBA(Macad::Occt::Quantity_Color^ theRgb): Macad::Occt::BaseClass<::Quantity_ColorRGBA>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_ColorRGBA(*(::Quantity_Color*)theRgb->NativeInstance);
}// 从Quantity_Color转换构造函数,带alpha值
Macad::Occt::Quantity_ColorRGBA::Quantity_ColorRGBA(Macad::Occt::Quantity_Color^ theRgb, float theAlpha): Macad::Occt::BaseClass<::Quantity_ColorRGBA>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_ColorRGBA(*(::Quantity_Color*)theRgb->NativeInstance, theAlpha);
}// 从Graphic3d_Vec4转换构造函数
Macad::Occt::Quantity_ColorRGBA::Quantity_ColorRGBA(Macad::Occt::Graphic3d_Vec4^ theRgba): Macad::Occt::BaseClass<::Quantity_ColorRGBA>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_ColorRGBA(*(::Graphic3d_Vec4*)theRgba->NativeInstance);
}// 使用RGBA值构造函数
Macad::Occt::Quantity_ColorRGBA::Quantity_ColorRGBA(float theRed, float theGreen, float theBlue, float theAlpha): Macad::Occt::BaseClass<::Quantity_ColorRGBA>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_ColorRGBA(theRed, theGreen, theBlue, theAlpha);
}// 复制构造函数
Macad::Occt::Quantity_ColorRGBA::Quantity_ColorRGBA(Macad::Occt::Quantity_ColorRGBA^ parameter1): Macad::Occt::BaseClass<::Quantity_ColorRGBA>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_ColorRGBA(*(::Quantity_ColorRGBA*)parameter1->NativeInstance);
}// 设置RGBA值
void Macad::Occt::Quantity_ColorRGBA::SetValues(float theRed, float theGreen, float theBlue, float theAlpha)
{((::Quantity_ColorRGBA*)_NativeInstance)->SetValues(theRed, theGreen, theBlue, theAlpha);
}// 获取RGB值
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_ColorRGBA::GetRGB()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = (::Quantity_Color)((::Quantity_ColorRGBA*)_NativeInstance)->GetRGB();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 转换成RGB值
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_ColorRGBA::ChangeRGB()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = ((::Quantity_ColorRGBA*)_NativeInstance)->ChangeRGB();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 设置RGB值
void Macad::Occt::Quantity_ColorRGBA::SetRGB(Macad::Occt::Quantity_Color^ theRgb)
{((::Quantity_ColorRGBA*)_NativeInstance)->SetRGB(*(::Quantity_Color*)theRgb->NativeInstance);
}// 获取alpha值
float Macad::Occt::Quantity_ColorRGBA::Alpha()
{float _result = ((::Quantity_ColorRGBA*)_NativeInstance)->Alpha();return _result;
}// 设置alpha值
void Macad::Occt::Quantity_ColorRGBA::SetAlpha(float theAlpha)
{((::Quantity_ColorRGBA*)_NativeInstance)->SetAlpha(theAlpha);
}// 比较是否不同
bool Macad::Occt::Quantity_ColorRGBA::IsDifferent(Macad::Occt::Quantity_ColorRGBA^ theOther)
{bool _result = ((::Quantity_ColorRGBA*)_NativeInstance)->IsDifferent(*(::Quantity_ColorRGBA*)theOther->NativeInstance);return _result;
}// 比较是否相等
bool Macad::Occt::Quantity_ColorRGBA::IsEqual(Macad::Occt::Quantity_ColorRGBA^ theOther)
{bool _result = ((::Quantity_ColorRGBA*)_NativeInstance)->IsEqual(*(::Quantity_ColorRGBA*)theOther->NativeInstance);return _result;
}// 从颜色名称字符串获取颜色
bool Macad::Occt::Quantity_ColorRGBA::ColorFromName(System::String^ theColorNameString, Macad::Occt::Quantity_ColorRGBA^ theColor)
{const char* sz_theColorNameString = (char*)(void*)Marshal::StringToHGlobalAnsi(theColorNameString);bool _result = ::Quantity_ColorRGBA::ColorFromName(sz_theColorNameString, *(::Quantity_ColorRGBA*)theColor->NativeInstance);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theColorNameString);return _result;
}// 从十六进制颜色字符串获取颜色
bool Macad::Occt::Quantity_ColorRGBA::ColorFromHex(char theHexColorString, Macad::Occt::Quantity_ColorRGBA^ theColor, bool theAlphaComponentIsOff)
{pin_ptr<char> pp_theHexColorString = &theHexColorString;bool _result = ::Quantity_ColorRGBA::ColorFromHex((char*)pp_theHexColorString, *(::Quantity_ColorRGBA*)theColor->NativeInstance, theAlphaComponentIsOff);return _result;
}// 从十六进制颜色字符串获取颜色
bool Macad::Occt::Quantity_ColorRGBA::ColorFromHex(char theHexColorString, Macad::Occt::Quantity_ColorRGBA^ theColor)
{pin_ptr<char> pp_theHexColorString = &theHexColorString;bool _result = ::Quantity_ColorRGBA::ColorFromHex((char*)pp_theHexColorString, *(::Quantity_ColorRGBA*)theColor->NativeInstance, false);return _result;
}// 将颜色转换为十六进制字符串表示
Macad::Occt::TCollection_AsciiString^ Macad::Occt::Quantity_ColorRGBA::ColorToHex(Macad::Occt::Quantity_ColorRGBA^ theColor, bool theToPrefixHash)
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Quantity_ColorRGBA::ColorToHex(*(::Quantity_ColorRGBA*)theColor->NativeInstance, theToPrefixHash);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}// 将颜色转换为十六进制字符串表示
Macad::Occt::TCollection_AsciiString^ Macad::Occt::Quantity_ColorRGBA::ColorToHex(Macad::Occt::Quantity_ColorRGBA^ theColor)
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Quantity_ColorRGBA::ColorToHex(*(::Quantity_ColorRGBA*)theColor->NativeInstance, true);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}// 转换线性RGB到sRGB
Macad::Occt::Graphic3d_Vec4^ Macad::Occt::Quantity_ColorRGBA::Convert_LinearRGB_To_sRGB(Macad::Occt::Graphic3d_Vec4^ theRGB)
{::Graphic3d_Vec4* _result = new ::Graphic3d_Vec4();*_result = ::Quantity_ColorRGBA::Convert_LinearRGB_To_sRGB(*(::Graphic3d_Vec4*)theRGB->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::Graphic3d_Vec4(_result);
}// 转换sRGB到线性RGB
Macad::Occt::Graphic3d_Vec4^ Macad::Occt::Quantity_ColorRGBA::Convert_sRGB_To_LinearRGB(Macad::Occt::Graphic3d_Vec4^ theRGB)
{::Graphic3d_Vec4* _result = new ::Graphic3d_Vec4();*_result = ::Quantity_ColorRGBA::Convert_sRGB_To_LinearRGB(*(::Graphic3d_Vec4*)theRGB->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::Graphic3d_Vec4(_result);
}// 将颜色信息转储为JSON格式字符串
void Macad::Occt::Quantity_ColorRGBA::DumpJson(System::IO::TextWriter^ theOStream, int theDepth)
{std::ostringstream oss_theOStream;((::Quantity_ColorRGBA*)_NativeInstance)->DumpJson(oss_theOStream, theDepth);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}// 将颜色信息转储为JSON格式字符串
void Macad::Occt::Quantity_ColorRGBA::DumpJson(System::IO::TextWriter^ theOStream)
{std::ostringstream oss_theOStream;((::Quantity_ColorRGBA*)_NativeInstance)->DumpJson(oss_theOStream, -1);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}//---------------------------------------------------------------------
//  Class  Quantity_Period
//---------------------------------------------------------------------// 构造函数,传入天、小时、分钟、秒、毫秒和微秒
Macad::Occt::Quantity_Period::Quantity_Period(int dd, int hh, int mn, int ss, int mis, int mics): Macad::Occt::BaseClass<::Quantity_Period>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Period(dd, hh, mn, ss, mis, mics);
}// 构造函数,传入天、小时、分钟、秒和毫秒
Macad::Occt::Quantity_Period::Quantity_Period(int dd, int hh, int mn, int ss, int mis): Macad::Occt::BaseClass<::Quantity_Period>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Period(dd, hh, mn, ss, mis, 0);
}// 构造函数,传入天、小时、分钟和秒
Macad::Occt::Quantity_Period::Quantity_Period(int dd, int hh, int mn, int ss): Macad::Occt::BaseClass<::Quantity_Period>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Period(dd, hh, mn, ss, 0, 0);
}// 构造函数,传入秒和微秒
Macad::Occt::Quantity_Period::Quantity_Period(int ss, int mics): Macad::Occt::BaseClass<::Quantity_Period>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Period(ss, mics);
}// 构造函数,传入秒
Macad::Occt::Quantity_Period::Quantity_Period(int ss): Macad::Occt::BaseClass<::Quantity_Period>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Period(ss, 0);
}// 复制构造函数
Macad::Occt::Quantity_Period::Quantity_Period(Macad::Occt::Quantity_Period^ parameter1): Macad::Occt::BaseClass<::Quantity_Period>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Period(*(::Quantity_Period*)parameter1->NativeInstance);
}// 获取时间段的各个成员的值
void Macad::Occt::Quantity_Period::Values(int% dd, int% hh, int% mn, int% ss, int% mis, int% mics)
{pin_ptr<int> pp_dd = &dd;pin_ptr<int> pp_hh = &hh;pin_ptr<int> pp_mn = &mn;pin_ptr<int> pp_ss = &ss;pin_ptr<int> pp_mis = &mis;pin_ptr<int> pp_mics = &mics;((::Quantity_Period*)_NativeInstance)->Values(*(int*)pp_dd, *(int*)pp_hh, *(int*)pp_mn, *(int*)pp_ss, *(int*)pp_mis, *(int*)pp_mics);
}// 获取时间段的秒和微秒的值
void Macad::Occt::Quantity_Period::Values(int% ss, int% mics)
{pin_ptr<int> pp_ss = &ss;pin_ptr<int> pp_mics = &mics;((::Quantity_Period*)_NativeInstance)->Values(*(int*)pp_ss, *(int*)pp_mics);
}// 设置时间段的各个成员的值
void Macad::Occt::Quantity_Period::SetValues(int dd, int hh, int mn, int ss, int mis, int mics)
{((::Quantity_Period*)_NativeInstance)->SetValues(dd, hh, mn, ss, mis, mics);
}// 设置时间段的各个成员的值
void Macad::Occt::Quantity_Period::SetValues(int dd, int hh, int mn, int ss, int mis)
{((::Quantity_Period*)_NativeInstance)->SetValues(dd, hh, mn, ss, mis, 0);
}// 设置时间段的各个成员的值
void Macad::Occt::Quantity_Period::SetValues(int dd, int hh, int mn, int ss)
{((::Quantity_Period*)_NativeInstance)->SetValues(dd, hh, mn, ss, 0, 0);
}// 设置时间段的秒和微秒的值
void Macad::Occt::Quantity_Period::SetValues(int ss, int mics)
{((::Quantity_Period*)_NativeInstance)->SetValues(ss, mics);
}// 设置时间段的秒的值
void Macad::Occt::Quantity_Period::SetValues(int ss)
{((::Quantity_Period*)_NativeInstance)->SetValues(ss, 0);
}// 时间段相减
Macad::Occt::Quantity_Period^ Macad::Occt::Quantity_Period::Subtract(Macad::Occt::Quantity_Period^ anOther)
{throw gcnew System::NotImplementedException();
}// 时间段相加
Macad::Occt::Quantity_Period^ Macad::Occt::Quantity_Period::Add(Macad::Occt::Quantity_Period^ anOther)
{throw gcnew System::NotImplementedException();
}// 判断时间段是否相等
bool Macad::Occt::Quantity_Period::IsEqual(Macad::Occt::Quantity_Period^ anOther)
{bool _result = ((::Quantity_Period*)_NativeInstance)->IsEqual(*(::Quantity_Period*)anOther->NativeInstance);return _result;
}// 判断时间段是否短于另一个时间段
bool Macad::Occt::Quantity_Period::IsShorter(Macad::Occt::Quantity_Period^ anOther)
{bool _result = ((::Quantity_Period*)_NativeInstance)->IsShorter(*(::Quantity_Period*)anOther->NativeInstance);return _result;
}// 判断时间段是否长于另一个时间段
bool Macad::Occt::Quantity_Period::IsLonger(Macad::Occt::Quantity_Period^ anOther)
{bool _result = ((::Quantity_Period*)_NativeInstance)->IsLonger(*(::Quantity_Period*)anOther->NativeInstance);return _result;
}// 判断时间段的有效性
bool Macad::Occt::Quantity_Period::IsValid(int dd, int hh, int mn, int ss, int mis, int mics)
{bool _result = ::Quantity_Period::IsValid(dd, hh, mn, ss, mis, mics);return _result;
}// 判断时间段的有效性
bool Macad::Occt::Quantity_Period::IsValid(int dd, int hh, int mn, int ss, int mis)
{bool _result = ::Quantity_Period::IsValid(dd, hh, mn, ss, mis, 0);return _result;
}// 判断时间段的有效性
bool Macad::Occt::Quantity_Period::IsValid(int dd, int hh, int mn, int ss)
{bool _result = ::Quantity_Period::IsValid(dd, hh, mn, ss, 0, 0);return _result;
}// 判断时间段的有效性
bool Macad::Occt::Quantity_Period::IsValid(int ss, int mics)
{bool _result = ::Quantity_Period::IsValid(ss, mics);return _result;
}// 判断时间段的有效性
bool Macad::Occt::Quantity_Period::IsValid(int ss)
{bool _result = ::Quantity_Period::IsValid(ss, 0);return _result;
}
//---------------------------------------------------------------------
//  Class  Quantity_Date
//---------------------------------------------------------------------// 默认构造函数
Macad::Occt::Quantity_Date::Quantity_Date(): Macad::Occt::BaseClass<::Quantity_Date>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Date();
}// 构造函数,传入月、日、年、小时、分钟、秒、毫秒和微秒
Macad::Occt::Quantity_Date::Quantity_Date(int mm, int dd, int yyyy, int hh, int mn, int ss, int mis, int mics): Macad::Occt::BaseClass<::Quantity_Date>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Date(mm, dd, yyyy, hh, mn, ss, mis, mics);
}// 构造函数,传入月、日、年、小时、分钟、秒和毫秒
Macad::Occt::Quantity_Date::Quantity_Date(int mm, int dd, int yyyy, int hh, int mn, int ss, int mis): Macad::Occt::BaseClass<::Quantity_Date>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Date(mm, dd, yyyy, hh, mn, ss, mis, 0);
}// 构造函数,传入月、日、年、小时、分钟和秒
Macad::Occt::Quantity_Date::Quantity_Date(int mm, int dd, int yyyy, int hh, int mn, int ss): Macad::Occt::BaseClass<::Quantity_Date>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Date(mm, dd, yyyy, hh, mn, ss, 0, 0);
}// 复制构造函数
Macad::Occt::Quantity_Date::Quantity_Date(Macad::Occt::Quantity_Date^ parameter1): Macad::Occt::BaseClass<::Quantity_Date>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_Date(*(::Quantity_Date*)parameter1->NativeInstance);
}// 获取日期的各个成员的值
void Macad::Occt::Quantity_Date::Values(int% mm, int% dd, int% yy, int% hh, int% mn, int% ss, int% mis, int% mics)
{pin_ptr<int> pp_mm = &mm;pin_ptr<int> pp_dd = &dd;pin_ptr<int> pp_yy = &yy;pin_ptr<int> pp_hh = &hh;pin_ptr<int> pp_mn = &mn;pin_ptr<int> pp_ss = &ss;pin_ptr<int> pp_mis = &mis;pin_ptr<int> pp_mics = &mics;((::Quantity_Date*)_NativeInstance)->Values(*(int*)pp_mm, *(int*)pp_dd, *(int*)pp_yy, *(int*)pp_hh, *(int*)pp_mn, *(int*)pp_ss, *(int*)pp_mis, *(int*)pp_mics);
}// 设置日期的各个成员的值
void Macad::Occt::Quantity_Date::SetValues(int mm, int dd, int yy, int hh, int mn, int ss, int mis, int mics)
{((::Quantity_Date*)_NativeInstance)->SetValues(mm, dd, yy, hh, mn, ss, mis, mics);
}// 设置日期的各个成员的值
void Macad::Occt::Quantity_Date::SetValues(int mm, int dd, int yy, int hh, int mn, int ss, int mis)
{((::Quantity_Date*)_NativeInstance)->SetValues(mm, dd, yy, hh, mn, ss, mis, 0);
}// 设置日期的各个成员的值
void Macad::Occt::Quantity_Date::SetValues(int mm, int dd, int yy, int hh, int mn, int ss)
{((::Quantity_Date*)_NativeInstance)->SetValues(mm, dd, yy, hh, mn, ss, 0, 0);
}// 计算日期之间的时间段
Macad::Occt::Quantity_Period^ Macad::Occt::Quantity_Date::Difference(Macad::Occt::Quantity_Date^ anOther)
{throw gcnew System::NotImplementedException();
}// 从日期中减去一个时间段
Macad::Occt::Quantity_Date^ Macad::Occt::Quantity_Date::Subtract(Macad::Occt::Quantity_Period^ aPeriod)
{::Quantity_Date* _result = new ::Quantity_Date();*_result = ((::Quantity_Date*)_NativeInstance)->Subtract(*(::Quantity_Period*)aPeriod->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Date(_result);
}// 向日期添加一个时间段
Macad::Occt::Quantity_Date^ Macad::Occt::Quantity_Date::Add(Macad::Occt::Quantity_Period^ aPeriod)
{::Quantity_Date* _result = new ::Quantity_Date();*_result = ((::Quantity_Date*)_NativeInstance)->Add(*(::Quantity_Period*)aPeriod->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Date(_result);
}// 获取年份
int Macad::Occt::Quantity_Date::Year()
{int _result = ((::Quantity_Date*)_NativeInstance)->Year();return _result;
}// 获取月份
int Macad::Occt::Quantity_Date::Month()
{int _result = ((::Quantity_Date*)_NativeInstance)->Month();return _result;
}// 获取日期
int Macad::Occt::Quantity_Date::Day()
{int _result = ((::Quantity_Date*)_NativeInstance)->Day();return _result;
}// 获取小时
int Macad::Occt::Quantity_Date::Hour()
{int _result = ((::Quantity_Date*)_NativeInstance)->Hour();return _result;
}// 获取分钟
int Macad::Occt::Quantity_Date::Minute()
{int _result = ((::Quantity_Date*)_NativeInstance)->Minute();return _result;
}// 获取秒数
int Macad::Occt::Quantity_Date::Second()
{int _result = ((::Quantity_Date*)_NativeInstance)->Second();return _result;
}// 获取毫秒数
int Macad::Occt::Quantity_Date::MilliSecond()
{int _result = ((::Quantity_Date*)_NativeInstance)->MilliSecond();return _result;
}// 获取微秒数
int Macad::Occt::Quantity_Date::MicroSecond()
{int _result = ((::Quantity_Date*)_NativeInstance)->MicroSecond();return _result;
}// 判断日期是否相等
bool Macad::Occt::Quantity_Date::IsEqual(Macad::Occt::Quantity_Date^ anOther)
{bool _result = ((::Quantity_Date*)_NativeInstance)->IsEqual(*(::Quantity_Date*)anOther->NativeInstance);return _result;
}// 判断日期是否在另一个日期之前
bool Macad::Occt::Quantity_Date::IsEarlier(Macad::Occt::Quantity_Date^ anOther)
{bool _result = ((::Quantity_Date*)_NativeInstance)->IsEarlier(*(::Quantity_Date*)anOther->NativeInstance);return _result;
}// 判断日期是否在另一个日期之后
bool Macad::Occt::Quantity_Date::IsLater(Macad::Occt::Quantity_Date^ anOther)
{bool _result = ((::Quantity_Date*)_NativeInstance)->IsLater(*(::Quantity_Date*)anOther->NativeInstance);return _result;
}// 判断日期的有效性
bool Macad::Occt::Quantity_Date::IsValid(int mm, int dd, int yy, int hh, int mn, int ss, int mis, int mics)
{bool _result = ::Quantity_Date::IsValid(mm, dd, yy, hh, mn, ss, mis, mics);return _result;
}// 判断日期的有效性
bool Macad::Occt::Quantity_Date::IsValid(int mm, int dd, int yy, int hh, int mn, int ss, int mis)
{bool _result = ::Quantity_Date::IsValid(mm, dd, yy, hh, mn, ss, mis, 0);return _result;
}// 判断日期的有效性
bool Macad::Occt::Quantity_Date::IsValid(int mm, int dd, int yy, int hh, int mn, int ss)
{bool _result = ::Quantity_Date::IsValid(mm, dd, yy, hh, mn, ss, 0, 0);return _result;
}// 判断是否为闰年
bool Macad::Occt::Quantity_Date::IsLeap(int yy)
{bool _result = ::Quantity_Date::IsLeap(yy);return _result;
}
//---------------------------------------------------------------------
//  Class  Quantity_DateDefinitionError
//---------------------------------------------------------------------// 默认构造函数
Macad::Occt::Quantity_DateDefinitionError::Quantity_DateDefinitionError(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_DateDefinitionError();
}// 带消息参数的构造函数
Macad::Occt::Quantity_DateDefinitionError::Quantity_DateDefinitionError(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Quantity_DateDefinitionError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}// 带消息和堆栈跟踪参数的构造函数
Macad::Occt::Quantity_DateDefinitionError::Quantity_DateDefinitionError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Quantity_DateDefinitionError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}// 复制构造函数
Macad::Occt::Quantity_DateDefinitionError::Quantity_DateDefinitionError(Macad::Occt::Quantity_DateDefinitionError^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_DateDefinitionError(*(::Quantity_DateDefinitionError*)parameter1->NativeInstance);
}// 抛出异常
void Macad::Occt::Quantity_DateDefinitionError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Quantity_DateDefinitionError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}// 抛出异常
void Macad::Occt::Quantity_DateDefinitionError::Raise()
{::Quantity_DateDefinitionError::Raise("");
}// 创建异常实例
Macad::Occt::Quantity_DateDefinitionError^ Macad::Occt::Quantity_DateDefinitionError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Quantity_DateDefinitionError) _result = ::Quantity_DateDefinitionError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Quantity_DateDefinitionError::CreateDowncasted(_result.get());
}// 创建异常实例
Macad::Occt::Quantity_DateDefinitionError^ Macad::Occt::Quantity_DateDefinitionError::NewInstance()
{Handle(::Quantity_DateDefinitionError) _result = ::Quantity_DateDefinitionError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Quantity_DateDefinitionError::CreateDowncasted(_result.get());
}// 创建异常实例
Macad::Occt::Quantity_DateDefinitionError^ Macad::Occt::Quantity_DateDefinitionError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Quantity_DateDefinitionError) _result = ::Quantity_DateDefinitionError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Quantity_DateDefinitionError::CreateDowncasted(_result.get());
}// 创建异常实例
Macad::Occt::Quantity_DateDefinitionError^ Macad::Occt::Quantity_DateDefinitionError::CreateDowncasted(::Quantity_DateDefinitionError* instance)
{return gcnew Macad::Occt::Quantity_DateDefinitionError( instance );
}//---------------------------------------------------------------------
//  Class  Quantity_HArray1OfColor
//---------------------------------------------------------------------// 默认构造函数
Macad::Occt::Quantity_HArray1OfColor::Quantity_HArray1OfColor(): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_HArray1OfColor();
}// 构造函数,传入数组下限和上限
Macad::Occt::Quantity_HArray1OfColor::Quantity_HArray1OfColor(int theLower, int theUpper): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_HArray1OfColor(theLower, theUpper);
}// 构造函数,传入数组下限、上限和初始值
Macad::Occt::Quantity_HArray1OfColor::Quantity_HArray1OfColor(int theLower, int theUpper, Macad::Occt::Quantity_Color^ theValue): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_HArray1OfColor(theLower, theUpper, *(::Quantity_Color*)theValue->NativeInstance);
}// 复制构造函数
Macad::Occt::Quantity_HArray1OfColor::Quantity_HArray1OfColor(Macad::Occt::Quantity_Array1OfColor^ theOther): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_HArray1OfColor(*(::Quantity_Array1OfColor*)theOther->NativeInstance);
}// 复制构造函数
Macad::Occt::Quantity_HArray1OfColor::Quantity_HArray1OfColor(Macad::Occt::Quantity_HArray1OfColor^ parameter1): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_HArray1OfColor(*(::Quantity_HArray1OfColor*)parameter1->NativeInstance);
}// 获取数组的内容
Macad::Occt::Quantity_Array1OfColor^ Macad::Occt::Quantity_HArray1OfColor::Array1()
{::Quantity_Array1OfColor* _result = new ::Quantity_Array1OfColor();*_result = (::Quantity_Array1OfColor)((::Quantity_HArray1OfColor*)_NativeInstance)->Array1();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Array1OfColor(_result);
}// 获取数组的内容并使其可修改
Macad::Occt::Quantity_Array1OfColor^ Macad::Occt::Quantity_HArray1OfColor::ChangeArray1()
{::Quantity_Array1OfColor* _result = new ::Quantity_Array1OfColor();*_result = ((::Quantity_HArray1OfColor*)_NativeInstance)->ChangeArray1();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Array1OfColor(_result);
}// 初始化数组的所有元素为给定值
void Macad::Occt::Quantity_HArray1OfColor::Init(Macad::Occt::Quantity_Color^ theValue)
{((::Quantity_HArray1OfColor*)_NativeInstance)->Init(*(::Quantity_Color*)theValue->NativeInstance);
}// 返回数组的大小
int Macad::Occt::Quantity_HArray1OfColor::Size()
{int _result = ((::Quantity_HArray1OfColor*)_NativeInstance)->Size();return _result;
}// 返回数组的长度
int Macad::Occt::Quantity_HArray1OfColor::Length()
{int _result = ((::Quantity_HArray1OfColor*)_NativeInstance)->Length();return _result;
}// 判断数组是否为空
bool Macad::Occt::Quantity_HArray1OfColor::IsEmpty()
{bool _result = ((::Quantity_HArray1OfColor*)_NativeInstance)->IsEmpty();return _result;
}// 返回数组的下限
int Macad::Occt::Quantity_HArray1OfColor::Lower()
{int _result = ((::Quantity_HArray1OfColor*)_NativeInstance)->Lower();return _result;
}// 返回数组的上限
int Macad::Occt::Quantity_HArray1OfColor::Upper()
{int _result = ((::Quantity_HArray1OfColor*)_NativeInstance)->Upper();return _result;
}// 判断数组是否可删除
bool Macad::Occt::Quantity_HArray1OfColor::IsDeletable()
{bool _result = ((::Quantity_HArray1OfColor*)_NativeInstance)->IsDeletable();return _result;
}// 判断数组是否已分配内存
bool Macad::Occt::Quantity_HArray1OfColor::IsAllocated()
{bool _result = ((::Quantity_HArray1OfColor*)_NativeInstance)->IsAllocated();return _result;
}// 赋值操作
Macad::Occt::Quantity_HArray1OfColor^ Macad::Occt::Quantity_HArray1OfColor::Assign(Macad::Occt::Quantity_HArray1OfColor^ theOther)
{::Quantity_HArray1OfColor* _result = new ::Quantity_HArray1OfColor();*_result = ((::Quantity_HArray1OfColor*)_NativeInstance)->Assign(*(::Quantity_HArray1OfColor*)theOther->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_HArray1OfColor(_result);
}// 移动赋值操作
Macad::Occt::Quantity_HArray1OfColor^ Macad::Occt::Quantity_HArray1OfColor::Move(Macad::Occt::Quantity_HArray1OfColor^ theOther)
{::Quantity_HArray1OfColor* _result = new ::Quantity_HArray1OfColor();*_result = ((::Quantity_HArray1OfColor*)_NativeInstance)->Move(*(::Quantity_HArray1OfColor*)theOther->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_HArray1OfColor(_result);
}// 返回数组的第一个元素
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::First()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = (::Quantity_Color)((::Quantity_HArray1OfColor*)_NativeInstance)->First();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 返回数组的第一个元素并使其可修改
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::ChangeFirst()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = ((::Quantity_HArray1OfColor*)_NativeInstance)->ChangeFirst();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 返回数组的最后一个元素
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::Last()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = (::Quantity_Color)((::Quantity_HArray1OfColor*)_NativeInstance)->Last();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 返回数组的最后一个元素并使其可修改
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::ChangeLast()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = ((::Quantity_HArray1OfColor*)_NativeInstance)->ChangeLast();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 返回数组指定索引处的元素
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::Value(int theIndex)
{::Quantity_Color* _result = new ::Quantity_Color();*_result = (::Quantity_Color)((::Quantity_HArray1OfColor*)_NativeInstance)->Value(theIndex);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 返回数组指定索引处的元素并使其可修改
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::ChangeValue(int theIndex)
{::Quantity_Color* _result = new ::Quantity_Color();*_result = ((::Quantity_HArray1OfColor*)_NativeInstance)->ChangeValue(theIndex);return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 设置数组指定索引处的元素
void Macad::Occt::Quantity_HArray1OfColor::SetValue(int theIndex, Macad::Occt::Quantity_Color^ theItem)
{((::Quantity_HArray1OfColor*)_NativeInstance)->SetValue(theIndex, *(::Quantity_Color*)theItem->NativeInstance);
}// 调整数组的大小,并可以选择是否拷贝数据
void Macad::Occt::Quantity_HArray1OfColor::Resize(int theLower, int theUpper, bool theToCopyData)
{((::Quantity_HArray1OfColor*)_NativeInstance)->Resize(theLower, theUpper, theToCopyData);
}// 创建指定类型的对象实例
Macad::Occt::Quantity_HArray1OfColor^ Macad::Occt::Quantity_HArray1OfColor::CreateDowncasted(::Quantity_HArray1OfColor* instance)
{return gcnew Macad::Occt::Quantity_HArray1OfColor( instance );
}// 返回一个枚举器,允许对数组进行迭代访问
System::Collections::Generic::IEnumerator<Macad::Occt::Quantity_Color^>^ Macad::Occt::Quantity_HArray1OfColor::GetEnumerator()
{return gcnew IndexEnumerator<Macad::Occt::Quantity_Color^>(this, Lower(), Upper());
}// 返回一个枚举器,允许对数组进行迭代访问
System::Collections::IEnumerator^ Macad::Occt::Quantity_HArray1OfColor::GetEnumerator2()
{return gcnew IndexEnumerator<Macad::Occt::Quantity_Color^>(this, Lower(), Upper());
}
//---------------------------------------------------------------------
//  Class  Quantity_HArray1OfColor::Iterator
//---------------------------------------------------------------------// 默认构造函数
Macad::Occt::Quantity_HArray1OfColor::Iterator::Iterator(): Macad::Occt::BaseClass<::Quantity_HArray1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_HArray1OfColor::Iterator();
}// 带参数的构造函数
Macad::Occt::Quantity_HArray1OfColor::Iterator::Iterator(Macad::Occt::Quantity_HArray1OfColor^ theArray, bool theToEnd): Macad::Occt::BaseClass<::Quantity_HArray1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_HArray1OfColor::Iterator(*(::Quantity_HArray1OfColor*)theArray->NativeInstance, theToEnd);
}// 带参数的构造函数
Macad::Occt::Quantity_HArray1OfColor::Iterator::Iterator(Macad::Occt::Quantity_HArray1OfColor^ theArray): Macad::Occt::BaseClass<::Quantity_HArray1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_HArray1OfColor::Iterator(*(::Quantity_HArray1OfColor*)theArray->NativeInstance, false);
}// 复制构造函数
Macad::Occt::Quantity_HArray1OfColor::Iterator::Iterator(Macad::Occt::Quantity_HArray1OfColor::Iterator^ parameter1): Macad::Occt::BaseClass<::Quantity_HArray1OfColor::Iterator>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Quantity_HArray1OfColor::Iterator(*(::Quantity_HArray1OfColor::Iterator*)parameter1->NativeInstance);
}// 初始化迭代器
void Macad::Occt::Quantity_HArray1OfColor::Iterator::Init(Macad::Occt::Quantity_HArray1OfColor^ theArray)
{((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->Init(*(::Quantity_HArray1OfColor*)theArray->NativeInstance);
}// 判断是否还有元素可以遍历
bool Macad::Occt::Quantity_HArray1OfColor::Iterator::More()
{bool _result = ((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->More();return _result;
}// 移动到下一个元素
void Macad::Occt::Quantity_HArray1OfColor::Iterator::Next()
{((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->Next();
}// 移动到前一个元素
void Macad::Occt::Quantity_HArray1OfColor::Iterator::Previous()
{((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->Previous();
}// 偏移迭代器指针
void Macad::Occt::Quantity_HArray1OfColor::Iterator::Offset(long long int theOffset)
{((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->Offset(theOffset);
}// 返回与另一个迭代器的差距
long long int Macad::Occt::Quantity_HArray1OfColor::Iterator::Differ(Macad::Occt::Quantity_HArray1OfColor::Iterator^ theOther)
{long long int _result = ((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->Differ(*(::Quantity_HArray1OfColor::Iterator*)theOther->NativeInstance);return _result;
}// 返回当前元素的值
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::Iterator::Value()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = (::Quantity_Color)((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->Value();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 返回当前元素的引用并使其可修改
Macad::Occt::Quantity_Color^ Macad::Occt::Quantity_HArray1OfColor::Iterator::ChangeValue()
{::Quantity_Color* _result = new ::Quantity_Color();*_result = ((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->ChangeValue();return _result==nullptr ? nullptr : gcnew Macad::Occt::Quantity_Color(_result);
}// 判断两个迭代器是否相等
bool Macad::Occt::Quantity_HArray1OfColor::Iterator::IsEqual(Macad::Occt::Quantity_HArray1OfColor::Iterator^ theOther)
{bool _result = ((::Quantity_HArray1OfColor::Iterator*)_NativeInstance)->IsEqual(*(::Quantity_HArray1OfColor::Iterator*)theOther->NativeInstance);return _result;
}//---------------------------------------------------------------------
//  Class  Quantity_PeriodDefinitionError
//---------------------------------------------------------------------// 默认构造函数
Macad::Occt::Quantity_PeriodDefinitionError::Quantity_PeriodDefinitionError(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_PeriodDefinitionError();
}// 带参数的构造函数
Macad::Occt::Quantity_PeriodDefinitionError::Quantity_PeriodDefinitionError(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Quantity_PeriodDefinitionError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}// 带参数的构造函数
Macad::Occt::Quantity_PeriodDefinitionError::Quantity_PeriodDefinitionError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Quantity_PeriodDefinitionError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}// 复制构造函数
Macad::Occt::Quantity_PeriodDefinitionError::Quantity_PeriodDefinitionError(Macad::Occt::Quantity_PeriodDefinitionError^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Quantity_PeriodDefinitionError(*(::Quantity_PeriodDefinitionError*)parameter1->NativeInstance);
}// 抛出异常
void Macad::Occt::Quantity_PeriodDefinitionError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Quantity_PeriodDefinitionError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}// 抛出异常
void Macad::Occt::Quantity_PeriodDefinitionError::Raise()
{::Quantity_PeriodDefinitionError::Raise("");
}// 创建异常实例
Macad::Occt::Quantity_PeriodDefinitionError^ Macad::Occt::Quantity_PeriodDefinitionError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Quantity_PeriodDefinitionError) _result = ::Quantity_PeriodDefinitionError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Quantity_PeriodDefinitionError::CreateDowncasted(_result.get());
}// 创建异常实例
Macad::Occt::Quantity_PeriodDefinitionError^ Macad::Occt::Quantity_PeriodDefinitionError::NewInstance()
{Handle(::Quantity_PeriodDefinitionError) _result = ::Quantity_PeriodDefinitionError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Quantity_PeriodDefinitionError::CreateDowncasted(_result.get());
}// 创建异常实例
Macad::Occt::Quantity_PeriodDefinitionError^ Macad::Occt::Quantity_PeriodDefinitionError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Quantity_PeriodDefinitionError) _result = ::Quantity_PeriodDefinitionError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Quantity_PeriodDefinitionError::CreateDowncasted(_result.get());
}// 创建指定类型的对象实例
Macad::Occt::Quantity_PeriodDefinitionError^ Macad::Occt::Quantity_PeriodDefinitionError::CreateDowncasted(::Quantity_PeriodDefinitionError* instance)
{return gcnew Macad::Occt::Quantity_PeriodDefinitionError( instance );
}

这段代码似乎是与处理 Open CASCADE Technology(OCCT)库中的颜色相关的一组类和方法。以下是关键组件及其用途的分解:

Quantity_Period 类

Quantity_Date 类

  • Quantity_Array1OfColor:这个类表示颜色数组。它提供了初始化、访问和修改数组的方法。
  • Quantity_Color:这个类表示颜色。它提供了创建颜色、访问颜色分量(RGB、HLS)、在不同颜色空间(sRGB、LinearRGB、HLS、Lab、Lch)之间转换、计算颜色差异等方法。
  • Quantity_ColorHasher 和 Quantity_ColorRGBAHasher:这些类提供了颜色和 RGBA 颜色的哈希函数。
  • Quantity_ColorHasher::HashCode 和 Quantity_ColorHasher::IsEqual:这些方法使用哈希函数计算哈希码并测试颜色之间的相等性。
  • Quantity_ColorRGBAHasher::HashCode 和 Quantity_ColorRGBAHasher::IsEqual:类似于 Quantity_ColorHasher,但专门针对 RGBA 颜色。
  • Iterator:这个类表示遍历 Quantity_Array1OfColor 实例的迭代器。
  • Quantity_ColorRGBA 类

  • 构造函数:提供了多个重载的构造函数,用于创建 Quantity_ColorRGBA 对象。
  • SetValues 方法:设置颜色的 RGBA 值。
  • GetRGB 方法:获取颜色的 RGB 值。
  • ChangeRGB 方法:改变颜色的 RGB 值。
  • Alpha 方法:获取颜色的 Alpha 值。
  • SetAlpha 方法:设置颜色的 Alpha 值。
  • IsDifferent 方法:检查两个颜色是否不同。
  • IsEqual 方法:检查两个颜色是否相等。
  • ColorFromName 和 ColorFromHex 方法:根据名称或十六进制字符串设置颜色。
  • ColorToHex 方法:将颜色转换为十六进制字符串。
  • Convert_LinearRGB_To_sRGB 和 Convert_sRGB_To_LinearRGB 方法:在线性 RGB 和 sRGB 之间进行转换。
  • DumpJson 方法:将颜色信息输出为 JSON 格式。
  • 构造函数:提供了多个重载的构造函数,用于创建 Quantity_Period 对象。
  • Values 方法:获取周期的值。
  • SetValues 方法:设置周期的值。
  • Subtract 和 Add 方法:计算周期的差值和和值。
  • IsEqual、IsShorter 和 IsLonger 方法:比较两个周期的大小。
  • IsValid 方法:检查周期是否有效。
  • 构造函数:提供了多个重载的构造函数,用于创建 Quantity_Date 对象。
  • Values 方法:获取日期时间的值。
  • SetValues 方法:设置日期时间的值。
  • Difference、Subtract 和 Add 方法:计算日期时间之间的差值和和值。
  • Year、Month、Day、Hour、Minute、Second、MilliSecond 和 MicroSecond 方法:获取日期时间的各个部分。
  • IsEqual、IsEarlier 和 IsLater 方法:比较两个日期时间的先后。
  • IsValid 和 IsLeap 方法:检查日期时间是否有效,以及年份是否是闰年。

Quantity_DateDefinitionError:这个类似乎处理与日期定义相关的错误。它提供构造函数,用于创建带有可选消息和堆栈跟踪的实例,以及用于抛出异常的方法,可以包含消息或不包含消息。

Quantity_HArray1OfColor:这个类表示一维颜色数组。它提供了不同初始化参数的构造函数,如下限和上限,以及用于数组操作的方法,如调整大小、赋值、移动和访问单个元素。此外,它实现了IEnumerable,以允许对其元素进行迭代。

Quantity_HArray1OfColor::Iterator:这个类作为Quantity_HArray1OfColor的迭代器。它允许遍历数组元素,并提供用于导航和访问当前值的方法。

Quantity_PeriodDefinitionError:类似于Quantity_DateDefinitionError,这个类处理与周期定义相关的错误。它提供了与Quantity_DateDefinitionError类似的构造函数和方法,用于错误处理。

8.

// Generated wrapper code for package Standard#include "OcctPCH.h"
#include "Standard.h"using namespace System::Runtime::InteropServices; // for class Marshal#include "TCollection.h"
#include "Quantity.h"
#include "TShort.h"
#include "TColStd.h"
#include "Bnd.h"
#include "TColgp.h"
#include "Geom.h"
#include "ProjLib.h"
#include "BRepAdaptor.h"
#include "TopTools.h"
#include "ShapeAnalysis.h"
#include "AIS.h"
#include "StdFail.h"
#include "gp.h"
#include "Geom2d.h"
#include "GProp.h"
#include "TopoDS.h"
#include "BRepExtrema.h"
#include "V3d.h"
#include "Prs3d.h"
#include "Aspect.h"
#include "Graphic3d.h"//---------------------------------------------------------------------
//  Class  Standard_DumpValue
//---------------------------------------------------------------------Macad::Occt::Standard_DumpValue::Standard_DumpValue(): Macad::Occt::BaseClass<::Standard_DumpValue>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_DumpValue();
}Macad::Occt::Standard_DumpValue::Standard_DumpValue(Macad::Occt::TCollection_AsciiString^ theValue, int theStartPos): Macad::Occt::BaseClass<::Standard_DumpValue>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_DumpValue(*(::TCollection_AsciiString*)theValue->NativeInstance, theStartPos);
}Macad::Occt::Standard_DumpValue::Standard_DumpValue(Macad::Occt::Standard_DumpValue^ parameter1): Macad::Occt::BaseClass<::Standard_DumpValue>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_DumpValue(*(::Standard_DumpValue*)parameter1->NativeInstance);
}//---------------------------------------------------------------------
//  Class  Standard_UUID
//---------------------------------------------------------------------Macad::Occt::Standard_UUID::Standard_UUID(): Macad::Occt::BaseClass<::Standard_UUID>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_UUID();
}Macad::Occt::Standard_UUID::Standard_UUID(Macad::Occt::Standard_UUID^ parameter1): Macad::Occt::BaseClass<::Standard_UUID>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_UUID(*(::Standard_UUID*)parameter1->NativeInstance);
}//---------------------------------------------------------------------
//  Class  Standard
//---------------------------------------------------------------------Macad::Occt::Standard::Standard(): Macad::Occt::BaseClass<::Standard>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard();
}Macad::Occt::Standard::Standard(Macad::Occt::Standard^ parameter1): Macad::Occt::BaseClass<::Standard>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard(*(::Standard*)parameter1->NativeInstance);
}System::IntPtr Macad::Occt::Standard::Allocate(long long unsigned int aSize)
{void* _result = ::Standard::Allocate(aSize);return System::IntPtr(_result);
}void Macad::Occt::Standard::Free(System::IntPtr thePtr)
{::Standard::Free(thePtr.ToPointer());
}System::IntPtr Macad::Occt::Standard::Reallocate(System::IntPtr aStorage, long long unsigned int aNewSize)
{void* _result = ::Standard::Reallocate(aStorage.ToPointer(), aNewSize);return System::IntPtr(_result);
}System::IntPtr Macad::Occt::Standard::AllocateAligned(long long unsigned int theSize, long long unsigned int theAlign)
{void* _result = ::Standard::AllocateAligned(theSize, theAlign);return System::IntPtr(_result);
}void Macad::Occt::Standard::FreeAligned(System::IntPtr thePtrAligned)
{::Standard::FreeAligned(thePtrAligned.ToPointer());
}int Macad::Occt::Standard::Purge()
{int _result = ::Standard::Purge();return _result;
}bool Macad::Occt::Standard::StackTrace(char% theBuffer, int theBufferSize, int theNbTraces, System::IntPtr theContext, int theNbTopSkip)
{pin_ptr<char> pp_theBuffer = &theBuffer;bool _result = ::Standard::StackTrace((char*)pp_theBuffer, theBufferSize, theNbTraces, theContext.ToPointer(), theNbTopSkip);return _result;
}bool Macad::Occt::Standard::StackTrace(char% theBuffer, int theBufferSize, int theNbTraces, System::IntPtr theContext)
{pin_ptr<char> pp_theBuffer = &theBuffer;bool _result = ::Standard::StackTrace((char*)pp_theBuffer, theBufferSize, theNbTraces, theContext.ToPointer(), 0);return _result;
}bool Macad::Occt::Standard::StackTrace(char% theBuffer, int theBufferSize, int theNbTraces)
{pin_ptr<char> pp_theBuffer = &theBuffer;bool _result = ::Standard::StackTrace((char*)pp_theBuffer, theBufferSize, theNbTraces, 0, 0);return _result;
}//---------------------------------------------------------------------
//  Class  Standard_Failure
//---------------------------------------------------------------------Macad::Occt::Standard_Failure::Standard_Failure(): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Failure();
}Macad::Occt::Standard_Failure::Standard_Failure(Macad::Occt::Standard_Failure^ f): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Failure(*(::Standard_Failure*)f->NativeInstance);
}Macad::Occt::Standard_Failure::Standard_Failure(System::String^ theDesc): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{const char* sz_theDesc = (char*)(void*)Marshal::StringToHGlobalAnsi(theDesc);NativeInstance = new ::Standard_Failure(sz_theDesc);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theDesc);
}Macad::Occt::Standard_Failure::Standard_Failure(System::String^ theDesc, System::String^ theStackTrace): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{const char* sz_theDesc = (char*)(void*)Marshal::StringToHGlobalAnsi(theDesc);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_Failure(sz_theDesc, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theDesc);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}void Macad::Occt::Standard_Failure::Print(System::IO::TextWriter^ theStream)
{std::ostringstream oss_theStream;((::Standard_Failure*)_NativeInstance)->Print(oss_theStream);theStream->Write(gcnew System::String(oss_theStream.str().c_str()));
}System::String^ Macad::Occt::Standard_Failure::GetMessageString()
{Standard_CString _result = ((::Standard_Failure*)_NativeInstance)->GetMessageString();return gcnew System::String(_result);
}void Macad::Occt::Standard_Failure::SetMessageString(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);((::Standard_Failure*)_NativeInstance)->SetMessageString(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}System::String^ Macad::Occt::Standard_Failure::GetStackString()
{Standard_CString _result = ((::Standard_Failure*)_NativeInstance)->GetStackString();return gcnew System::String(_result);
}void Macad::Occt::Standard_Failure::SetStackString(System::String^ theStack)
{const char* sz_theStack = (char*)(void*)Marshal::StringToHGlobalAnsi(theStack);((::Standard_Failure*)_NativeInstance)->SetStackString(sz_theStack);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStack);
}void Macad::Occt::Standard_Failure::Reraise()
{((::Standard_Failure*)_NativeInstance)->Reraise();
}void Macad::Occt::Standard_Failure::Reraise(System::String^ aMessage)
{const char* sz_aMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(aMessage);((::Standard_Failure*)_NativeInstance)->Reraise(sz_aMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_aMessage);
}void Macad::Occt::Standard_Failure::Raise(System::String^ aMessage)
{const char* sz_aMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(aMessage);::Standard_Failure::Raise(sz_aMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_aMessage);
}void Macad::Occt::Standard_Failure::Raise()
{::Standard_Failure::Raise("");
}Macad::Occt::Standard_Failure^ Macad::Occt::Standard_Failure::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_Failure) _result = ::Standard_Failure::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_Failure::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Failure^ Macad::Occt::Standard_Failure::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_Failure) _result = ::Standard_Failure::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_Failure::CreateDowncasted(_result.get());
}int Macad::Occt::Standard_Failure::DefaultStackTraceLength()
{int _result = ::Standard_Failure::DefaultStackTraceLength();return _result;
}void Macad::Occt::Standard_Failure::SetDefaultStackTraceLength(int theNbStackTraces)
{::Standard_Failure::SetDefaultStackTraceLength(theNbStackTraces);
}void Macad::Occt::Standard_Failure::Jump()
{((::Standard_Failure*)_NativeInstance)->Jump();
}Macad::Occt::Standard_Failure^ Macad::Occt::Standard_Failure::CreateDowncasted(::Standard_Failure* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Standard_DomainError)))return Macad::Occt::Standard_DomainError::CreateDowncasted((::Standard_DomainError*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_ProgramError)))return Macad::Occt::Standard_ProgramError::CreateDowncasted((::Standard_ProgramError*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_AbortiveTransaction)))return Macad::Occt::Standard_AbortiveTransaction::CreateDowncasted((::Standard_AbortiveTransaction*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_NumericError)))return Macad::Occt::Standard_NumericError::CreateDowncasted((::Standard_NumericError*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_LicenseError)))return Macad::Occt::Standard_LicenseError::CreateDowncasted((::Standard_LicenseError*)instance);if (instance->IsKind(STANDARD_TYPE(::StdFail_InfiniteSolutions)))return Macad::Occt::StdFail_InfiniteSolutions::CreateDowncasted((::StdFail_InfiniteSolutions*)instance);if (instance->IsKind(STANDARD_TYPE(::StdFail_NotDone)))return Macad::Occt::StdFail_NotDone::CreateDowncasted((::StdFail_NotDone*)instance);if (instance->IsKind(STANDARD_TYPE(::StdFail_Undefined)))return Macad::Occt::StdFail_Undefined::CreateDowncasted((::StdFail_Undefined*)instance);return gcnew Macad::Occt::Standard_Failure( instance );
}//---------------------------------------------------------------------
//  Class  Standard_DomainError
//---------------------------------------------------------------------Macad::Occt::Standard_DomainError::Standard_DomainError(): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DomainError();
}Macad::Occt::Standard_DomainError::Standard_DomainError(System::String^ theMessage): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_DomainError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_DomainError::Standard_DomainError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_DomainError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_DomainError::Standard_DomainError(Macad::Occt::Standard_DomainError^ parameter1): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DomainError(*(::Standard_DomainError*)parameter1->NativeInstance);
}void Macad::Occt::Standard_DomainError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_DomainError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_DomainError::Raise()
{::Standard_DomainError::Raise("");
}Macad::Occt::Standard_DomainError^ Macad::Occt::Standard_DomainError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_DomainError) _result = ::Standard_DomainError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DomainError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DomainError^ Macad::Occt::Standard_DomainError::NewInstance()
{Handle(::Standard_DomainError) _result = ::Standard_DomainError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_DomainError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DomainError^ Macad::Occt::Standard_DomainError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_DomainError) _result = ::Standard_DomainError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DomainError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DomainError^ Macad::Occt::Standard_DomainError::CreateDowncasted(::Standard_DomainError* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Standard_ConstructionError)))return Macad::Occt::Standard_ConstructionError::CreateDowncasted((::Standard_ConstructionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_RangeError)))return Macad::Occt::Standard_RangeError::CreateDowncasted((::Standard_RangeError*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_DimensionError)))return Macad::Occt::Standard_DimensionError::CreateDowncasted((::Standard_DimensionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_NoSuchObject)))return Macad::Occt::Standard_NoSuchObject::CreateDowncasted((::Standard_NoSuchObject*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_TypeMismatch)))return Macad::Occt::Standard_TypeMismatch::CreateDowncasted((::Standard_TypeMismatch*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_ImmutableObject)))return Macad::Occt::Standard_ImmutableObject::CreateDowncasted((::Standard_ImmutableObject*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_MultiplyDefined)))return Macad::Occt::Standard_MultiplyDefined::CreateDowncasted((::Standard_MultiplyDefined*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_NoMoreObject)))return Macad::Occt::Standard_NoMoreObject::CreateDowncasted((::Standard_NoMoreObject*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_NullObject)))return Macad::Occt::Standard_NullObject::CreateDowncasted((::Standard_NullObject*)instance);if (instance->IsKind(STANDARD_TYPE(::Quantity_DateDefinitionError)))return Macad::Occt::Quantity_DateDefinitionError::CreateDowncasted((::Quantity_DateDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Quantity_PeriodDefinitionError)))return Macad::Occt::Quantity_PeriodDefinitionError::CreateDowncasted((::Quantity_PeriodDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::StdFail_UndefinedDerivative)))return Macad::Occt::StdFail_UndefinedDerivative::CreateDowncasted((::StdFail_UndefinedDerivative*)instance);if (instance->IsKind(STANDARD_TYPE(::StdFail_UndefinedValue)))return Macad::Occt::StdFail_UndefinedValue::CreateDowncasted((::StdFail_UndefinedValue*)instance);if (instance->IsKind(STANDARD_TYPE(::gp_VectorWithNullMagnitude)))return Macad::Occt::gp_VectorWithNullMagnitude::CreateDowncasted((::gp_VectorWithNullMagnitude*)instance);if (instance->IsKind(STANDARD_TYPE(::Geom2d_UndefinedDerivative)))return Macad::Occt::Geom2d_UndefinedDerivative::CreateDowncasted((::Geom2d_UndefinedDerivative*)instance);if (instance->IsKind(STANDARD_TYPE(::Geom2d_UndefinedValue)))return Macad::Occt::Geom2d_UndefinedValue::CreateDowncasted((::Geom2d_UndefinedValue*)instance);if (instance->IsKind(STANDARD_TYPE(::GProp_UndefinedAxis)))return Macad::Occt::GProp_UndefinedAxis::CreateDowncasted((::GProp_UndefinedAxis*)instance);if (instance->IsKind(STANDARD_TYPE(::Geom_UndefinedDerivative)))return Macad::Occt::Geom_UndefinedDerivative::CreateDowncasted((::Geom_UndefinedDerivative*)instance);if (instance->IsKind(STANDARD_TYPE(::Geom_UndefinedValue)))return Macad::Occt::Geom_UndefinedValue::CreateDowncasted((::Geom_UndefinedValue*)instance);if (instance->IsKind(STANDARD_TYPE(::TopoDS_FrozenShape)))return Macad::Occt::TopoDS_FrozenShape::CreateDowncasted((::TopoDS_FrozenShape*)instance);if (instance->IsKind(STANDARD_TYPE(::TopoDS_LockedShape)))return Macad::Occt::TopoDS_LockedShape::CreateDowncasted((::TopoDS_LockedShape*)instance);if (instance->IsKind(STANDARD_TYPE(::TopoDS_UnCompatibleShapes)))return Macad::Occt::TopoDS_UnCompatibleShapes::CreateDowncasted((::TopoDS_UnCompatibleShapes*)instance);if (instance->IsKind(STANDARD_TYPE(::BRepExtrema_UnCompatibleShape)))return Macad::Occt::BRepExtrema_UnCompatibleShape::CreateDowncasted((::BRepExtrema_UnCompatibleShape*)instance);if (instance->IsKind(STANDARD_TYPE(::V3d_UnMapped)))return Macad::Occt::V3d_UnMapped::CreateDowncasted((::V3d_UnMapped*)instance);return gcnew Macad::Occt::Standard_DomainError( instance );
}//---------------------------------------------------------------------
//  Class  Standard_ConstructionError
//---------------------------------------------------------------------Macad::Occt::Standard_ConstructionError::Standard_ConstructionError(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_ConstructionError();
}Macad::Occt::Standard_ConstructionError::Standard_ConstructionError(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_ConstructionError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_ConstructionError::Standard_ConstructionError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_ConstructionError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_ConstructionError::Standard_ConstructionError(Macad::Occt::Standard_ConstructionError^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_ConstructionError(*(::Standard_ConstructionError*)parameter1->NativeInstance);
}void Macad::Occt::Standard_ConstructionError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_ConstructionError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_ConstructionError::Raise()
{::Standard_ConstructionError::Raise("");
}Macad::Occt::Standard_ConstructionError^ Macad::Occt::Standard_ConstructionError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_ConstructionError) _result = ::Standard_ConstructionError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_ConstructionError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ConstructionError^ Macad::Occt::Standard_ConstructionError::NewInstance()
{Handle(::Standard_ConstructionError) _result = ::Standard_ConstructionError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_ConstructionError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ConstructionError^ Macad::Occt::Standard_ConstructionError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_ConstructionError) _result = ::Standard_ConstructionError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_ConstructionError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ConstructionError^ Macad::Occt::Standard_ConstructionError::CreateDowncasted(::Standard_ConstructionError* instance)
{return gcnew Macad::Occt::Standard_ConstructionError( instance );
}//---------------------------------------------------------------------
//  Class  Standard_RangeError
//---------------------------------------------------------------------Macad::Occt::Standard_RangeError::Standard_RangeError(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_RangeError();
}Macad::Occt::Standard_RangeError::Standard_RangeError(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_RangeError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_RangeError::Standard_RangeError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_RangeError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_RangeError::Standard_RangeError(Macad::Occt::Standard_RangeError^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_RangeError(*(::Standard_RangeError*)parameter1->NativeInstance);
}void Macad::Occt::Standard_RangeError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_RangeError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_RangeError::Raise()
{::Standard_RangeError::Raise("");
}Macad::Occt::Standard_RangeError^ Macad::Occt::Standard_RangeError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_RangeError) _result = ::Standard_RangeError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_RangeError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_RangeError^ Macad::Occt::Standard_RangeError::NewInstance()
{Handle(::Standard_RangeError) _result = ::Standard_RangeError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_RangeError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_RangeError^ Macad::Occt::Standard_RangeError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_RangeError) _result = ::Standard_RangeError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_RangeError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_RangeError^ Macad::Occt::Standard_RangeError::CreateDowncasted(::Standard_RangeError* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Standard_OutOfRange)))return Macad::Occt::Standard_OutOfRange::CreateDowncasted((::Standard_OutOfRange*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_NegativeValue)))return Macad::Occt::Standard_NegativeValue::CreateDowncasted((::Standard_NegativeValue*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_NullValue)))return Macad::Occt::Standard_NullValue::CreateDowncasted((::Standard_NullValue*)instance);if (instance->IsKind(STANDARD_TYPE(::Prs3d_InvalidAngle)))return Macad::Occt::Prs3d_InvalidAngle::CreateDowncasted((::Prs3d_InvalidAngle*)instance);return gcnew Macad::Occt::Standard_RangeError( instance );
}
//---------------------------------------------------------------------
//  Class  Standard_OutOfRange
//---------------------------------------------------------------------Macad::Occt::Standard_OutOfRange::Standard_OutOfRange(): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_OutOfRange();
}Macad::Occt::Standard_OutOfRange::Standard_OutOfRange(System::String^ theMessage): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_OutOfRange(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_OutOfRange::Standard_OutOfRange(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_OutOfRange(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_OutOfRange::Standard_OutOfRange(Macad::Occt::Standard_OutOfRange^ parameter1): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_OutOfRange(*(::Standard_OutOfRange*)parameter1->NativeInstance);
}void Macad::Occt::Standard_OutOfRange::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_OutOfRange::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_OutOfRange::Raise()
{::Standard_OutOfRange::Raise("");
}Macad::Occt::Standard_OutOfRange^ Macad::Occt::Standard_OutOfRange::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_OutOfRange) _result = ::Standard_OutOfRange::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_OutOfRange::CreateDowncasted(_result.get());
}Macad::Occt::Standard_OutOfRange^ Macad::Occt::Standard_OutOfRange::NewInstance()
{Handle(::Standard_OutOfRange) _result = ::Standard_OutOfRange::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_OutOfRange::CreateDowncasted(_result.get());
}Macad::Occt::Standard_OutOfRange^ Macad::Occt::Standard_OutOfRange::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_OutOfRange) _result = ::Standard_OutOfRange::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_OutOfRange::CreateDowncasted(_result.get());
}Macad::Occt::Standard_OutOfRange^ Macad::Occt::Standard_OutOfRange::CreateDowncasted(::Standard_OutOfRange* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Aspect_AspectFillAreaDefinitionError)))return Macad::Occt::Aspect_AspectFillAreaDefinitionError::CreateDowncasted((::Aspect_AspectFillAreaDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Aspect_AspectLineDefinitionError)))return Macad::Occt::Aspect_AspectLineDefinitionError::CreateDowncasted((::Aspect_AspectLineDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Aspect_AspectMarkerDefinitionError)))return Macad::Occt::Aspect_AspectMarkerDefinitionError::CreateDowncasted((::Aspect_AspectMarkerDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Aspect_DisplayConnectionDefinitionError)))return Macad::Occt::Aspect_DisplayConnectionDefinitionError::CreateDowncasted((::Aspect_DisplayConnectionDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Aspect_GraphicDeviceDefinitionError)))return Macad::Occt::Aspect_GraphicDeviceDefinitionError::CreateDowncasted((::Aspect_GraphicDeviceDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Aspect_IdentDefinitionError)))return Macad::Occt::Aspect_IdentDefinitionError::CreateDowncasted((::Aspect_IdentDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Aspect_WindowDefinitionError)))return Macad::Occt::Aspect_WindowDefinitionError::CreateDowncasted((::Aspect_WindowDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Aspect_WindowError)))return Macad::Occt::Aspect_WindowError::CreateDowncasted((::Aspect_WindowError*)instance);if (instance->IsKind(STANDARD_TYPE(::Graphic3d_GroupDefinitionError)))return Macad::Occt::Graphic3d_GroupDefinitionError::CreateDowncasted((::Graphic3d_GroupDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Graphic3d_MaterialDefinitionError)))return Macad::Occt::Graphic3d_MaterialDefinitionError::CreateDowncasted((::Graphic3d_MaterialDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Graphic3d_PriorityDefinitionError)))return Macad::Occt::Graphic3d_PriorityDefinitionError::CreateDowncasted((::Graphic3d_PriorityDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::Graphic3d_StructureDefinitionError)))return Macad::Occt::Graphic3d_StructureDefinitionError::CreateDowncasted((::Graphic3d_StructureDefinitionError*)instance);if (instance->IsKind(STANDARD_TYPE(::V3d_BadValue)))return Macad::Occt::V3d_BadValue::CreateDowncasted((::V3d_BadValue*)instance);return gcnew Macad::Occt::Standard_OutOfRange( instance );
}//---------------------------------------------------------------------
//  Class  Standard_DimensionError
//---------------------------------------------------------------------Macad::Occt::Standard_DimensionError::Standard_DimensionError(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DimensionError();
}Macad::Occt::Standard_DimensionError::Standard_DimensionError(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_DimensionError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_DimensionError::Standard_DimensionError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_DimensionError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_DimensionError::Standard_DimensionError(Macad::Occt::Standard_DimensionError^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DimensionError(*(::Standard_DimensionError*)parameter1->NativeInstance);
}void Macad::Occt::Standard_DimensionError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_DimensionError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_DimensionError::Raise()
{::Standard_DimensionError::Raise("");
}Macad::Occt::Standard_DimensionError^ Macad::Occt::Standard_DimensionError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_DimensionError) _result = ::Standard_DimensionError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DimensionError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DimensionError^ Macad::Occt::Standard_DimensionError::NewInstance()
{Handle(::Standard_DimensionError) _result = ::Standard_DimensionError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_DimensionError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DimensionError^ Macad::Occt::Standard_DimensionError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_DimensionError) _result = ::Standard_DimensionError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DimensionError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DimensionError^ Macad::Occt::Standard_DimensionError::CreateDowncasted(::Standard_DimensionError* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Standard_DimensionMismatch)))return Macad::Occt::Standard_DimensionMismatch::CreateDowncasted((::Standard_DimensionMismatch*)instance);return gcnew Macad::Occt::Standard_DimensionError( instance );
}//---------------------------------------------------------------------
//  Class  Standard_DimensionMismatch
//---------------------------------------------------------------------Macad::Occt::Standard_DimensionMismatch::Standard_DimensionMismatch(): Macad::Occt::Standard_DimensionError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DimensionMismatch();
}Macad::Occt::Standard_DimensionMismatch::Standard_DimensionMismatch(System::String^ theMessage): Macad::Occt::Standard_DimensionError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_DimensionMismatch(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_DimensionMismatch::Standard_DimensionMismatch(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DimensionError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_DimensionMismatch(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_DimensionMismatch::Standard_DimensionMismatch(Macad::Occt::Standard_DimensionMismatch^ parameter1): Macad::Occt::Standard_DimensionError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DimensionMismatch(*(::Standard_DimensionMismatch*)parameter1->NativeInstance);
}void Macad::Occt::Standard_DimensionMismatch::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_DimensionMismatch::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_DimensionMismatch::Raise()
{::Standard_DimensionMismatch::Raise("");
}Macad::Occt::Standard_DimensionMismatch^ Macad::Occt::Standard_DimensionMismatch::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_DimensionMismatch) _result = ::Standard_DimensionMismatch::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DimensionMismatch::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DimensionMismatch^ Macad::Occt::Standard_DimensionMismatch::NewInstance()
{Handle(::Standard_DimensionMismatch) _result = ::Standard_DimensionMismatch::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_DimensionMismatch::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DimensionMismatch^ Macad::Occt::Standard_DimensionMismatch::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_DimensionMismatch) _result = ::Standard_DimensionMismatch::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DimensionMismatch::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DimensionMismatch^ Macad::Occt::Standard_DimensionMismatch::CreateDowncasted(::Standard_DimensionMismatch* instance)
{return gcnew Macad::Occt::Standard_DimensionMismatch( instance );
}//---------------------------------------------------------------------
//  Class  Standard_ProgramError
//---------------------------------------------------------------------Macad::Occt::Standard_ProgramError::Standard_ProgramError(): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_ProgramError();
}Macad::Occt::Standard_ProgramError::Standard_ProgramError(System::String^ theMessage): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_ProgramError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_ProgramError::Standard_ProgramError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_ProgramError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_ProgramError::Standard_ProgramError(Macad::Occt::Standard_ProgramError^ parameter1): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_ProgramError(*(::Standard_ProgramError*)parameter1->NativeInstance);
}void Macad::Occt::Standard_ProgramError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_ProgramError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_ProgramError::Raise()
{::Standard_ProgramError::Raise("");
}Macad::Occt::Standard_ProgramError^ Macad::Occt::Standard_ProgramError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_ProgramError) _result = ::Standard_ProgramError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_ProgramError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ProgramError^ Macad::Occt::Standard_ProgramError::NewInstance()
{Handle(::Standard_ProgramError) _result = ::Standard_ProgramError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_ProgramError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ProgramError^ Macad::Occt::Standard_ProgramError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_ProgramError) _result = ::Standard_ProgramError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_ProgramError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ProgramError^ Macad::Occt::Standard_ProgramError::CreateDowncasted(::Standard_ProgramError* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Standard_OutOfMemory)))return Macad::Occt::Standard_OutOfMemory::CreateDowncasted((::Standard_OutOfMemory*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_NotImplemented)))return Macad::Occt::Standard_NotImplemented::CreateDowncasted((::Standard_NotImplemented*)instance);return gcnew Macad::Occt::Standard_ProgramError( instance );
}//---------------------------------------------------------------------
//  Class  Standard_OutOfMemory
//---------------------------------------------------------------------Macad::Occt::Standard_OutOfMemory::Standard_OutOfMemory(System::String^ theMessage): Macad::Occt::Standard_ProgramError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_OutOfMemory(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_OutOfMemory::Standard_OutOfMemory(): Macad::Occt::Standard_ProgramError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_OutOfMemory(0);
}Macad::Occt::Standard_OutOfMemory::Standard_OutOfMemory(Macad::Occt::Standard_OutOfMemory^ parameter1): Macad::Occt::Standard_ProgramError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_OutOfMemory(*(::Standard_OutOfMemory*)parameter1->NativeInstance);
}System::String^ Macad::Occt::Standard_OutOfMemory::GetMessageString()
{Standard_CString _result = ((::Standard_OutOfMemory*)_NativeInstance)->GetMessageString();return gcnew System::String(_result);
}void Macad::Occt::Standard_OutOfMemory::SetMessageString(System::String^ aMessage)
{const char* sz_aMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(aMessage);((::Standard_OutOfMemory*)_NativeInstance)->SetMessageString(sz_aMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_aMessage);
}void Macad::Occt::Standard_OutOfMemory::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_OutOfMemory::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_OutOfMemory::Raise()
{::Standard_OutOfMemory::Raise("");
}Macad::Occt::Standard_OutOfMemory^ Macad::Occt::Standard_OutOfMemory::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_OutOfMemory) _result = ::Standard_OutOfMemory::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_OutOfMemory::CreateDowncasted(_result.get());
}Macad::Occt::Standard_OutOfMemory^ Macad::Occt::Standard_OutOfMemory::NewInstance()
{Handle(::Standard_OutOfMemory) _result = ::Standard_OutOfMemory::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_OutOfMemory::CreateDowncasted(_result.get());
}Macad::Occt::Standard_OutOfMemory^ Macad::Occt::Standard_OutOfMemory::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_OutOfMemory) _result = ::Standard_OutOfMemory::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_OutOfMemory::CreateDowncasted(_result.get());
}Macad::Occt::Standard_OutOfMemory^ Macad::Occt::Standard_OutOfMemory::CreateDowncasted(::Standard_OutOfMemory* instance)
{return gcnew Macad::Occt::Standard_OutOfMemory( instance );
}
//---------------------------------------------------------------------
//  Class  Standard_NoSuchObject
//---------------------------------------------------------------------Macad::Occt::Standard_NoSuchObject::Standard_NoSuchObject(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_NoSuchObject();
}Macad::Occt::Standard_NoSuchObject::Standard_NoSuchObject(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_NoSuchObject(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_NoSuchObject::Standard_NoSuchObject(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_NoSuchObject(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_NoSuchObject::Standard_NoSuchObject(Macad::Occt::Standard_NoSuchObject^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_NoSuchObject(*(::Standard_NoSuchObject*)parameter1->NativeInstance);
}void Macad::Occt::Standard_NoSuchObject::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_NoSuchObject::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_NoSuchObject::Raise()
{::Standard_NoSuchObject::Raise("");
}Macad::Occt::Standard_NoSuchObject^ Macad::Occt::Standard_NoSuchObject::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_NoSuchObject) _result = ::Standard_NoSuchObject::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_NoSuchObject::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NoSuchObject^ Macad::Occt::Standard_NoSuchObject::NewInstance()
{Handle(::Standard_NoSuchObject) _result = ::Standard_NoSuchObject::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_NoSuchObject::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NoSuchObject^ Macad::Occt::Standard_NoSuchObject::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_NoSuchObject) _result = ::Standard_NoSuchObject::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_NoSuchObject::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NoSuchObject^ Macad::Occt::Standard_NoSuchObject::CreateDowncasted(::Standard_NoSuchObject* instance)
{return gcnew Macad::Occt::Standard_NoSuchObject( instance );
}//---------------------------------------------------------------------
//  Class  Standard_TypeMismatch
//---------------------------------------------------------------------Macad::Occt::Standard_TypeMismatch::Standard_TypeMismatch(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_TypeMismatch();
}Macad::Occt::Standard_TypeMismatch::Standard_TypeMismatch(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_TypeMismatch(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_TypeMismatch::Standard_TypeMismatch(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_TypeMismatch(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_TypeMismatch::Standard_TypeMismatch(Macad::Occt::Standard_TypeMismatch^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_TypeMismatch(*(::Standard_TypeMismatch*)parameter1->NativeInstance);
}void Macad::Occt::Standard_TypeMismatch::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_TypeMismatch::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_TypeMismatch::Raise()
{::Standard_TypeMismatch::Raise("");
}Macad::Occt::Standard_TypeMismatch^ Macad::Occt::Standard_TypeMismatch::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_TypeMismatch) _result = ::Standard_TypeMismatch::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_TypeMismatch::CreateDowncasted(_result.get());
}Macad::Occt::Standard_TypeMismatch^ Macad::Occt::Standard_TypeMismatch::NewInstance()
{Handle(::Standard_TypeMismatch) _result = ::Standard_TypeMismatch::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_TypeMismatch::CreateDowncasted(_result.get());
}Macad::Occt::Standard_TypeMismatch^ Macad::Occt::Standard_TypeMismatch::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_TypeMismatch) _result = ::Standard_TypeMismatch::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_TypeMismatch::CreateDowncasted(_result.get());
}Macad::Occt::Standard_TypeMismatch^ Macad::Occt::Standard_TypeMismatch::CreateDowncasted(::Standard_TypeMismatch* instance)
{return gcnew Macad::Occt::Standard_TypeMismatch( instance );
}//---------------------------------------------------------------------
//  Class  Standard_Dump
//---------------------------------------------------------------------Macad::Occt::Standard_Dump::Standard_Dump(): Macad::Occt::BaseClass<::Standard_Dump>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_Dump();
}Macad::Occt::Standard_Dump::Standard_Dump(Macad::Occt::Standard_Dump^ parameter1): Macad::Occt::BaseClass<::Standard_Dump>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_Dump(*(::Standard_Dump*)parameter1->NativeInstance);
}bool Macad::Occt::Standard_Dump::HasChildKey(Macad::Occt::TCollection_AsciiString^ theSourceValue)
{bool _result = ::Standard_Dump::HasChildKey(*(::TCollection_AsciiString*)theSourceValue->NativeInstance);return _result;
}System::String^ Macad::Occt::Standard_Dump::JsonKeyToString(Macad::Occt::Standard_JsonKey theKey)
{Standard_CString _result = ::Standard_Dump::JsonKeyToString((::Standard_JsonKey)theKey);return gcnew System::String(_result);
}int Macad::Occt::Standard_Dump::JsonKeyLength(Macad::Occt::Standard_JsonKey theKey)
{int _result = ::Standard_Dump::JsonKeyLength((::Standard_JsonKey)theKey);return _result;
}void Macad::Occt::Standard_Dump::AddValuesSeparator(System::IO::TextWriter^ theOStream)
{std::ostringstream oss_theOStream;::Standard_Dump::AddValuesSeparator(oss_theOStream);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Standard_Dump::GetPointerPrefix()
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Standard_Dump::GetPointerPrefix();return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Standard_Dump::GetPointerInfo(Macad::Occt::Standard_Transient^ thePointer, bool isShortInfo)
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Standard_Dump::GetPointerInfo(Handle(::Standard_Transient)(thePointer->NativeInstance), isShortInfo);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Standard_Dump::GetPointerInfo(Macad::Occt::Standard_Transient^ thePointer)
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Standard_Dump::GetPointerInfo(Handle(::Standard_Transient)(thePointer->NativeInstance), true);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Standard_Dump::GetPointerInfo(System::IntPtr thePointer, bool isShortInfo)
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Standard_Dump::GetPointerInfo(thePointer.ToPointer(), isShortInfo);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Standard_Dump::GetPointerInfo(System::IntPtr thePointer)
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Standard_Dump::GetPointerInfo(thePointer.ToPointer(), true);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}void Macad::Occt::Standard_Dump::DumpKeyToClass(System::IO::TextWriter^ theOStream, Macad::Occt::TCollection_AsciiString^ theKey, Macad::Occt::TCollection_AsciiString^ theField)
{std::ostringstream oss_theOStream;::Standard_Dump::DumpKeyToClass(oss_theOStream, *(::TCollection_AsciiString*)theKey->NativeInstance, *(::TCollection_AsciiString*)theField->NativeInstance);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}void Macad::Occt::Standard_Dump::DumpCharacterValues(System::IO::TextWriter^ theOStream, int theCount)
{std::ostringstream oss_theOStream;::Standard_Dump::DumpCharacterValues(oss_theOStream, theCount);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}void Macad::Occt::Standard_Dump::DumpRealValues(System::IO::TextWriter^ theOStream, int theCount)
{std::ostringstream oss_theOStream;::Standard_Dump::DumpRealValues(oss_theOStream, theCount);theOStream->Write(gcnew System::String(oss_theOStream.str().c_str()));
}bool Macad::Occt::Standard_Dump::ProcessStreamName(Macad::Occt::TCollection_AsciiString^ theStreamStr, Macad::Occt::TCollection_AsciiString^ theName, int% theStreamPos)
{pin_ptr<int> pp_theStreamPos = &theStreamPos;bool _result = ::Standard_Dump::ProcessStreamName(*(::TCollection_AsciiString*)theStreamStr->NativeInstance, *(::TCollection_AsciiString*)theName->NativeInstance, *(int*)pp_theStreamPos);return _result;
}bool Macad::Occt::Standard_Dump::ProcessFieldName(Macad::Occt::TCollection_AsciiString^ theStreamStr, Macad::Occt::TCollection_AsciiString^ theName, int% theStreamPos)
{pin_ptr<int> pp_theStreamPos = &theStreamPos;bool _result = ::Standard_Dump::ProcessFieldName(*(::TCollection_AsciiString*)theStreamStr->NativeInstance, *(::TCollection_AsciiString*)theName->NativeInstance, *(int*)pp_theStreamPos);return _result;
}bool Macad::Occt::Standard_Dump::InitRealValues(Macad::Occt::TCollection_AsciiString^ theStreamStr, int% theStreamPos, int theCount)
{pin_ptr<int> pp_theStreamPos = &theStreamPos;bool _result = ::Standard_Dump::InitRealValues(*(::TCollection_AsciiString*)theStreamStr->NativeInstance, *(int*)pp_theStreamPos, theCount);return _result;
}bool Macad::Occt::Standard_Dump::InitValue(Macad::Occt::TCollection_AsciiString^ theStreamStr, int% theStreamPos, Macad::Occt::TCollection_AsciiString^ theValue)
{pin_ptr<int> pp_theStreamPos = &theStreamPos;bool _result = ::Standard_Dump::InitValue(*(::TCollection_AsciiString*)theStreamStr->NativeInstance, *(int*)pp_theStreamPos, *(::TCollection_AsciiString*)theValue->NativeInstance);return _result;
}Macad::Occt::TCollection_AsciiString^ Macad::Occt::Standard_Dump::DumpFieldToName(Macad::Occt::TCollection_AsciiString^ theField)
{::TCollection_AsciiString* _result = new ::TCollection_AsciiString();*_result = ::Standard_Dump::DumpFieldToName(*(::TCollection_AsciiString*)theField->NativeInstance);return _result==nullptr ? nullptr : gcnew Macad::Occt::TCollection_AsciiString(_result);
}//---------------------------------------------------------------------
//  Class  Standard_AbortiveTransaction
//---------------------------------------------------------------------Macad::Occt::Standard_AbortiveTransaction::Standard_AbortiveTransaction(): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_AbortiveTransaction();
}Macad::Occt::Standard_AbortiveTransaction::Standard_AbortiveTransaction(System::String^ theMessage): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_AbortiveTransaction(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_AbortiveTransaction::Standard_AbortiveTransaction(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_AbortiveTransaction(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_AbortiveTransaction::Standard_AbortiveTransaction(Macad::Occt::Standard_AbortiveTransaction^ parameter1): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_AbortiveTransaction(*(::Standard_AbortiveTransaction*)parameter1->NativeInstance);
}void Macad::Occt::Standard_AbortiveTransaction::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_AbortiveTransaction::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_AbortiveTransaction::Raise()
{::Standard_AbortiveTransaction::Raise("");
}Macad::Occt::Standard_AbortiveTransaction^ Macad::Occt::Standard_AbortiveTransaction::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_AbortiveTransaction) _result = ::Standard_AbortiveTransaction::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_AbortiveTransaction::CreateDowncasted(_result.get());
}Macad::Occt::Standard_AbortiveTransaction^ Macad::Occt::Standard_AbortiveTransaction::NewInstance()
{Handle(::Standard_AbortiveTransaction) _result = ::Standard_AbortiveTransaction::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_AbortiveTransaction::CreateDowncasted(_result.get());
}Macad::Occt::Standard_AbortiveTransaction^ Macad::Occt::Standard_AbortiveTransaction::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_AbortiveTransaction) _result = ::Standard_AbortiveTransaction::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_AbortiveTransaction::CreateDowncasted(_result.get());
}Macad::Occt::Standard_AbortiveTransaction^ Macad::Occt::Standard_AbortiveTransaction::CreateDowncasted(::Standard_AbortiveTransaction* instance)
{return gcnew Macad::Occt::Standard_AbortiveTransaction( instance );
}//---------------------------------------------------------------------
//  Class  Standard_Condition
//---------------------------------------------------------------------Macad::Occt::Standard_Condition::Standard_Condition(bool theIsSet): Macad::Occt::BaseClass<::Standard_Condition>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_Condition(theIsSet);
}void Macad::Occt::Standard_Condition::Set()
{((::Standard_Condition*)_NativeInstance)->Set();
}void Macad::Occt::Standard_Condition::Reset()
{((::Standard_Condition*)_NativeInstance)->Reset();
}void Macad::Occt::Standard_Condition::Wait()
{((::Standard_Condition*)_NativeInstance)->Wait();
}bool Macad::Occt::Standard_Condition::Wait(int theTimeMilliseconds)
{bool _result = ((::Standard_Condition*)_NativeInstance)->Wait(theTimeMilliseconds);return _result;
}bool Macad::Occt::Standard_Condition::Check()
{bool _result = ((::Standard_Condition*)_NativeInstance)->Check();return _result;
}bool Macad::Occt::Standard_Condition::CheckReset()
{bool _result = ((::Standard_Condition*)_NativeInstance)->CheckReset();return _result;
}System::IntPtr Macad::Occt::Standard_Condition::getHandle()
{void* _result = ((::Standard_Condition*)_NativeInstance)->getHandle();return System::IntPtr(_result);
}//---------------------------------------------------------------------
//  Class  Standard_Persistent
//---------------------------------------------------------------------Macad::Occt::Standard_Persistent::Standard_Persistent(): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Persistent();
}Macad::Occt::Standard_Persistent::Standard_Persistent(Macad::Occt::Standard_Persistent^ parameter1): Macad::Occt::Standard_Transient(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Persistent(*(::Standard_Persistent*)parameter1->NativeInstance);
}Macad::Occt::Standard_Persistent^ Macad::Occt::Standard_Persistent::CreateDowncasted(::Standard_Persistent* instance)
{return gcnew Macad::Occt::Standard_Persistent( instance );
}//---------------------------------------------------------------------
//  Class  Standard_NumericError
//---------------------------------------------------------------------Macad::Occt::Standard_NumericError::Standard_NumericError(): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_NumericError();
}Macad::Occt::Standard_NumericError::Standard_NumericError(System::String^ theMessage): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_NumericError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_NumericError::Standard_NumericError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_NumericError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_NumericError::Standard_NumericError(Macad::Occt::Standard_NumericError^ parameter1): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_NumericError(*(::Standard_NumericError*)parameter1->NativeInstance);
}void Macad::Occt::Standard_NumericError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_NumericError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_NumericError::Raise()
{::Standard_NumericError::Raise("");
}Macad::Occt::Standard_NumericError^ Macad::Occt::Standard_NumericError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_NumericError) _result = ::Standard_NumericError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_NumericError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NumericError^ Macad::Occt::Standard_NumericError::NewInstance()
{Handle(::Standard_NumericError) _result = ::Standard_NumericError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_NumericError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NumericError^ Macad::Occt::Standard_NumericError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_NumericError) _result = ::Standard_NumericError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_NumericError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NumericError^ Macad::Occt::Standard_NumericError::CreateDowncasted(::Standard_NumericError* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Standard_DivideByZero)))return Macad::Occt::Standard_DivideByZero::CreateDowncasted((::Standard_DivideByZero*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_Overflow)))return Macad::Occt::Standard_Overflow::CreateDowncasted((::Standard_Overflow*)instance);if (instance->IsKind(STANDARD_TYPE(::Standard_Underflow)))return Macad::Occt::Standard_Underflow::CreateDowncasted((::Standard_Underflow*)instance);return gcnew Macad::Occt::Standard_NumericError( instance );
}
//---------------------------------------------------------------------
//  Class  Standard_DivideByZero
//---------------------------------------------------------------------Macad::Occt::Standard_DivideByZero::Standard_DivideByZero(): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DivideByZero();
}Macad::Occt::Standard_DivideByZero::Standard_DivideByZero(System::String^ theMessage): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_DivideByZero(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_DivideByZero::Standard_DivideByZero(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_DivideByZero(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_DivideByZero::Standard_DivideByZero(Macad::Occt::Standard_DivideByZero^ parameter1): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_DivideByZero(*(::Standard_DivideByZero*)parameter1->NativeInstance);
}void Macad::Occt::Standard_DivideByZero::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_DivideByZero::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_DivideByZero::Raise()
{::Standard_DivideByZero::Raise("");
}Macad::Occt::Standard_DivideByZero^ Macad::Occt::Standard_DivideByZero::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_DivideByZero) _result = ::Standard_DivideByZero::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DivideByZero::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DivideByZero^ Macad::Occt::Standard_DivideByZero::NewInstance()
{Handle(::Standard_DivideByZero) _result = ::Standard_DivideByZero::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_DivideByZero::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DivideByZero^ Macad::Occt::Standard_DivideByZero::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_DivideByZero) _result = ::Standard_DivideByZero::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_DivideByZero::CreateDowncasted(_result.get());
}Macad::Occt::Standard_DivideByZero^ Macad::Occt::Standard_DivideByZero::CreateDowncasted(::Standard_DivideByZero* instance)
{return gcnew Macad::Occt::Standard_DivideByZero( instance );
}//---------------------------------------------------------------------
//  Class  Standard_ErrorHandler
//---------------------------------------------------------------------Macad::Occt::Standard_ErrorHandler::Standard_ErrorHandler(): Macad::Occt::BaseClass<::Standard_ErrorHandler>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_ErrorHandler();
}Macad::Occt::Standard_ErrorHandler::Standard_ErrorHandler(Macad::Occt::Standard_ErrorHandler^ parameter1): Macad::Occt::BaseClass<::Standard_ErrorHandler>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_ErrorHandler(*(::Standard_ErrorHandler*)parameter1->NativeInstance);
}void Macad::Occt::Standard_ErrorHandler::Destroy()
{((::Standard_ErrorHandler*)_NativeInstance)->Destroy();
}void Macad::Occt::Standard_ErrorHandler::Unlink()
{((::Standard_ErrorHandler*)_NativeInstance)->Unlink();
}Macad::Occt::Standard_Failure^ Macad::Occt::Standard_ErrorHandler::Error()
{Handle(::Standard_Failure) _result = ((::Standard_ErrorHandler*)_NativeInstance)->Error();return _result.IsNull() ? nullptr : Macad::Occt::Standard_Failure::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Failure^ Macad::Occt::Standard_ErrorHandler::LastCaughtError()
{Handle(::Standard_Failure) _result = ::Standard_ErrorHandler::LastCaughtError();return _result.IsNull() ? nullptr : Macad::Occt::Standard_Failure::CreateDowncasted(_result.get());
}bool Macad::Occt::Standard_ErrorHandler::IsInTryBlock()
{bool _result = ::Standard_ErrorHandler::IsInTryBlock();return _result;
}//---------------------------------------------------------------------
//  Class  Standard_ErrorHandler::Callback
//---------------------------------------------------------------------Macad::Occt::Standard_ErrorHandler::Callback::Callback(Macad::Occt::Standard_ErrorHandler::Callback^ parameter1): Macad::Occt::BaseClass<::Standard_ErrorHandler::Callback>(BaseClass::InitMode::Uninitialized)
{throw gcnew System::NotImplementedException("Native class is abstract");
}void Macad::Occt::Standard_ErrorHandler::Callback::RegisterCallback()
{((::Standard_ErrorHandler::Callback*)_NativeInstance)->RegisterCallback();
}void Macad::Occt::Standard_ErrorHandler::Callback::UnregisterCallback()
{((::Standard_ErrorHandler::Callback*)_NativeInstance)->UnregisterCallback();
}void Macad::Occt::Standard_ErrorHandler::Callback::DestroyCallback()
{((::Standard_ErrorHandler::Callback*)_NativeInstance)->DestroyCallback();
}//---------------------------------------------------------------------
//  Class  Standard_GUID
//---------------------------------------------------------------------Macad::Occt::Standard_GUID::Standard_GUID(): Macad::Occt::BaseClass<::Standard_GUID>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_GUID();
}Macad::Occt::Standard_GUID::Standard_GUID(System::String^ aGuid): Macad::Occt::BaseClass<::Standard_GUID>(BaseClass::InitMode::Uninitialized)
{pin_ptr<const wchar_t> pp_aGuid = PtrToStringChars(aGuid);_NativeInstance = new ::Standard_GUID((Standard_ExtString)pp_aGuid);
}Macad::Occt::Standard_GUID::Standard_GUID(Macad::Occt::Standard_UUID^ aGuid): Macad::Occt::BaseClass<::Standard_GUID>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_GUID(*(::Standard_UUID*)aGuid->NativeInstance);
}Macad::Occt::Standard_GUID::Standard_GUID(Macad::Occt::Standard_GUID^ aGuid): Macad::Occt::BaseClass<::Standard_GUID>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_GUID(*(::Standard_GUID*)aGuid->NativeInstance);
}Macad::Occt::Standard_UUID^ Macad::Occt::Standard_GUID::ToUUID()
{::Standard_UUID* _result = new ::Standard_UUID();*_result = ((::Standard_GUID*)_NativeInstance)->ToUUID();return _result==nullptr ? nullptr : gcnew Macad::Occt::Standard_UUID(_result);
}void Macad::Occt::Standard_GUID::ToCString(char aStrGuid)
{pin_ptr<char> pp_aStrGuid = &aStrGuid;((::Standard_GUID*)_NativeInstance)->ToCString((char*)pp_aStrGuid);
}bool Macad::Occt::Standard_GUID::IsSame(Macad::Occt::Standard_GUID^ uid)
{bool _result = ((::Standard_GUID*)_NativeInstance)->IsSame(*(::Standard_GUID*)uid->NativeInstance);return _result;
}bool Macad::Occt::Standard_GUID::IsNotSame(Macad::Occt::Standard_GUID^ uid)
{bool _result = ((::Standard_GUID*)_NativeInstance)->IsNotSame(*(::Standard_GUID*)uid->NativeInstance);return _result;
}void Macad::Occt::Standard_GUID::Assign(Macad::Occt::Standard_GUID^ uid)
{((::Standard_GUID*)_NativeInstance)->Assign(*(::Standard_GUID*)uid->NativeInstance);
}void Macad::Occt::Standard_GUID::Assign(Macad::Occt::Standard_UUID^ uid)
{((::Standard_GUID*)_NativeInstance)->Assign(*(::Standard_UUID*)uid->NativeInstance);
}void Macad::Occt::Standard_GUID::ShallowDump(System::IO::TextWriter^ aStream)
{std::ostringstream oss_aStream;((::Standard_GUID*)_NativeInstance)->ShallowDump(oss_aStream);aStream->Write(gcnew System::String(oss_aStream.str().c_str()));
}bool Macad::Occt::Standard_GUID::CheckGUIDFormat(System::String^ aGuid)
{const char* sz_aGuid = (char*)(void*)Marshal::StringToHGlobalAnsi(aGuid);bool _result = ::Standard_GUID::CheckGUIDFormat(sz_aGuid);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_aGuid);return _result;
}int Macad::Occt::Standard_GUID::Hash(int Upper)
{int _result = ((::Standard_GUID*)_NativeInstance)->Hash(Upper);return _result;
}int Macad::Occt::Standard_GUID::HashCode(Macad::Occt::Standard_GUID^ theGUID, int theUpperBound)
{int _result = ::Standard_GUID::HashCode(*(::Standard_GUID*)theGUID->NativeInstance, theUpperBound);return _result;
}bool Macad::Occt::Standard_GUID::IsEqual(Macad::Occt::Standard_GUID^ string1, Macad::Occt::Standard_GUID^ string2)
{bool _result = ::Standard_GUID::IsEqual(*(::Standard_GUID*)string1->NativeInstance, *(::Standard_GUID*)string2->NativeInstance);return _result;
}bool Macad::Occt::Standard_GUID::Equals(System::Object^ obj)
{System::Type^ myType = Macad::Occt::Standard_GUID::GetType();System::Type^ objType = obj->GetType();if (myType->Equals(objType) || objType->IsSubclassOf(myType)){return ::Standard_GUID::IsEqual(*((Standard_GUID^)obj)->NativeInstance, *NativeInstance);}return false;
}int Macad::Occt::Standard_GUID::GetHashCode()
{return ::Standard_GUID::HashCode(*NativeInstance, MAXINT);
}//---------------------------------------------------------------------
//  Class  Standard_ImmutableObject
//---------------------------------------------------------------------Macad::Occt::Standard_ImmutableObject::Standard_ImmutableObject(): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_ImmutableObject();
}Macad::Occt::Standard_ImmutableObject::Standard_ImmutableObject(System::String^ theMessage): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_ImmutableObject(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_ImmutableObject::Standard_ImmutableObject(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_ImmutableObject(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_ImmutableObject::Standard_ImmutableObject(Macad::Occt::Standard_ImmutableObject^ parameter1): Macad::Occt::Standard_DomainError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_ImmutableObject(*(::Standard_ImmutableObject*)parameter1->NativeInstance);
}void Macad::Occt::Standard_ImmutableObject::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_ImmutableObject::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_ImmutableObject::Raise()
{::Standard_ImmutableObject::Raise("");
}Macad::Occt::Standard_ImmutableObject^ Macad::Occt::Standard_ImmutableObject::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_ImmutableObject) _result = ::Standard_ImmutableObject::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_ImmutableObject::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ImmutableObject^ Macad::Occt::Standard_ImmutableObject::NewInstance()
{Handle(::Standard_ImmutableObject) _result = ::Standard_ImmutableObject::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_ImmutableObject::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ImmutableObject^ Macad::Occt::Standard_ImmutableObject::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_ImmutableObject) _result = ::Standard_ImmutableObject::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_ImmutableObject::CreateDowncasted(_result.get());
}Macad::Occt::Standard_ImmutableObject^ Macad::Occt::Standard_ImmutableObject::CreateDowncasted(::Standard_ImmutableObject* instance)
{return gcnew Macad::Occt::Standard_ImmutableObject( instance );
}//---------------------------------------------------------------------
//  Class  Standard_LicenseError
//---------------------------------------------------------------------Macad::Occt::Standard_LicenseError::Standard_LicenseError(): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_LicenseError();
}Macad::Occt::Standard_LicenseError::Standard_LicenseError(System::String^ theMessage): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_LicenseError(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_LicenseError::Standard_LicenseError(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_LicenseError(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_LicenseError::Standard_LicenseError(Macad::Occt::Standard_LicenseError^ parameter1): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_LicenseError(*(::Standard_LicenseError*)parameter1->NativeInstance);
}void Macad::Occt::Standard_LicenseError::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_LicenseError::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_LicenseError::Raise()
{::Standard_LicenseError::Raise("");
}Macad::Occt::Standard_LicenseError^ Macad::Occt::Standard_LicenseError::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_LicenseError) _result = ::Standard_LicenseError::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_LicenseError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_LicenseError^ Macad::Occt::Standard_LicenseError::NewInstance()
{Handle(::Standard_LicenseError) _result = ::Standard_LicenseError::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_LicenseError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_LicenseError^ Macad::Occt::Standard_LicenseError::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_LicenseError) _result = ::Standard_LicenseError::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_LicenseError::CreateDowncasted(_result.get());
}Macad::Occt::Standard_LicenseError^ Macad::Occt::Standard_LicenseError::CreateDowncasted(::Standard_LicenseError* instance)
{if( instance == nullptr )return nullptr;if (instance->IsKind(STANDARD_TYPE(::Standard_LicenseNotFound)))return Macad::Occt::Standard_LicenseNotFound::CreateDowncasted((::Standard_LicenseNotFound*)instance);return gcnew Macad::Occt::Standard_LicenseError( instance );
}//---------------------------------------------------------------------
//  Class  Standard_LicenseNotFound
//---------------------------------------------------------------------Macad::Occt::Standard_LicenseNotFound::Standard_LicenseNotFound(): Macad::Occt::Standard_LicenseError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_LicenseNotFound();
}Macad::Occt::Standard_LicenseNotFound::Standard_LicenseNotFound(System::String^ theMessage): Macad::Occt::Standard_LicenseError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_LicenseNotFound(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_LicenseNotFound::Standard_LicenseNotFound(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_LicenseError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_LicenseNotFound(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_LicenseNotFound::Standard_LicenseNotFound(Macad::Occt::Standard_LicenseNotFound^ parameter1): Macad::Occt::Standard_LicenseError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_LicenseNotFound(*(::Standard_LicenseNotFound*)parameter1->NativeInstance);
}void Macad::Occt::Standard_LicenseNotFound::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_LicenseNotFound::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_LicenseNotFound::Raise()
{::Standard_LicenseNotFound::Raise("");
}Macad::Occt::Standard_LicenseNotFound^ Macad::Occt::Standard_LicenseNotFound::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_LicenseNotFound) _result = ::Standard_LicenseNotFound::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_LicenseNotFound::CreateDowncasted(_result.get());
}Macad::Occt::Standard_LicenseNotFound^ Macad::Occt::Standard_LicenseNotFound::NewInstance()
{Handle(::Standard_LicenseNotFound) _result = ::Standard_LicenseNotFound::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_LicenseNotFound::CreateDowncasted(_result.get());
}Macad::Occt::Standard_LicenseNotFound^ Macad::Occt::Standard_LicenseNotFound::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_LicenseNotFound) _result = ::Standard_LicenseNotFound::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_LicenseNotFound::CreateDowncasted(_result.get());
}Macad::Occt::Standard_LicenseNotFound^ Macad::Occt::Standard_LicenseNotFound::CreateDowncasted(::Standard_LicenseNotFound* instance)
{return gcnew Macad::Occt::Standard_LicenseNotFound( instance );
}//---------------------------------------------------------------------
//  Class  Standard_NullValue
//---------------------------------------------------------------------Macad::Occt::Standard_NullValue::Standard_NullValue(): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_NullValue();
}Macad::Occt::Standard_NullValue::Standard_NullValue(System::String^ theMessage): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_NullValue(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_NullValue::Standard_NullValue(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_NullValue(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_NullValue::Standard_NullValue(Macad::Occt::Standard_NullValue^ parameter1): Macad::Occt::Standard_RangeError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_NullValue(*(::Standard_NullValue*)parameter1->NativeInstance);
}void Macad::Occt::Standard_NullValue::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_NullValue::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_NullValue::Raise()
{::Standard_NullValue::Raise("");
}Macad::Occt::Standard_NullValue^ Macad::Occt::Standard_NullValue::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_NullValue) _result = ::Standard_NullValue::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_NullValue::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NullValue^ Macad::Occt::Standard_NullValue::NewInstance()
{Handle(::Standard_NullValue) _result = ::Standard_NullValue::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_NullValue::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NullValue^ Macad::Occt::Standard_NullValue::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_NullValue) _result = ::Standard_NullValue::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_NullValue::CreateDowncasted(_result.get());
}Macad::Occt::Standard_NullValue^ Macad::Occt::Standard_NullValue::CreateDowncasted(::Standard_NullValue* instance)
{return gcnew Macad::Occt::Standard_NullValue( instance );
}//---------------------------------------------------------------------
//  Class  Standard_Overflow
//---------------------------------------------------------------------Macad::Occt::Standard_Overflow::Standard_Overflow(): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Overflow();
}Macad::Occt::Standard_Overflow::Standard_Overflow(System::String^ theMessage): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_Overflow(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_Overflow::Standard_Overflow(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_Overflow(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_Overflow::Standard_Overflow(Macad::Occt::Standard_Overflow^ parameter1): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Overflow(*(::Standard_Overflow*)parameter1->NativeInstance);
}void Macad::Occt::Standard_Overflow::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_Overflow::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_Overflow::Raise()
{::Standard_Overflow::Raise("");
}Macad::Occt::Standard_Overflow^ Macad::Occt::Standard_Overflow::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_Overflow) _result = ::Standard_Overflow::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_Overflow::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Overflow^ Macad::Occt::Standard_Overflow::NewInstance()
{Handle(::Standard_Overflow) _result = ::Standard_Overflow::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_Overflow::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Overflow^ Macad::Occt::Standard_Overflow::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_Overflow) _result = ::Standard_Overflow::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_Overflow::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Overflow^ Macad::Occt::Standard_Overflow::CreateDowncasted(::Standard_Overflow* instance)
{return gcnew Macad::Occt::Standard_Overflow( instance );
}//---------------------------------------------------------------------
//  Class  Standard_ReadBuffer
//---------------------------------------------------------------------Macad::Occt::Standard_ReadBuffer::Standard_ReadBuffer(long long int theDataLen, long long unsigned int theChunkLen, bool theIsPartialPayload): Macad::Occt::BaseClass<::Standard_ReadBuffer>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_ReadBuffer(theDataLen, theChunkLen, theIsPartialPayload);
}Macad::Occt::Standard_ReadBuffer::Standard_ReadBuffer(long long int theDataLen, long long unsigned int theChunkLen): Macad::Occt::BaseClass<::Standard_ReadBuffer>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_ReadBuffer(theDataLen, theChunkLen, false);
}Macad::Occt::Standard_ReadBuffer::Standard_ReadBuffer(Macad::Occt::Standard_ReadBuffer^ parameter1): Macad::Occt::BaseClass<::Standard_ReadBuffer>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_ReadBuffer(*(::Standard_ReadBuffer*)parameter1->NativeInstance);
}void Macad::Occt::Standard_ReadBuffer::Init(long long int theDataLen, long long unsigned int theChunkLen, bool theIsPartialPayload)
{((::Standard_ReadBuffer*)_NativeInstance)->Init(theDataLen, theChunkLen, theIsPartialPayload);
}void Macad::Occt::Standard_ReadBuffer::Init(long long int theDataLen, long long unsigned int theChunkLen)
{((::Standard_ReadBuffer*)_NativeInstance)->Init(theDataLen, theChunkLen, false);
}bool Macad::Occt::Standard_ReadBuffer::IsDone()
{bool _result = ((::Standard_ReadBuffer*)_NativeInstance)->IsDone();return _result;
}//---------------------------------------------------------------------
//  Class  Standard_ReadLineBuffer
//---------------------------------------------------------------------Macad::Occt::Standard_ReadLineBuffer::Standard_ReadLineBuffer(long long unsigned int theMaxBufferSizeBytes): Macad::Occt::BaseClass<::Standard_ReadLineBuffer>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_ReadLineBuffer(theMaxBufferSizeBytes);
}Macad::Occt::Standard_ReadLineBuffer::Standard_ReadLineBuffer(Macad::Occt::Standard_ReadLineBuffer^ parameter1): Macad::Occt::BaseClass<::Standard_ReadLineBuffer>(BaseClass::InitMode::Uninitialized)
{_NativeInstance = new ::Standard_ReadLineBuffer(*(::Standard_ReadLineBuffer*)parameter1->NativeInstance);
}void Macad::Occt::Standard_ReadLineBuffer::Clear()
{((::Standard_ReadLineBuffer*)_NativeInstance)->Clear();
}bool Macad::Occt::Standard_ReadLineBuffer::IsMultilineMode()
{bool _result = ((::Standard_ReadLineBuffer*)_NativeInstance)->IsMultilineMode();return _result;
}bool Macad::Occt::Standard_ReadLineBuffer::ToPutGapInMultiline()
{bool _result = ((::Standard_ReadLineBuffer*)_NativeInstance)->ToPutGapInMultiline();return _result;
}void Macad::Occt::Standard_ReadLineBuffer::SetMultilineMode(bool theMultilineMode, bool theToPutGap)
{((::Standard_ReadLineBuffer*)_NativeInstance)->SetMultilineMode(theMultilineMode, theToPutGap);
}void Macad::Occt::Standard_ReadLineBuffer::SetMultilineMode(bool theMultilineMode)
{((::Standard_ReadLineBuffer*)_NativeInstance)->SetMultilineMode(theMultilineMode, true);
}//---------------------------------------------------------------------
//  Class  Standard_Underflow
//---------------------------------------------------------------------Macad::Occt::Standard_Underflow::Standard_Underflow(): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Underflow();
}Macad::Occt::Standard_Underflow::Standard_Underflow(System::String^ theMessage): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);NativeInstance = new ::Standard_Underflow(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}Macad::Occt::Standard_Underflow::Standard_Underflow(System::String^ theMessage, System::String^ theStackTrace): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);NativeInstance = new ::Standard_Underflow(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);
}Macad::Occt::Standard_Underflow::Standard_Underflow(Macad::Occt::Standard_Underflow^ parameter1): Macad::Occt::Standard_NumericError(BaseClass::InitMode::Uninitialized)
{NativeInstance = new ::Standard_Underflow(*(::Standard_Underflow*)parameter1->NativeInstance);
}void Macad::Occt::Standard_Underflow::Raise(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);::Standard_Underflow::Raise(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}void Macad::Occt::Standard_Underflow::Raise()
{::Standard_Underflow::Raise("");
}Macad::Occt::Standard_Underflow^ Macad::Occt::Standard_Underflow::NewInstance(System::String^ theMessage)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);Handle(::Standard_Underflow) _result = ::Standard_Underflow::NewInstance(sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);return _result.IsNull() ? nullptr : Macad::Occt::Standard_Underflow::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Underflow^ Macad::Occt::Standard_Underflow::NewInstance()
{Handle(::Standard_Underflow) _result = ::Standard_Underflow::NewInstance("");return _result.IsNull() ? nullptr : Macad::Occt::Standard_Underflow::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Underflow^ Macad::Occt::Standard_Underflow::NewInstance(System::String^ theMessage, System::String^ theStackTrace)
{const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);const char* sz_theStackTrace = (char*)(void*)Marshal::StringToHGlobalAnsi(theStackTrace);Handle(::Standard_Underflow) _result = ::Standard_Underflow::NewInstance(sz_theMessage, sz_theStackTrace);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theStackTrace);return _result.IsNull() ? nullptr : Macad::Occt::Standard_Underflow::CreateDowncasted(_result.get());
}Macad::Occt::Standard_Underflow^ Macad::Occt::Standard_Underflow::CreateDowncasted(::Standard_Underflow* instance)
{return gcnew Macad::Occt::Standard_Underflow( instance );
}

这段代码是为一个名为“Standard”的C++库生成的包装器。让我详细解释一下其中的关键部分和功能:

1. 命名空间和包含

包装器代码从包含“Standard”包和其他依赖项的必要头文件开始。还包括像 System::Runtime::InteropServices 这样的命名空间。

2. 类包装器

标准包中的每个类似乎都已经被包装,以提供相应的C#功能。例如:

  • Standard_DumpValue:表示一个转储值。
  • Standard_UUID:表示UUID。
  • Standard_Failure:表示失败条件或异常。它派生自 Standard_Transient,可能表示一个临时对象。

3. 构造函数和方法

对于每个类,包装器提供了构造函数和方法。这些构造函数映射到相应的C++构造函数,方法映射到C++成员函数。例如:

  • Standard_Failure::Print:将失败描述打印到提供的文本流中。
  • Standard_Failure::Raise:引发带有可选消息的失败异常。

4. 错误处理

有专门处理不同类型错误的类,如 Standard_DomainErrorStandard_ConstructionErrorStandard_RangeError。这些类似乎提供了处理标准库中可能发生的不同类型错误的特定功能。

5. 向下转换

提供了 CreateDowncasted 方法,用于将 Standard_Failure 对象向下转换为其派生类型,如 Standard_DomainError,根据运行时类型信息。

6. 内存管理

Standard 类提供了内存分配、重新分配和释放的方法,例如 AllocateReallocateFree 等。

7. 堆栈跟踪

Standard 类提供了捕获堆栈跟踪的方法,这对于调试很有用。

1. 类声明和构造函数

  • Standard_OutOfRangeStandard_DimensionErrorStandard_DimensionMismatchStandard_ProgramErrorStandard_OutOfMemory 是用于表示不同类型异常的类。
  • 每个类都有多个构造函数,其中一些允许传入异常消息和堆栈跟踪信息。

2. 异常触发和抛出

  • Raise 方法用于手动触发异常,并将异常消息传递给底层的C++异常处理机制。
  • 有一些重载的 Raise 方法允许传递异常消息,也有不传递消息的默认版本。

3. 异常对象创建

  • NewInstance 方法用于创建异常对象的新实例。
  • 可以选择传递异常消息和堆栈跟踪信息。
  • 这些方法返回一个异常对象的引用。

4. 类型转换

  • CreateDowncasted 方法用于将异常对象向下转换为派生类型的对象。
  • 这些方法可能会根据异常的实际类型返回派生类的实例。

5. 内存管理

  • 代码中包含了一些内存管理操作,如释放分配的内存空间。
  1. Standard_NoSuchObject: 这个类用于表示找不到对象的异常。它有多个构造函数和静态方法,用于创建和抛出异常实例。

  2. Standard_TypeMismatch: 这个类用于表示类型不匹配的异常。同样地,它也有多个构造函数和静态方法,用于创建和抛出异常实例。

  3. Standard_Dump: 这个类似乎是一个工具类,提供了一些方法用于在文本流中生成信息。例如,DumpCharacterValues方法用于将字符值转储到文本流中。

  4. Standard_AbortiveTransaction: 这个类表示事务中止的异常。它也有多个构造函数和静态方法,用于创建和抛出异常实例。

  5. Standard_Condition: 这个类似乎是一个条件变量类,用于线程间同步。它有方法用于设置、重置和等待条件变量。

  6. Standard_Persistent: 这个类似乎是一个持久化对象的基类,可能用于对象的序列化和反序列化。

  7. Standard_NumericError: 这个类用于表示数值运算错误的异常。它有多个构造函数和静态方法,用于创建和抛出异常实例。此外,它还提供了一个工厂方法CreateDowncasted,用于根据具体的数值错误类型创建相应的异常实例。

Standard_DivideByZero

  • 提供了处理除以零错误的功能。
  • 构造函数:
    • 无参数的构造函数初始化一个未初始化的 Standard_NumericError 对象。
    • 接受一个字符串参数,用于初始化一个未初始化的 Standard_NumericError 对象,并将字符串转换为 const char* 以调用相应的 C++ 函数。
  • Raise 函数:抛出除以零错误。
  • NewInstance 函数:返回一个新的 Standard_DivideByZero 对象实例。

Standard_ErrorHandler

  • 提供了处理错误的功能。
  • 包含一个嵌套的 Callback 类用于注册和注销回调函数。
  • 构造函数:初始化一个未初始化的 Standard_ErrorHandler 对象。
  • Error 函数:返回最后捕获的错误。
  • LastCaughtError 函数:返回最后捕获的错误。
  • IsInTryBlock 函数:检查是否在 try 块中。

Standard_GUID

  • 提供了对全局唯一标识符(GUID)的操作功能。
  • 构造函数:
    • 无参数的构造函数初始化一个未初始化的 Standard_GUID 对象。
    • 接受一个字符串参数,用于根据提供的 GUID 字符串初始化一个 Standard_GUID 对象。
  • ToUUID 函数:将 Standard_GUID 转换为 Standard_UUID
  • ToCString 函数:将 Standard_GUID 转换为 C 风格的字符串。
  • 其他功能包括比较、哈希等操作。

Standard_ImmutableObject

  • 提供了对不可变对象的操作功能。
  • 构造函数:
    • 无参数的构造函数初始化一个未初始化的 Standard_DomainError 对象。
    • 接受一个字符串参数,用于初始化一个未初始化的 Standard_DomainError 对象,并将字符串转换为 const char* 以调用相应的 C++ 函数。

Standard_LicenseErrorStandard_LicenseNotFound

  • 提供了处理许可证错误的功能。
  • Standard_LicenseNotFound 类是 Standard_LicenseError 的子类,用于处理许可证未找到的错误。

每个类都有构造函数、拷贝构造函数和一些辅助函数,如Raise()用于引发异常,NewInstance()用于创建异常实例等。

这段代码通过托管 C++/CLI 类将 C++ 中的异常处理功能封装到了 C# 中,这样就可以在 C# 中使用这些异常处理类。其中使用了 Marshal::StringToHGlobalAnsi()Marshal::FreeHGlobal() 来进行 C# 字符串和 C++ 字符串之间的转换。

  1. Standard_MMgrRoot: 这是一个抽象基类,表示内存管理器的根类。它定义了一些虚拟函数,用于内存的分配、重新分配和释放操作。

  2. Standard_MMgrRaw: 继承自 Standard_MMgrRoot,表示一个简单的原始内存管理器。它实现了在基类中定义的虚拟函数,提供了内存的分配、重新分配和释放功能。

  3. Standard_MMgrTBBalloc: 继承自 Standard_MMgrRoot,表示使用 TBB(Threading Building Blocks)库的内存管理器。与 Standard_MMgrRaw 类似,它也提供了内存的分配、重新分配和释放功能。

  4. Standard_MultiplyDefined: 表示定义重复的错误。它继承自 Standard_DomainError,提供了处理定义重复错误的功能。

  5. Standard_NegativeValue: 表示负值错误。它继承自 Standard_RangeError,提供了处理负值错误的功能。

  6. Standard_NoMoreObject: 表示无更多对象的错误。它继承自 Standard_DomainError,提供了处理无更多对象错误的功能。

  7. Standard_NotImplemented: 表示未实现功能的错误。它继承自 Standard_ProgramError,提供了处理未实现功能错误的功能。

  8. Standard_NullObject: 表示空对象的错误。它继承自 Standard_DomainError,提供了处理空对象错误的功能。

  9. 这段代码是针对异常处理的类的实现,主要包括以下几个类:

  10. Standard_NullValue: 用于处理空值异常。
  11. Standard_Overflow: 用于处理数值溢出异常。
  12. Standard_Underflow: 用于处理数值下溢异常。
  13. Standard_ReadBuffer: 用于读取缓冲区数据。
  14. Standard_ReadLineBuffer: 用于读取一行数据。

9.

// 引入预编译头文件和 StdFail 头文件
#include "OcctPCH.h"
#include "StdFail.h"// 引入使用 System.Runtime.InteropServices 命名空间中的 Marshal 类
using namespace System::Runtime::InteropServices;// 下面是具体的类和方法的包装实现,这里以 StdFail_InfiniteSolutions 类为例进行说明:// 构造函数
Macad::Occt::StdFail_InfiniteSolutions::StdFail_InfiniteSolutions(): Macad::Occt::Standard_Failure(BaseClass::InitMode::Uninitialized)
{// 创建一个原生的 StdFail_InfiniteSolutions 实例NativeInstance = new ::StdFail_InfiniteSolutions();
}// 其他重载的构造函数的实现类似,区别在于传入的参数不同// Raise 方法
void Macad::Occt::StdFail_InfiniteSolutions::Raise(System::String^ theMessage)
{// 将参数转换为 char* 类型const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);// 调用原生的 StdFail_InfiniteSolutions::Raise 方法::StdFail_InfiniteSolutions::Raise(sz_theMessage);// 释放内存Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);
}// 其他重载的 Raise 方法的实现类似,区别在于传入的参数不同// NewInstance 方法
Macad::Occt::StdFail_InfiniteSolutions^ Macad::Occt::StdFail_InfiniteSolutions::NewInstance(System::String^ theMessage)
{// 将参数转换为 char* 类型const char* sz_theMessage = (char*)(void*)Marshal::StringToHGlobalAnsi(theMessage);// 调用原生的 StdFail_InfiniteSolutions::NewInstance 方法Handle(::StdFail_InfiniteSolutions) _result = ::StdFail_InfiniteSolutions::NewInstance(sz_theMessage);// 释放内存Marshal::FreeHGlobal((System::IntPtr)(void*)sz_theMessage);// 返回结果return _result.IsNull() ? nullptr : Macad::Occt::StdFail_InfiniteSolutions::CreateDowncasted(_result.get());
}// 其他重载的 NewInstance 方法的实现类似,区别在于传入的参数不同// CreateDowncasted 方法
Macad::Occt::StdFail_InfiniteSolutions^ Macad::Occt::StdFail_InfiniteSolutions::CreateDowncasted(::StdFail_InfiniteSolutions* instance)
{// 创建一个 StdFail_InfiniteSolutions 对象并返回return gcnew Macad::Occt::StdFail_InfiniteSolutions( instance );
}// 其他 CreateDowncasted 方法的实现类似,区别在于传入的参数不同

这段代码是为了创建一个 C++/CLI 的包装器(wrapper),将 C++ 中的 StdFail 模块中的类和方法包装成 C# 中的对应类和方法,以便在 C# 中使用。

具体而言,该代码完成了以下几个任务:

  1. 包装类的构造函数:针对每个需要包装的类,实现了默认构造函数和其他重载构造函数。这些构造函数用于创建 C++ 类的实例,并将其包装为 C# 类的实例。

  2. 包装 Raise 方法:针对每个异常类,实现了 Raise 方法的包装。Raise 方法用于在 C# 中触发相应的异常。通过 Marshal 将 C# 字符串转换为 C 风格的字符串,然后调用对应的 C++ 方法。

  3. 包装 NewInstance 方法:针对每个异常类,实现了 NewInstance 方法的包装。NewInstance 方法用于创建异常类的实例。同样通过 Marshal 将 C# 字符串转换为 C 风格的字符串,然后调用对应的 C++ 方法。

  4. CreateDowncasted 方法:针对每个异常类,实现了 CreateDowncasted 方法的包装。CreateDowncasted 方法用于将从 C++ 返回的指针转换为 C# 类的实例。

总的来说,这段代码的作用是将 C++ 中的异常处理模块 StdFail 包装为 C# 中的异常处理类,使得 C# 代码能够方便地处理由 C++ 抛出的异常。这样,C# 代码就可以更好地与包含 StdFail 的 C++ 代码集成,从而提高整个应用程序的稳定性和可靠性。

这篇关于macad.occt解析extentions,tkernel的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/896324

相关文章

网页解析 lxml 库--实战

lxml库使用流程 lxml 是 Python 的第三方解析库,完全使用 Python 语言编写,它对 XPath表达式提供了良好的支 持,因此能够了高效地解析 HTML/XML 文档。本节讲解如何通过 lxml 库解析 HTML 文档。 pip install lxml lxm| 库提供了一个 etree 模块,该模块专门用来解析 HTML/XML 文档,下面来介绍一下 lxml 库

【C++】_list常用方法解析及模拟实现

相信自己的力量,只要对自己始终保持信心,尽自己最大努力去完成任何事,就算事情最终结果是失败了,努力了也不留遗憾。💓💓💓 目录   ✨说在前面 🍋知识点一:什么是list? •🌰1.list的定义 •🌰2.list的基本特性 •🌰3.常用接口介绍 🍋知识点二:list常用接口 •🌰1.默认成员函数 🔥构造函数(⭐) 🔥析构函数 •🌰2.list对象

OWASP十大安全漏洞解析

OWASP(开放式Web应用程序安全项目)发布的“十大安全漏洞”列表是Web应用程序安全领域的权威指南,它总结了Web应用程序中最常见、最危险的安全隐患。以下是对OWASP十大安全漏洞的详细解析: 1. 注入漏洞(Injection) 描述:攻击者通过在应用程序的输入数据中插入恶意代码,从而控制应用程序的行为。常见的注入类型包括SQL注入、OS命令注入、LDAP注入等。 影响:可能导致数据泄

从状态管理到性能优化:全面解析 Android Compose

文章目录 引言一、Android Compose基本概念1.1 什么是Android Compose?1.2 Compose的优势1.3 如何在项目中使用Compose 二、Compose中的状态管理2.1 状态管理的重要性2.2 Compose中的状态和数据流2.3 使用State和MutableState处理状态2.4 通过ViewModel进行状态管理 三、Compose中的列表和滚动

Spring 源码解读:自定义实现Bean定义的注册与解析

引言 在Spring框架中,Bean的注册与解析是整个依赖注入流程的核心步骤。通过Bean定义,Spring容器知道如何创建、配置和管理每个Bean实例。本篇文章将通过实现一个简化版的Bean定义注册与解析机制,帮助你理解Spring框架背后的设计逻辑。我们还将对比Spring中的BeanDefinition和BeanDefinitionRegistry,以全面掌握Bean注册和解析的核心原理。

CSP 2023 提高级第一轮 CSP-S 2023初试题 完善程序第二题解析 未完

一、题目阅读 (最大值之和)给定整数序列 a0,⋯,an−1,求该序列所有非空连续子序列的最大值之和。上述参数满足 1≤n≤105 和 1≤ai≤108。 一个序列的非空连续子序列可以用两个下标 ll 和 rr(其中0≤l≤r<n0≤l≤r<n)表示,对应的序列为 al,al+1,⋯,ar​。两个非空连续子序列不同,当且仅当下标不同。 例如,当原序列为 [1,2,1,2] 时,要计算子序列 [

多线程解析报表

假如有这样一个需求,当我们需要解析一个Excel里多个sheet的数据时,可以考虑使用多线程,每个线程解析一个sheet里的数据,等到所有的sheet都解析完之后,程序需要提示解析完成。 Way1 join import java.time.LocalTime;public class Main {public static void main(String[] args) thro

ZooKeeper 中的 Curator 框架解析

Apache ZooKeeper 是一个为分布式应用提供一致性服务的软件。它提供了诸如配置管理、分布式同步、组服务等功能。在使用 ZooKeeper 时,Curator 是一个非常流行的客户端库,它简化了 ZooKeeper 的使用,提供了高级的抽象和丰富的工具。本文将详细介绍 Curator 框架,包括它的设计哲学、核心组件以及如何使用 Curator 来简化 ZooKeeper 的操作。 1

Unity3D自带Mouse Look鼠标视角代码解析。

Unity3D自带Mouse Look鼠标视角代码解析。 代码块 代码块语法遵循标准markdown代码,例如: using UnityEngine;using System.Collections;/// MouseLook rotates the transform based on the mouse delta./// Minimum and Maximum values can

图解TCP三次握手|深度解析|为什么是三次

写在前面 这篇文章我们来讲解析 TCP三次握手。 TCP 报文段 传输控制块TCB:存储了每一个连接中的一些重要信息。比如TCP连接表,指向发送和接收缓冲的指针,指向重传队列的指针,当前的发送和接收序列等等。 我们再来看一下TCP报文段的组成结构 TCP 三次握手 过程 假设有一台客户端,B有一台服务器。最初两端的TCP进程都是处于CLOSED关闭状态,客户端A打开链接,服务器端