- 添加模块化HTTP服务器架构,支持路由注册和请求处理 - 实现Creo状态检测API,提供连接状态和模型状态实时监控 - 完成STEP格式模型导出功能,支持装配体和零件导出 - 实现装配体层级结构分析,支持无限深度遍历和组件信息提取 - 添加层级组件安全删除功能,使用抑制策略保持装配体完整性 - 集成WebSocket服务器框架,为实时通信和长操作做准备 - 完善JSON处理、日志记录和认证管理基础设施 - 修复OTK API兼容性问题和内存管理优化 - 解决DeleteFeatures崩溃问题,采用SuppressFeatures替代方案 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
977 lines
31 KiB
C++
977 lines
31 KiB
C++
/*
|
|
Copyright (c) 2018 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved.
|
|
*/
|
|
|
|
|
|
//*****************************************************************************
|
|
# ifndef pfcExceptions_h
|
|
# define pfcExceptions_h
|
|
|
|
|
|
# ifdef GetMessage
|
|
# undef GetMessage
|
|
# endif /* GetMessage */
|
|
# ifdef GetCharWidth
|
|
# undef GetCharWidth
|
|
# endif /* GetCharWidth */
|
|
|
|
|
|
# include <pfcExceptions_s.h>
|
|
#ifdef OTK_CPP_XTOP
|
|
#include <usxobject.h>
|
|
#else
|
|
#include <nopkdefs_pfc.h>
|
|
#endif
|
|
# include <fstream>
|
|
|
|
static fstream globalLogFile;
|
|
static bool doGlobalLogFuncs;
|
|
void pfcLogFuncCall(xrstring Name);
|
|
void pfcFuncLogFileOpen(xrstring folder);
|
|
void pfcFuncLogFileClose();
|
|
void pfcSetFuncLogFlag(bool in);
|
|
bool pfcGetFuncLogFlag();
|
|
int otk_print_std(char *filename, char* buffer );
|
|
int pfcGetOtkLogging();
|
|
void pfcGetBtkTimeStr(char* timestr);
|
|
|
|
//*****************************************************************************
|
|
class pfcXPFC : public virtual XOBJECT, public virtual xthrowable
|
|
{
|
|
ootk_xdeclare (pfcXPFC)
|
|
public:
|
|
virtual xstring GetMessage ();
|
|
|
|
protected:
|
|
xstring mMessage;
|
|
|
|
protected:
|
|
pfcXPFC (xrstring inMessage);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXMethodForbidden : public virtual pfcXPFC
|
|
{
|
|
ootk_xdeclare (pfcXMethodForbidden)
|
|
public:
|
|
virtual xstring GetMethodName ();
|
|
|
|
protected:
|
|
xstring mMethodName;
|
|
|
|
protected:
|
|
pfcXMethodForbidden (xrstring inMethodName);
|
|
|
|
public:
|
|
static void Throw (xrstring inMethodName);
|
|
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXMethodNotLicensed : public virtual pfcXPFC
|
|
{
|
|
ootk_xdeclare (pfcXMethodNotLicensed)
|
|
public:
|
|
virtual xstring GetMethodName ();
|
|
|
|
protected:
|
|
xstring mMethodName;
|
|
|
|
protected:
|
|
pfcXMethodNotLicensed (xrstring inMethodName);
|
|
|
|
public:
|
|
static void Throw (xrstring inMethodName);
|
|
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXCompatibilityNotSet : public virtual pfcXPFC
|
|
{
|
|
ootk_xdeclare (pfcXCompatibilityNotSet)
|
|
public:
|
|
virtual xstring GetMethodName ();
|
|
|
|
protected:
|
|
xstring mMethodName;
|
|
|
|
protected:
|
|
pfcXCompatibilityNotSet (xrstring inMethodName);
|
|
|
|
public:
|
|
static void Throw (xrstring inMethodName);
|
|
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXInAMethod : public virtual pfcXPFC
|
|
{
|
|
ootk_xdeclare (pfcXInAMethod)
|
|
public:
|
|
virtual xstring GetMethodName ();
|
|
|
|
protected:
|
|
xstring mMethodName;
|
|
|
|
protected:
|
|
pfcXInAMethod (xrstring inMethodName);
|
|
pfcXInAMethod (xrstring inMessage, xrstring inMethodName);
|
|
|
|
public:
|
|
static void Throw (xrstring inMessage, xrstring inMethodName);
|
|
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXCannotAccess : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXCannotAccess)
|
|
public:
|
|
virtual xstring GetVariableName ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mVariableName;
|
|
|
|
public:
|
|
pfcXCannotAccess (xrstring inMethodName, xrstring inVariableName);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inVariableName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXBadArgument : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXBadArgument)
|
|
public:
|
|
virtual xstring GetArgumentName ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mArgumentName;
|
|
|
|
protected:
|
|
pfcXBadArgument (xrstring inMethodName, xrstring inArgumentName);
|
|
pfcXBadArgument (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inArgumentName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXUnusedValue : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXUnusedValue)
|
|
public:
|
|
virtual xstring GetValue ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mValue;
|
|
|
|
protected:
|
|
pfcXUnusedValue (xrstring inMethodName, xrstring inValue);
|
|
pfcXUnusedValue (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inValue);
|
|
|
|
public:
|
|
static void Throw (xrstring inMethodName, xrstring inValue);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXToolkitDllInitializeFailed : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXToolkitDllInitializeFailed)
|
|
public:
|
|
virtual xstring GetUserInitializeMessage ();
|
|
virtual int GetUserInitializeReturn ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mUserInitializeMessage;
|
|
int mUserInitializeReturn;
|
|
|
|
protected:
|
|
pfcXToolkitDllInitializeFailed (xrstring inMethodName, int mUserInitializeReturn,
|
|
xrstring inUserInitializeMessage);
|
|
pfcXToolkitDllInitializeFailed (xrstring inMessage,
|
|
xrstring inMethodName, int mUserInitializeReturn,
|
|
xrstring inUserInitializeMessage);
|
|
|
|
public:
|
|
static void Throw (xrstring inMethodName, int mUserInitializeReturn,
|
|
xrstring inUserInitializeMessage);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXProdevError : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXProdevError)
|
|
public:
|
|
virtual xstring GetDevelopFunctionName ();
|
|
|
|
virtual xint GetErrorCode ();
|
|
|
|
private:
|
|
xstring mDevelopFunctionName;
|
|
xint mErrorCode;
|
|
|
|
public:
|
|
pfcXProdevError (xrstring inMethodName, xrstring inDevelopFunctionName,
|
|
xint inErrorCode);
|
|
pfcXProdevError (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inDevelopFunctionName,
|
|
xint inErrorCode);
|
|
|
|
static void Throw (xrstring inMethodName,
|
|
xrstring inDevelopFunctionName,
|
|
xint inErrorCode);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXToolkitError : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXToolkitError)
|
|
public:
|
|
virtual xstring GetToolkitFunctionName ();
|
|
|
|
virtual xint GetErrorCode ();
|
|
|
|
private:
|
|
xstring mToolkitFunctionName;
|
|
|
|
protected:
|
|
pfcXToolkitError (xrstring inMethodName, xrstring inToolkitFunctionName);
|
|
pfcXToolkitError (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inToolkitFunctionName);
|
|
};
|
|
//*****************************************************************************
|
|
class pfcXToolkitUnrecognizedErrorCode : public virtual pfcXToolkitError
|
|
{
|
|
ootk_xdeclare (pfcXToolkitUnrecognizedErrorCode)
|
|
public:
|
|
virtual xint GetErrorCode();
|
|
static void Throw (xrstring inMethodName,
|
|
xrstring inToolkitFunctionName,
|
|
xint inErrorCode);
|
|
private:
|
|
xint mErrorCode;
|
|
protected:
|
|
|
|
pfcXToolkitUnrecognizedErrorCode(xrstring inMessage,
|
|
xrstring inMethodName, xint inErrorCode);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcXToolkitCheckoutConflict : public virtual pfcXToolkitError
|
|
{
|
|
ootk_xdeclare ( pfcXToolkitCheckoutConflict )
|
|
|
|
private:
|
|
xstring mConflictDescription;
|
|
public:
|
|
virtual xstring GetConflictDescription();
|
|
virtual xstring GetMessage ();
|
|
|
|
|
|
pfcXToolkitCheckoutConflict(xrstring inMethodName,
|
|
xrstring inToolkitFunctionName,
|
|
xrstring inConflictDescription,
|
|
xint inTemp);
|
|
|
|
static void Throw (xrstring inMethodName,
|
|
xrstring inToolkitFunctionName,
|
|
xrstring inConflictDescription);
|
|
|
|
|
|
|
|
pfcXToolkitCheckoutConflict(xrstring inMethodName,
|
|
xrstring inToolkitFunctionName);
|
|
|
|
|
|
pfcXToolkitCheckoutConflict(xrstring inMessage, xrstring inMethodName,
|
|
xrstring inToolkitFunctionName);
|
|
|
|
|
|
static void Throw (xrstring inMethodName,
|
|
xrstring inToolkitFunctionName);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcXExternalDataError : public virtual pfcXToolkitError
|
|
{
|
|
ootk_xdeclare (pfcXExternalDataError)
|
|
protected:
|
|
pfcXExternalDataError (xrstring inMethodName, xrstring inToolkitFunctionName);
|
|
pfcXExternalDataError (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inToolkitFunctionName);
|
|
};
|
|
|
|
//****************************************************************************
|
|
# define DeclareSpecificToolkitException(ErrName) \
|
|
class pfcXToolkit##ErrName : public virtual pfcXToolkitError \
|
|
{ \
|
|
ootk_xdeclare (pfcXToolkit##ErrName) \
|
|
public: \
|
|
pfcXToolkit##ErrName (xrstring inMethodName, \
|
|
xrstring inToolkitFunctionName); \
|
|
\
|
|
pfcXToolkit##ErrName (xrstring inMessage, xrstring inMethodName, \
|
|
xrstring inToolkitFunctionName); \
|
|
\
|
|
public: \
|
|
static void Throw (xrstring inMethodName, \
|
|
xrstring inToolkitFunctionName); \
|
|
}
|
|
|
|
//****************************************************************************
|
|
# define DeclareSpecificExtdataException(ErrName) \
|
|
class pfcXExternalData##ErrName : public virtual pfcXExternalDataError \
|
|
{ \
|
|
ootk_xdeclare (pfcXExternalData##ErrName) \
|
|
public: \
|
|
pfcXExternalData##ErrName (xrstring inMethodName, \
|
|
xrstring inToolkitFunctionName); \
|
|
\
|
|
pfcXExternalData##ErrName (xrstring inMessage, xrstring inMethodName, \
|
|
xrstring inToolkitFunctionName); \
|
|
\
|
|
public: \
|
|
static void Throw (xrstring inMethodName, \
|
|
xrstring inToolkitFunctionName); \
|
|
}
|
|
|
|
DeclareSpecificToolkitException (GeneralError);
|
|
DeclareSpecificToolkitException (BadInputs);
|
|
DeclareSpecificToolkitException (UserAbort);
|
|
DeclareSpecificToolkitException (NotFound);
|
|
DeclareSpecificToolkitException (Found);
|
|
DeclareSpecificToolkitException (LineTooLong);
|
|
DeclareSpecificToolkitException (Continue);
|
|
DeclareSpecificToolkitException (BadContext);
|
|
DeclareSpecificToolkitException (NotImplemented);
|
|
DeclareSpecificToolkitException (OutOfMemory);
|
|
DeclareSpecificToolkitException (CommError);
|
|
DeclareSpecificToolkitException (NoChange);
|
|
DeclareSpecificToolkitException (SuppressedParents);
|
|
DeclareSpecificToolkitException (PickAbove);
|
|
DeclareSpecificToolkitException (InvalidDir);
|
|
DeclareSpecificToolkitException (InvalidFile);
|
|
DeclareSpecificToolkitException (CantWrite);
|
|
DeclareSpecificToolkitException (InvalidType);
|
|
DeclareSpecificToolkitException (InvalidPtr);
|
|
DeclareSpecificToolkitException (UnavailableSection);
|
|
DeclareSpecificToolkitException (InvalidMatrix);
|
|
DeclareSpecificToolkitException (InvalidName);
|
|
DeclareSpecificToolkitException (NotExist);
|
|
DeclareSpecificToolkitException (CantOpen);
|
|
DeclareSpecificToolkitException (Abort);
|
|
DeclareSpecificToolkitException (NotValid);
|
|
DeclareSpecificToolkitException (InvalidItem);
|
|
DeclareSpecificToolkitException (MsgNotFound);
|
|
DeclareSpecificToolkitException (MsgNoTrans);
|
|
DeclareSpecificToolkitException (MsgFmtError);
|
|
DeclareSpecificToolkitException (MsgUserQuit);
|
|
DeclareSpecificToolkitException (MsgTooLong);
|
|
DeclareSpecificToolkitException (CantAccess);
|
|
DeclareSpecificToolkitException (ObsoleteFunc);
|
|
DeclareSpecificToolkitException (NoCoordSystem);
|
|
DeclareSpecificToolkitException (Ambiguous);
|
|
DeclareSpecificToolkitException (DeadLock);
|
|
DeclareSpecificToolkitException (Busy);
|
|
DeclareSpecificToolkitException (InUse);
|
|
DeclareSpecificToolkitException (NoLicense);
|
|
DeclareSpecificToolkitException (BsplUnsuitableDegree);
|
|
DeclareSpecificToolkitException (BsplNonStdEndKnots);
|
|
DeclareSpecificToolkitException (BsplMultiInnerKnots);
|
|
DeclareSpecificToolkitException (BadSrfCrv);
|
|
DeclareSpecificToolkitException (Empty);
|
|
DeclareSpecificToolkitException (BadDimAttach);
|
|
DeclareSpecificToolkitException (NotDisplayed);
|
|
DeclareSpecificToolkitException (CantModify);
|
|
DeclareSpecificToolkitException (CreateViewBadSheet);
|
|
DeclareSpecificToolkitException (CreateViewBadModel);
|
|
DeclareSpecificToolkitException (CreateViewBadParent);
|
|
DeclareSpecificToolkitException (CreateViewBadType);
|
|
DeclareSpecificToolkitException (CreateViewBadExplode);
|
|
DeclareSpecificToolkitException (UnattachedFeats);
|
|
DeclareSpecificToolkitException (RegenerateAgain);
|
|
DeclareSpecificToolkitException (Unsupported);
|
|
DeclareSpecificToolkitException (NoPermission);
|
|
DeclareSpecificToolkitException (AuthenticationFailure);
|
|
DeclareSpecificToolkitException (AppExcessCallbacks);
|
|
DeclareSpecificToolkitException (AppStartupFailed);
|
|
DeclareSpecificToolkitException (AppInitializationFailed);
|
|
DeclareSpecificToolkitException (AppVersionMismatch);
|
|
DeclareSpecificToolkitException (AppCommunicationFailure);
|
|
DeclareSpecificToolkitException (AppNewVersion);
|
|
DeclareSpecificToolkitException (NeedsUnlock);
|
|
DeclareSpecificToolkitException (AppNoLicense);
|
|
DeclareSpecificToolkitException (AppBadDataPath);
|
|
DeclareSpecificToolkitException (AppBadEncoding);
|
|
DeclareSpecificToolkitException (AppCreoBarred);
|
|
DeclareSpecificToolkitException (AppTooOld);
|
|
DeclareSpecificToolkitException (CheckLastError);
|
|
DeclareSpecificToolkitException (CheckOmitted);
|
|
DeclareSpecificToolkitException (Incomplete);
|
|
DeclareSpecificToolkitException (MaxLimitReached);
|
|
DeclareSpecificToolkitException (OutOfRange);
|
|
DeclareSpecificToolkitException (Outdated);
|
|
|
|
DeclareSpecificExtdataException (InvalidObject);
|
|
DeclareSpecificExtdataException (ClassOrSlotExists);
|
|
DeclareSpecificExtdataException (NamesTooLong);
|
|
DeclareSpecificExtdataException (SlotNotFound);
|
|
DeclareSpecificExtdataException (BadKeyByFlag);
|
|
DeclareSpecificExtdataException (InvalidObjType);
|
|
DeclareSpecificExtdataException (EmptySlot);
|
|
DeclareSpecificExtdataException (BadDataArgs);
|
|
DeclareSpecificExtdataException (StreamTooLarge);
|
|
DeclareSpecificExtdataException (InvalidSlotName);
|
|
DeclareSpecificExtdataException (TKError);
|
|
|
|
|
|
//*****************************************************************************
|
|
class pfcXUnimplemented : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXUnimplemented)
|
|
public:
|
|
pfcXUnimplemented (xrstring inMethodName);
|
|
pfcXUnimplemented (xrstring inMessage, xrstring inMethodName);
|
|
|
|
static void Throw (xrstring inMethodName);
|
|
|
|
virtual xstring GetMessage ();
|
|
};
|
|
//*****************************************************************************
|
|
class pfcXToolkitInvalidReference : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXToolkitInvalidReference)
|
|
public:
|
|
pfcXToolkitInvalidReference(xrstring inMethodName);
|
|
pfcXToolkitInvalidReference(xrstring inMessage, xrstring inMethodName);
|
|
|
|
static void Throw (xrstring inMessage, xrstring inMethodName);
|
|
};
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
|
|
class pfcXInvalidEnumValue : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXInvalidEnumValue)
|
|
public:
|
|
virtual xstring GetName ();
|
|
virtual xint GetValue ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mName;
|
|
xint mValue;
|
|
|
|
public:
|
|
pfcXInvalidEnumValue (xrstring inMethodName, xrstring inName, xint inValue);
|
|
pfcXInvalidEnumValue (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inName, xint inValue);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inName,
|
|
xint inValue);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXEmptyString : public virtual pfcXBadArgument
|
|
{
|
|
ootk_xdeclare (pfcXEmptyString)
|
|
public:
|
|
pfcXEmptyString (xrstring inMethodName, xrstring inArgumentName);
|
|
pfcXEmptyString (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inArgumentName);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inArgumentName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXStringTooLong : public virtual pfcXBadArgument
|
|
{
|
|
ootk_xdeclare (pfcXStringTooLong)
|
|
public:
|
|
virtual xstring GetString ();
|
|
virtual xint GetMaxLength ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mString;
|
|
xint mMaxLength;
|
|
|
|
public:
|
|
pfcXStringTooLong (xrstring inMethodName, xrstring inArgumentName,
|
|
xrstring inString, xint inMaxLength);
|
|
pfcXStringTooLong (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inArgumentName,
|
|
xrstring inString, xint inMaxLength);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inArgumentName,
|
|
xrstring inString, xint inMaxLength);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXNegativeNumber : public virtual pfcXBadArgument
|
|
{
|
|
ootk_xdeclare (pfcXNegativeNumber)
|
|
public:
|
|
pfcXNegativeNumber (xrstring inMethodName, xrstring inArgumentName);
|
|
pfcXNegativeNumber (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inArgumentName);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inArgumentName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXNumberTooLarge : public virtual pfcXBadArgument
|
|
{
|
|
ootk_xdeclare (pfcXNumberTooLarge)
|
|
public:
|
|
virtual xreal GetValue ();
|
|
virtual xreal GetMaxValue ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xreal mValue;
|
|
xreal mMaxValue;
|
|
|
|
public:
|
|
pfcXNumberTooLarge (xrstring inMethodName, xrstring inArgumentName,
|
|
xreal inValue, xreal inMaxValue);
|
|
pfcXNumberTooLarge (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inArgumentName,
|
|
xreal inValue, xreal inMaxValue);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inArgumentName,
|
|
xreal inValue, xreal inMaxValue);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXSequenceTooLong : public virtual pfcXBadArgument
|
|
{
|
|
ootk_xdeclare (pfcXSequenceTooLong)
|
|
public:
|
|
virtual xint GetMaxLength ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xint mMaxLength;
|
|
|
|
public:
|
|
pfcXSequenceTooLong (xrstring inMethodName, xrstring inArgumentName,
|
|
xint inMaxLength);
|
|
pfcXSequenceTooLong (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inArgumentName,
|
|
xint inMaxLength);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inArgumentName,
|
|
xint inMaxLength);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXBadOutlineExcludeType : public virtual pfcXBadArgument
|
|
{
|
|
ootk_xdeclare (pfcXBadOutlineExcludeType)
|
|
public:
|
|
virtual pfcModelItemType GetType ();
|
|
|
|
private:
|
|
pfcModelItemType mType;
|
|
|
|
public:
|
|
pfcXBadOutlineExcludeType (xrstring inMethodName, xrstring inArgumentName,
|
|
pfcModelItemType inType);
|
|
pfcXBadOutlineExcludeType (xrstring inMessage,
|
|
xrstring inMethodName, xrstring inArgumentName,
|
|
pfcModelItemType inType);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inArgumentName,
|
|
pfcModelItemType inType);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXBadGetParamValue : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXBadGetParamValue)
|
|
public:
|
|
virtual pfcParamValueType GetValueType ();
|
|
|
|
private:
|
|
pfcParamValueType mValueType;
|
|
|
|
public:
|
|
pfcXBadGetParamValue (xrstring inMethodName, pfcParamValueType inValueType);
|
|
pfcXBadGetParamValue (xrstring inMessage,
|
|
xrstring inMethodName, pfcParamValueType inValueType);
|
|
|
|
static void Throw (xrstring inMethodName,
|
|
pfcParamValueType inValueType);
|
|
};
|
|
//****************************************************************************
|
|
class pfcXBadGetExternalData : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXBadGetExternalData)
|
|
public:
|
|
virtual pfcExternalDataType GetType ();
|
|
|
|
private:
|
|
pfcExternalDataType Type;
|
|
|
|
public:
|
|
pfcXBadGetExternalData (xrstring inMethodName, pfcExternalDataType inValueType);
|
|
pfcXBadGetExternalData (xrstring inMessage, xrstring inMethodName, pfcExternalDataType inValueType);
|
|
|
|
static void Throw (xrstring inMessage, xrstring inMethodName,
|
|
pfcExternalDataType inValueType);
|
|
};
|
|
|
|
//****************************************************************************
|
|
class pfcXBadGetArgValue : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXBadGetArgValue)
|
|
public:
|
|
virtual pfcArgValueType GetType ();
|
|
|
|
private:
|
|
pfcArgValueType Type;
|
|
|
|
public:
|
|
pfcXBadGetArgValue (xrstring inMethodName, pfcArgValueType inValueType);
|
|
pfcXBadGetArgValue (xrstring inMessage, xrstring inMethodName, pfcArgValueType inValueType);
|
|
|
|
static void Throw (xrstring inMethodName,
|
|
pfcArgValueType inValueType);
|
|
};
|
|
|
|
//****************************************************************************
|
|
class pfcXToolkitDllInactive : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXToolkitDllInactive)
|
|
|
|
public:
|
|
pfcXToolkitDllInactive (xrstring inMethodName);
|
|
pfcXToolkitDllInactive (xrstring inMessage, xrstring inMethodName);
|
|
|
|
static void Throw (xrstring inMethodName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXBadExternalData : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXBadExternalData)
|
|
|
|
public:
|
|
pfcXBadExternalData (xrstring inMethodName);
|
|
pfcXBadExternalData (xrstring inMessage, xrstring inMethodName);
|
|
|
|
static void Throw (xrstring inMessage, xrstring inMethodName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXUnknownModelExtension : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXUnknownModelExtension)
|
|
public:
|
|
virtual xstring GetExtension ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mExtension;
|
|
|
|
public:
|
|
pfcXUnknownModelExtension (xrstring inMethodName, xrstring inExtension);
|
|
pfcXUnknownModelExtension (xrstring inMessage, xrstring inMethodName,
|
|
xrstring inExtension);
|
|
|
|
static void Throw (xrstring inMethodName, xrstring inExtension);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXInvalidSelection : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXInvalidSelection)
|
|
public:
|
|
pfcXInvalidSelection (xrstring inMethodName);
|
|
pfcXInvalidSelection (xrstring inMessage, xrstring inMethodName);
|
|
|
|
static void Throw (xrstring inMethodName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXModelNotInSession : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXModelNotInSession)
|
|
public:
|
|
pfcXModelNotInSession (xrstring inMethodName);
|
|
pfcXModelNotInSession (xrstring inMessage, xrstring inMethodName);
|
|
|
|
static void Throw (xrstring inMethodName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXInvalidModelItem : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXInvalidModelItem)
|
|
public:
|
|
pfcXInvalidModelItem (xrstring inMethodName);
|
|
pfcXInvalidModelItem (xrstring inMessage, xrstring inMethodName);
|
|
|
|
static void Throw (xrstring inMethodName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXInvalidFileType : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXInvalidFileType)
|
|
public:
|
|
pfcXInvalidFileType (xrstring inMethodName, xrstring inExtension);
|
|
pfcXInvalidFileType (xrstring inMessage, xrstring inMethodName, xrstring inExtension);
|
|
|
|
virtual xstring GetExtension ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mExtension;
|
|
|
|
public:
|
|
|
|
static void Throw (xrstring inMethodName,
|
|
xrstring inExtension);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
class pfcXInvalidFileName : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXInvalidFileName)
|
|
public:
|
|
pfcXInvalidFileName (xrstring inMethodName, xrstring inFileName);
|
|
pfcXInvalidFileName (xrstring inMessage, xrstring inMethodName, xrstring inFileName);
|
|
|
|
virtual xstring GetFileName ();
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mFileName;
|
|
|
|
public:
|
|
|
|
static void Throw (xrstring inMethodName,
|
|
xrstring inFileName);
|
|
};
|
|
|
|
//*****************************************************************************
|
|
enum pfcDrawingCreateErrorType {
|
|
pfcDWGCREATE_ERR_SAVED_VIEW_DOESNT_EXIST,
|
|
pfcDWGCREATE_ERR_X_SEC_DOESNT_EXIST,
|
|
pfcDWGCREATE_ERR_EXPLODE_DOESNT_EXIST,
|
|
pfcDWGCREATE_ERR_MODEL_NOT_EXPLODABLE,
|
|
pfcDWGCREATE_ERR_SEC_NOT_PERP,
|
|
pfcDWGCREATE_ERR_NO_RPT_REGIONS,
|
|
pfcDWGCREATE_ERR_FIRST_REGION_USED,
|
|
pfcDWGCREATE_ERR_NOT_PROCESS_ASSEM,
|
|
pfcDWGCREATE_ERR_NO_STEP_NUM,
|
|
pfcDWGCREATE_ERR_TEMPLATE_USED,
|
|
pfcDWGCREATE_ERR_NO_PARENT_VIEW_FOR_PROJ,
|
|
pfcDWGCREATE_ERR_CANT_GET_PROJ_PARENT,
|
|
pfcDWGCREATE_ERR_SEC_NOT_PARALLEL,
|
|
pfcDWGCREATE_ERR_SIMP_REP_DOESNT_EXIST,
|
|
pfcDWGCRTERR_COMB_STATE_DOESNT_EXIST,
|
|
pfcDWGCRTERR_TOOL_DOESNT_EXIST,
|
|
pfcDWGCRTERR_NOT_ALL_BALLOONS_CLEANED_WRN,
|
|
pfcDrawingCreateErrorType_nil
|
|
};
|
|
//*****************************************************************************
|
|
|
|
class pfcXCancelProEAction : public virtual pfcXPFC
|
|
{
|
|
ootk_xdeclare (pfcXCancelProEAction)
|
|
|
|
public:
|
|
pfcXCancelProEAction (xrstring inMessage);
|
|
static void Throw ();
|
|
|
|
};
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcXJLinkApplicationException : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXJLinkApplicationException)
|
|
|
|
public:
|
|
|
|
virtual xstring GetExceptionDescription ();
|
|
|
|
virtual void SetExceptionDescription (xrstring value);
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mExceptionDescription;
|
|
|
|
public:
|
|
pfcXJLinkApplicationException (xrstring inMessage, xrstring inMethodName, xrstring inExceptionDescription);
|
|
static void Throw (xrstring inMessage, xrstring inMethodName, xrstring inExceptionDescription);
|
|
|
|
};
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcDrawingCreateError : public virtual XOBJECT
|
|
{
|
|
ootk_xdeclare (pfcDrawingCreateError)
|
|
|
|
public:
|
|
virtual pfcDrawingCreateErrorType GetType();
|
|
virtual void SetType( pfcDrawingCreateErrorType inType );
|
|
|
|
virtual xstring GetViewName();
|
|
virtual void SetViewName( xstring inViewName );
|
|
|
|
virtual int GetSheetNumber();
|
|
virtual void SetSheetNumber( int inSheetNumber );
|
|
|
|
virtual optional xstring GetObjectName();
|
|
virtual void SetObjectName( optional xstring inObjectName );
|
|
|
|
virtual optional pfcView2D_ptr GetView();
|
|
virtual void SetView( optional pfcView2D_ptr inView );
|
|
|
|
virtual xstring GetMessage ();
|
|
virtual xstring GetTypeMessage();
|
|
|
|
// Constructor
|
|
pfcDrawingCreateError (
|
|
pfcDrawingCreateErrorType Type,
|
|
xstring ViewName,
|
|
int SheetNumber,
|
|
optional xstring ObjectName,
|
|
optional pfcView2D_ptr View
|
|
);
|
|
|
|
private:
|
|
pfcDrawingCreateErrorType Type;
|
|
xstring ViewName;
|
|
int SheetNumber;
|
|
optional xstring ObjectName;
|
|
optional pfcView2D_ptr View;
|
|
|
|
protected:
|
|
|
|
};
|
|
//*****************************************************************************
|
|
|
|
pk_xclssequence_decl (pfcDrawingCreateError, pfcDrawingCreateErrors);
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcXToolkitDrawingCreateErrors : public virtual pfcXToolkitError
|
|
{
|
|
ootk_xdeclare ( pfcXToolkitDrawingCreateErrors )
|
|
|
|
public:
|
|
virtual pfcDrawingCreateErrors_ptr GetErrors();
|
|
virtual void SetErrors( pfcDrawingCreateErrors_ptr errors );
|
|
|
|
virtual pfcDrawing_ptr GetCreatedDrawing();
|
|
virtual xstring GetMessage ();
|
|
|
|
static void Throw (
|
|
pfcDrawing_ptr inCreatedDrawing,
|
|
pfcDrawingCreateErrors_ptr inDrawingCreateErrors,
|
|
xstring inMethodName,
|
|
xstring inToolkitFunctionName );
|
|
|
|
pfcXToolkitDrawingCreateErrors (
|
|
pfcDrawing_ptr inCreatedDrawing,
|
|
xrstring inMessage,
|
|
xrstring inMethodName,
|
|
xrstring inToolkitFunctionName,
|
|
pfcDrawingCreateErrors_ptr inDrawingCreateErrors);
|
|
|
|
private:
|
|
pfcDrawingCreateErrors_ptr Errors;
|
|
pfcDrawing_ptr CreatedDrawing;
|
|
};
|
|
|
|
//*****************************************************************************
|
|
//** Moved from pfcCreation.h
|
|
pfcXToolkitDrawingCreateErrors_ptr pfcXToolkitDrawingCreateErrorsCreate (
|
|
pfcDrawing_ptr inCreatedDrawing,
|
|
xrstring inMessage,
|
|
xrstring inMethodName,
|
|
xrstring inToolkitFunctionName,
|
|
pfcDrawingCreateErrors_ptr inDrawingCreateErrors
|
|
);
|
|
//*****************************************************************************
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcXJLinkTaskNotFound : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXJLinkTaskNotFound)
|
|
|
|
public:
|
|
|
|
virtual xstring GetTaskId ();
|
|
|
|
virtual void SetTaskId (xrstring value);
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mTaskId;
|
|
|
|
public:
|
|
pfcXJLinkTaskNotFound (xrstring inMessage, xrstring inMethodName, xrstring inTaskId);
|
|
static void Throw (xrstring inMessage, xrstring inMethodName, xrstring inTaskId);
|
|
|
|
};
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcXJLinkTaskExists : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXJLinkTaskExists)
|
|
|
|
public:
|
|
|
|
virtual xstring GetTaskId ();
|
|
|
|
virtual void SetTaskId (xrstring value);
|
|
virtual xstring GetMessage ();
|
|
|
|
private:
|
|
xstring mTaskId;
|
|
|
|
public:
|
|
pfcXJLinkTaskExists (xrstring inMessage, xrstring inMethodName, xrstring inTaskId);
|
|
static void Throw (xrstring inMessage, xrstring inMethodName, xrstring inTaskId);
|
|
|
|
};
|
|
|
|
//*****************************************************************************
|
|
|
|
class pfcXJLinkApplicationInactive : public virtual pfcXInAMethod
|
|
{
|
|
ootk_xdeclare (pfcXJLinkApplicationInactive)
|
|
|
|
public:
|
|
pfcXJLinkApplicationInactive (xrstring inMessage, xrstring inMethodName);
|
|
static void Throw (xrstring inMessage, xrstring inMethodName);
|
|
|
|
};
|
|
|
|
# endif
|
|
|