当前位置: 首页>>代码示例>>C++>>正文


C++ APIFunctionError函数代码示例

本文整理汇总了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;
}
开发者ID:aleixpuig,项目名称:PCL,代码行数:35,代码来源:FileFormatInstance.cpp

示例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" );
}
开发者ID:morserover,项目名称:PCL,代码行数:7,代码来源:ToolButton.cpp

示例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 ) );
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:7,代码来源:View.cpp

示例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" );
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:7,代码来源:View.cpp

示例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" );
}
开发者ID:morserover,项目名称:PCL,代码行数:7,代码来源:Algebra.cpp

示例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;
}
开发者ID:aleixpuig,项目名称:PCL,代码行数:7,代码来源:CubicSplineInterpolation.cpp

示例7: APIFunctionError

float Pen::Width() const
{
   float width;
   if ( (*API->Pen->GetPenWidth)( handle, &width ) == api_false )
      throw APIFunctionError( "GetPenWidth" );
   return width;
}
开发者ID:AndresPozo,项目名称:PCL,代码行数:7,代码来源:Pen.cpp

示例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" );
}
开发者ID:aleixpuig,项目名称:PCL,代码行数:7,代码来源:SurfaceSpline.cpp

示例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;
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:7,代码来源:SVG.cpp

示例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" );
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:7,代码来源:BitmapBox.cpp

示例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)();
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:7,代码来源:Console.cpp

示例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" );
   }
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:29,代码来源:ProcessParameter.cpp

示例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" );
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:7,代码来源:ExternalProcess.cpp

示例14: APIFunctionError

Array<FileFormat> FileFormat::AllFormats()
{
   Array<FileFormat> formats;
   if ( (*API->FileFormat->EnumerateFileFormats)( FileFormatPrivate::EnumerationCallback, &formats ) == api_false )
      throw APIFunctionError( "EnumerateFileFormats" );
   return formats;
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:7,代码来源:FileFormat.cpp

示例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;
}
开发者ID:SunGong1993,项目名称:PCL,代码行数:8,代码来源:ExternalProcess.cpp


注:本文中的APIFunctionError函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。