當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。