本文整理匯總了C++中APIFunctionError函數的典型用法代碼示例。如果您正苦於以下問題:C++ APIFunctionError函數的具體用法?C++ APIFunctionError怎麽用?C++ APIFunctionError使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了APIFunctionError函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: APIFunctionError
bool FileFormatInstance::Open( ImageDescriptionArray& images,
const String& filePath, const IsoString& hints )
{
images.Clear();
if ( (*API->FileFormat->OpenImageFileEx)( handle, filePath.c_str(), hints.c_str(), 0/*flags*/ ) == api_false )
return false;
for ( uint32 i = 0, n = (*API->FileFormat->GetImageCount)( handle ); i < n; ++i )
{
IsoString id;
size_type len = 0;
(*API->FileFormat->GetImageId)( handle, 0, &len, i );
if ( len > 0 )
{
id.SetLength( len );
if ( (*API->FileFormat->GetImageId)( handle, id.Begin(), &len, i ) == api_false )
throw APIFunctionError( "GetImageId" );
id.ResizeToNullTerminated();
}
api_image_info info;
api_image_options options;
if ( (*API->FileFormat->GetImageDescription)( handle, &info, &options, i ) == api_false )
throw APIFunctionError( "GetImageDescription" );
ImageDescription d;
d.id = id;
APIImageInfoToPCL( d.info, info );
APIImageOptionsToPCL( d.options, options );
images.Add( d );
}
return true;
}
示例2: Button
ToolButton::ToolButton( const String& text, const pcl::Bitmap& icon, bool checkable, Control& parent ) :
Button( (*API->Button->CreateToolButton)(
ModuleHandle(), this, text.c_str(), icon.handle, checkable, parent.handle, 0 /*flags*/ ) )
{
if ( handle == 0 )
throw APIFunctionError( "CreateToolButton" );
}
示例3: APIFunctionError
ViewPropertyAttributes View::PropertyAttributes( const IsoString& property ) const
{
uint32 flags = 0;
if ( (*API->View->GetViewPropertyAttributes)( ModuleHandle(), handle, property.c_str(), &flags, 0/*type*/ ) == api_false )
throw APIFunctionError( "GetViewPropertyAttributes" );
return ViewPropertyAttributes( ViewPropertyAttribute::mask_type( flags ) );
}
示例4: APIPropertyValueFromVariant
void View::SetPropertyValue( const IsoString& property, const Variant& value, bool notify, ViewPropertyAttributes attributes )
{
api_property_value apiValue;
APIPropertyValueFromVariant( apiValue, value );
if ( (*API->View->SetViewPropertyValue)( ModuleHandle(), handle, property.c_str(), &apiValue, attributes, notify ) == api_false )
throw APIFunctionError( "SetViewPropertyValue" );
}
示例5: InPlaceGaussJordan
void PCL_FUNC InPlaceGaussJordan( FMatrix& A, FMatrix& B )
{
A.SetUnique();
B.SetUnique();
if ( (*API->Numerical->GaussJordanInPlaceF)( A.DataPtr(), B.DataPtr(), A.Rows(), B.Columns() ) == api_false )
throw APIFunctionError( "GaussJordanInPlaceF" );
}
示例6: APIFunctionError
double CubicSplineInterpolationBase::Interpolate( const double* fx, const double* fy, const double* dy2, int n, double x, int32& k )
{
double y;
if ( (*API->Numerical->CubicSplineInterpolateD)( &y, fx, fy, dy2, n, x, &k ) == api_false )
throw APIFunctionError( "CubicSplineInterpolateD" );
return y;
}
示例7: APIFunctionError
float Pen::Width() const
{
float width;
if ( (*API->Pen->GetPenWidth)( handle, &width ) == api_false )
throw APIFunctionError( "GetPenWidth" );
return width;
}
示例8: APIFunctionError
void SurfaceSplineBase::Generate( double* fx, double* fy, const double* fz, int n,
int m, float r, const float* w, double* cv,
double& rm, double& xm, double& ym )
{
if ( (*API->Numerical->SurfaceSplineGenerateD)( cv, &rm, &xm, &ym, fx, fy, fz, n, m, r, w ) == api_false )
throw APIFunctionError( "SurfaceSplineGenerateD" );
}
示例9: APIFunctionError
DRect SVG::ViewBox() const
{
DRect r;
if ( (*API->SVG->GetSVGViewBox)( handle, &r.x0, &r.y0, &r.x1, &r.y1 ) == api_false )
throw APIFunctionError( "GetSVGViewBox" );
return r;
}
示例10: Frame
BitmapBox::BitmapBox( const Bitmap& bm, Control& parent ) :
Frame( (*API->BitmapBox->CreateBitmapBox)(
ModuleHandle(), this, bm.handle, parent.handle, 0 /*flags*/ ) )
{
if ( handle == 0 )
throw APIFunctionError( "CreateBitmapBox" );
}
示例11: m_handle
Console::Console() : m_handle( 0 ), m_thread( 0 )
{
if ( (m_handle = (*API->Global->GetConsole)()) == 0 )
throw APIFunctionError( "GetConsole" );
m_thread = (*API->Thread->GetCurrentThread)();
}
示例12: APIFunctionError
ProcessParameter::data_type ProcessParameter::Type() const
{
if ( IsNull() )
return ProcessParameterType::Invalid;
uint32 apiType = (*API->Process->GetParameterType)( m_data->handle );
if ( apiType == 0 )
throw APIFunctionError( "GetParameterType" );
switch ( apiType & PTYPE_TYPE_MASK )
{
case PTYPE_UINT8: return ProcessParameterType::UInt8;
case PTYPE_INT8: return ProcessParameterType::Int8;
case PTYPE_UINT16: return ProcessParameterType::UInt16;
case PTYPE_INT16: return ProcessParameterType::Int16;
case PTYPE_UINT32: return ProcessParameterType::UInt32;
case PTYPE_INT32: return ProcessParameterType::Int32;
case PTYPE_UINT64: return ProcessParameterType::UInt64;
case PTYPE_INT64: return ProcessParameterType::Int64;
case PTYPE_FLOAT: return ProcessParameterType::Float;
case PTYPE_DOUBLE: return ProcessParameterType::Double;
case PTYPE_BOOL: return ProcessParameterType::Boolean;
case PTYPE_ENUM: return ProcessParameterType::Enumeration;
case PTYPE_STRING: return ProcessParameterType::String;
case PTYPE_TABLE: return ProcessParameterType::Table;
case PTYPE_BLOCK: return ProcessParameterType::Block;
default: throw Error( "ProcessParameter::Type(): Internal error: Unknown parameter type" );
}
}
示例13: APIFunctionError
void ExternalProcess::Write( const void* data, size_type count )
{
if ( data != nullptr )
if ( count > 0 )
if ( (*API->ExternalProcess->WriteToExternalProcess)( handle, data, count ) == api_false )
throw APIFunctionError( "WriteToExternalProcess" );
}
示例14: APIFunctionError
Array<FileFormat> FileFormat::AllFormats()
{
Array<FileFormat> formats;
if ( (*API->FileFormat->EnumerateFileFormats)( FileFormatPrivate::EnumerationCallback, &formats ) == api_false )
throw APIFunctionError( "EnumerateFileFormats" );
return formats;
}
示例15: INIT_EVENT_HANDLERS
void ExternalProcess::OnError( process_error_event_handler handler, Control& receiver )
{
INIT_EVENT_HANDLERS();
if ( (*API->ExternalProcess->SetExternalProcessErrorEventRoutine)( handle, &receiver,
(handler != nullptr) ? ExternalProcessEventDispatcher::Error : 0 ) == api_false )
throw APIFunctionError( "SetExternalProcessErrorEventRoutine" );
m_handlers->onError = handler;
}