• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ descriptor函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中descriptor函数的典型用法代码示例。如果您正苦于以下问题:C++ descriptor函数的具体用法?C++ descriptor怎么用?C++ descriptor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了descriptor函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: content

 /// Retrieve a pointer to the data content of a given microslice
 const uint8_t* content(uint64_t component, uint64_t microslice) const {
   return data_ptr_[component] +
          desc_ptr_[component]->num_microslices *
              sizeof(MicrosliceDescriptor) +
          descriptor(component, microslice).offset -
          descriptor(component, 0).offset;
 }
开发者ID:PALoizeau,项目名称:flesnet,代码行数:8,代码来源:Timeslice.hpp


示例2: deferGC

bool InferredType::set(const ConcurrentJSLocker& locker, VM& vm, Descriptor newDescriptor)
{
    // We will trigger write barriers while holding our lock. Currently, write barriers don't GC, but that
    // could change. If it does, we don't want to deadlock. Note that we could have used
    // GCSafeConcurrentJSLocker in the caller, but the caller is on a fast path so maybe that wouldn't be
    // a good idea.
    DeferGCForAWhile deferGC(vm.heap);
    
    // Be defensive: if we're not really changing the type, then we don't have to do anything.
    if (descriptor(locker) == newDescriptor)
        return false;

    bool shouldFireWatchpointSet = false;
    
    // The new descriptor must be more general than the previous one.
    ASSERT(newDescriptor.subsumes(descriptor(locker)));

    // If the new descriptors have different structures, then it can only be because one is null.
    if (descriptor(locker).structure() != newDescriptor.structure())
        ASSERT(!descriptor(locker).structure() || !newDescriptor.structure());

    // We are changing the type, so make sure that if anyone was watching, they find out about it now. If
    // anyone is watching, we make sure to go to Top so that we don't do this sort of thing again.
    if (m_watchpointSet.state() != ClearWatchpoint) {
        // We cannot have been invalidated, since if we were, then we'd already be at Top.
        ASSERT(m_watchpointSet.state() != IsInvalidated);

        // We're about to do expensive things because some compiler thread decided to watch this type and
        // then the type changed. Assume that this property is crazy, and don't ever do any more things for
        // it.
        newDescriptor = Top;

        shouldFireWatchpointSet = true;
    }

    // Remove the old InferredStructure object if we no longer need it.
    if (!newDescriptor.structure())
        m_structure = nullptr;

    // Add a new InferredStructure object if we need one now.
    if (newDescriptor.structure()) {
        if (m_structure) {
            // We should agree on the structures if we get here.
            ASSERT(newDescriptor.structure() == m_structure->structure());
        } else {
            m_structure = adoptRef(new InferredStructure(vm, this, newDescriptor.structure()));
            newDescriptor.structure()->addTransitionWatchpoint(&m_structure->m_watchpoint);
        }
    }

    // Finally, set the descriptor kind.
    m_kind = newDescriptor.kind();

    // Assert that we did things.
    ASSERT(descriptor(locker) == newDescriptor);

    return shouldFireWatchpointSet;
}
开发者ID:caiolima,项目名称:webkit,代码行数:58,代码来源:InferredType.cpp


示例3: descriptor

 const field_desc_type *find_field( const std::string &name ) const
 {
     const field_desc_type *fld(descriptor()->FindFieldByName(name));
     if( fld ) return fld;
     fld = descriptor()->FindFieldByLowercaseName( name );
     if( fld ) return fld;
     fld = descriptor()->FindFieldByCamelcaseName( name );
     if( fld ) return fld;
     return NULL;
 }
开发者ID:malchemist,项目名称:vtrc,代码行数:10,代码来源:message-helper.cpp


示例4: TEST

TEST(CustomElementDescriptorTest,
    matches_customizedBuiltIn_shouldNotMatchAutonomousElement)
{
    CustomElementDescriptor descriptor("a-b", "button");
    Element* element = CreateElement("a-b");
    EXPECT_FALSE(descriptor.matches(*element));
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:7,代码来源:CustomElementDescriptorTest.cpp


示例5: IPC_OK

mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvAddBlobImage(const wr::ImageKey& aImageKey,
                                        const gfx::IntSize& aSize,
                                        const uint32_t& aStride,
                                        const gfx::SurfaceFormat& aFormat,
                                        const ByteBuffer& aBuffer)
{
  if (mDestroyed) {
    return IPC_OK();
  }

  // Check if key is obsoleted.
  if (aImageKey.mNamespace != mIdNamespace) {
    return IPC_OK();
  }

  MOZ_ASSERT(mApi);
  MOZ_ASSERT(mActiveImageKeys.find(wr::AsUint64(aImageKey)) == mActiveImageKeys.end());

  wr::ImageDescriptor descriptor(aSize, aStride, aFormat);
  mActiveImageKeys.insert(wr::AsUint64(aImageKey));
  mApi->AddBlobImage(aImageKey, descriptor,
                     aBuffer.AsSlice());

  return IPC_OK();
}
开发者ID:yrliou,项目名称:gecko-dev,代码行数:26,代码来源:WebRenderBridgeParent.cpp


示例6: construct_graph

void construct_graph( const Points& points, 
		      const double epsilon,
		      Graph& graph) {
    typedef typename boost::graph_traits<Graph> graph_traits;
    typedef typename graph_traits::vertex_iterator vertex_iterator;
    typedef typename boost::graph_traits< Graph>::vertex_descriptor vertex_descriptor; 
    typedef typename boost::property_map< Graph,
					  boost::vertex_name_t>::type name_map_t;
    typedef typename boost::property_traits< name_map_t>::value_type  vertex_name_t;
    typedef std::unordered_map< vertex_name_t, vertex_descriptor> Name_to_descriptor_map;

    name_map_t name_map = boost::get( boost::vertex_name, graph);
    Name_to_descriptor_map descriptor( points.size());

    // add vertices
    for( std::size_t i = 0; i < points.size(); ++i) {
	vertex_descriptor v_descriptor = boost::add_vertex( graph);
	name_map[ v_descriptor] = i;
	descriptor.emplace( i, v_descriptor);
    }

    // add edges
    vertex_iterator vi, vj, vlast;
    double epsilon_squared = epsilon*epsilon;
    for ( std::tie( vi, vlast) = boost::vertices( graph); vi != vlast; ++vi) {
      for ( std::tie( vj, vlast) = boost::vertices (graph); vj != vi; ++vj) {
       
	if( lp(points.begin(name_map[*vi]), 
	       points.end(name_map[*vi]), 
	       points.begin(name_map[*vj])) < epsilon_squared){
             boost::add_edge(*vi, *vj, graph);
       }
      } 
    }
} 
开发者ID:albertasd,项目名称:ctl,代码行数:35,代码来源:all_pairs.hpp


示例7: GetBulkData

      virtual QPair<QByteArray, bool> GetBulkData(int)
      {
        QByteArray data(1024, 0);
        CreateDescriptor(data);

        SetTriggered();
        int my_idx = GetGroup().GetIndex(GetLocalId());
        int bad = Random::GetInstance().GetInt(0, GetGroup().Count());
        while(bad == my_idx) {
          bad = Random::GetInstance().GetInt(0, GetGroup().Count());
        }

        qDebug() << my_idx << "setting bad hash at" << bad;
        const Descriptor &cdes = GetMyDescriptor();
        QVector<QByteArray> hashes = cdes.XorMessageHashes();

        hashes[bad] = Hash().ComputeHash(data);

        Descriptor descriptor(cdes.Length(), cdes.PublicDh(), hashes,
            cdes.CleartextHash());
        SetMyDescriptor(descriptor);

        QByteArray my_desc;
        QDataStream desstream(&my_desc, QIODevice::WriteOnly);
        desstream << GetMyDescriptor();
        return QPair<QByteArray, bool>(my_desc, false);
      }
开发者ID:ASchurman,项目名称:Dissent,代码行数:27,代码来源:BulkRoundHelpers.hpp


示例8: assert

template <typename PointInT, typename PointNT, typename PointOutT> void
pcl::ShapeContext3DEstimation<PointInT, PointNT, PointOutT>::computeFeature (PointCloudOut &output)
{
  assert (descriptor_length_ == 1980);

  output.is_dense = true;
  // Iterate over all points and compute the descriptors
	for (size_t point_index = 0; point_index < indices_->size (); point_index++)
  {
    //output[point_index].descriptor.resize (descriptor_length_);

    // If the point is not finite, set the descriptor to NaN and continue
    if (!isFinite ((*input_)[(*indices_)[point_index]]))
    {
      for (size_t i = 0; i < descriptor_length_; ++i)
        output[point_index].descriptor[i] = std::numeric_limits<float>::quiet_NaN ();

      memset (output[point_index].rf, 0, sizeof (output[point_index].rf[0]) * 9);
      output.is_dense = false;
      continue;
    }

    std::vector<float> descriptor (descriptor_length_);
    if (!computePoint (point_index, *normals_, output[point_index].rf, descriptor))
      output.is_dense = false;
    for (size_t j = 0; j < descriptor_length_; ++j)
      output[point_index].descriptor[j] = descriptor[j];
  }
}
开发者ID:ShiningPluto,项目名称:pcl,代码行数:29,代码来源:3dsc.hpp


示例9: keys

  void ODFeatureDetector2D::findSiftGPUDescriptors(char const *image_name, cv::Mat &descriptors, vector<cv::KeyPoint> &keypoints)
  {
    sift_gpu_->RunSIFT(image_name);

    int nFeat = sift_gpu_->GetFeatureNum();//get feature count
    //allocate memory for readback
    vector<SiftGPU::SiftKeypoint> keys(nFeat);
    //read back keypoints and normalized descritpros
    //specify NULL if you don’t need keypoints or descriptors
    vector<float> imageDescriptors(128 * nFeat);
    sift_gpu_->GetFeatureVector(&keys[0], &imageDescriptors[0]);

    sift_gpu_->SaveSIFT("1.sift");

    //to opencv format
    keypoints.clear();
    descriptors.create(0, 128, CV_32FC1);
    for(int i = 0; i < nFeat; ++i) {
      cv::KeyPoint key(keys[i].x, keys[i].y, keys[i].s, keys[i].o);
      keypoints.push_back(key);
      cv::Mat descriptor(1, 128, CV_32FC1);
      for(int x = 0; x < 128; x++) descriptor.at<float>(x) = floor(0.5 + 512.0f * imageDescriptors[(i << 7) + x]);
      descriptors.push_back(descriptor);
    }
    cv::Mat image = cv::imread(image_name);
  }
开发者ID:Aravind-Suresh,项目名称:opendetection,代码行数:26,代码来源:ODFeatureDetector2D.cpp


示例10: typeptr

// -----------------------------------------------------------------------------
// RDRMHelper::IsAutomated
// -----------------------------------------------------------------------------
//
TInt RDRMHelper::IsAutomated(
    const TDesC8& aUri,
    TInt aAutomatedType,
    TInt aIntent,
    TBool& aAutomated,
    TInt& aType ) const
{
    TPtr8 typeptr( reinterpret_cast< TUint8* >( &aType ), 0, sizeof( TInt ) );
    TPtr8 flag( reinterpret_cast< TUint8* >( &aAutomated ), 0, sizeof( TInt ) );
    TInt ret( 0 );
    TInt type = CDRMHelperServer::EActive;

    // Create descriptor to enable copying data between
    // client and server. Note: This can be local since
    // this is a synchronous call.
    // Note : Using TPtr8 since this is binary information
    TPtrC8 descriptor( aUri );

    // This call waits for the server to complete the request before
    // proceeding.
    ret = SendReceive(
              EIsRegistered,
              TIpcArgs( aIntent, type, aAutomatedType, &descriptor ) );
    if ( !ret )
    {
        type = CDRMHelperServer::EPassive;
        ret = SendReceive(
                  EIsRegistered,
                  TIpcArgs( aIntent, type, aAutomatedType, &descriptor ) );
    }
    aAutomated = ret > 0 ? ETrue : EFalse;
    aType = type;
    return KErrNone;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:38,代码来源:RDRMHelper.cpp


示例11: descriptor

bool InferredType::canWatch(const ConcurrentJSLocker& locker, const Descriptor& expected)
{
    if (expected.kind() == Top)
        return false;
    
    return descriptor(locker) == expected;
}
开发者ID:caiolima,项目名称:webkit,代码行数:7,代码来源:InferredType.cpp


示例12: descriptor

// -----------------------------------------------------------------------------
// RDRMHelper::RemoveAutomatedAll
//
// Unregister one content uri
// -----------------------------------------------------------------------------
//
TInt RDRMHelper::RemoveAutomatedAll(
    const TDesC8& aUri,
    TBool aActive,
    TInt aAutomatedType,
    TInt aIntent ) const
{
    TPtrC8 descriptor( aUri );
    TInt ret;
    TInt mode(
        aActive ? CDRMHelperServer::EActive : CDRMHelperServer::EPassive );
    TBool automated = EFalse;
    TInt tempMode( 0 );

    // This call waits for the server to complete the request before
    // proceeding.
    ret = SendReceive(
              ERemove, TIpcArgs( aIntent, mode, aAutomatedType, &descriptor ) );
    IsAutomated( aUri, aAutomatedType, aIntent, automated, tempMode );
    while ( automated && tempMode == mode )
    {
        // unregister all
        ret = SendReceive(
                  ERemove, TIpcArgs( aIntent, mode, aAutomatedType, &descriptor ) );
        IsAutomated( aUri, aAutomatedType, aIntent, automated, tempMode );
    }

    if ( ret == KErrNotFound )
    {
        ret = KErrNone;
    }
    return ret;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:38,代码来源:RDRMHelper.cpp


示例13: ret

// -----------------------------------------------------------------------------
// RDRMHelper::RemoveAutomated
//
// Unregister one content uri
// -----------------------------------------------------------------------------
//
TInt RDRMHelper::RemoveAutomated(
    const TDesC8& aUri,
    TBool aActive,
    TInt aAutomatedType,
    TInt aIntent ) const
{
    TInt ret( 0 );
    TInt mode(
        aActive ? CDRMHelperServer::EActive : CDRMHelperServer::EPassive );

    // Create descriptor to enable copying data between
    // client and server. Note: This can be local since
    // this is a synchronous call.
    // Note : Using TPtr8 since this is binary information
    TPtrC8 descriptor( aUri );

    // This call waits for the server to complete the request before
    // proceeding.
    ret = SendReceive(
              ERemove, TIpcArgs( aIntent, mode, aAutomatedType, &descriptor ) );

    if ( ret == KErrNotFound )
    {
        // content was never actually registered
        ret = KErrNone;
    }
    return ret;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:34,代码来源:RDRMHelper.cpp


示例14: ac

SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
    {
        SkAutoMutexAcquire  ac(gFamilyMutex);
        load_system_fonts();
    }

    SkFontDescriptor descriptor(stream);
    const char* familyName = descriptor.getFamilyName();
    const char* typefaceName = descriptor.getFontFileName();
    const SkTypeface::Style style = descriptor.getStyle();

    const uint32_t customFontDataLength = stream->readPackedUInt();
    if (customFontDataLength > 0) {

        // generate a new stream to store the custom typeface
        SkMemoryStream* fontStream = new SkMemoryStream(customFontDataLength - 1);
        stream->read((void*)fontStream->getMemoryBase(), customFontDataLength - 1);

        SkTypeface* face = CreateTypefaceFromStream(fontStream);

        fontStream->unref();
        return face;
    }

    return SkFontHost::CreateTypeface(NULL, familyName, style);
}
开发者ID:jamorton,项目名称:blix,代码行数:26,代码来源:SkFontHost_linux.cpp


示例15: assert

void
NewNet::TcpClientSocket::connect(const std::string & host, unsigned int port)
{
  assert((descriptor() == -1) || (socketState() == SocketUninitialized));

  setSocketState(SocketConnecting);

  NNLOG("newnet.net.debug", "Resolving host '%s'.", host.c_str());
  struct hostent *h = gethostbyname(host.c_str());
  if(! h)
  {
    NNLOG("newnet.net.warn", "Cannot resolve host '%s'.", host.c_str());
    setSocketError(ErrorCannotResolve);
    cannotConnectEvent(this);
    return;
  }

  struct sockaddr_in address;
  memset(&address, 0, sizeof(address));
  address.sin_family = AF_INET;
  memcpy(&(address.sin_addr.s_addr), *(h->h_addr_list), sizeof(address.sin_addr.s_addr));
  address.sin_port = htons(port);

  NNLOG("newnet.net.debug", "Connecting to host '%s:%u'.", host.c_str(), port);

  int s = socket(PF_INET, SOCK_STREAM, 0);
  if (!setnonblocking(s))
    NNLOG("newnet.net.warn", "Couldn't set socket %i to non blocking (errno: %i)", s, errno);
  setDescriptor(s);

  if(s < 0)
    {
      NNLOG("newnet.net.warn", "Cannot connect to host '%s:%u', error: %i.", host.c_str(), port, WSAGetLastError());
      setSocketError(ErrorCannotConnect);
      cannotConnectEvent(this);
      return;
    }

  // Add a connection timeout
  if (reactor()) {
    m_ConnectionTimeout = reactor()->addTimeout(120000, this, &TcpClientSocket::onConnectionTimeout);
  }

  connectedEvent.connect(this, &TcpClientSocket::onConnected);

  if(::connect(s, (struct sockaddr *)&address, sizeof(struct sockaddr_in)) == 0)
  {
    // When using non blocking socket (most of the time), we don't get here.
    NNLOG("newnet.net.debug", "Connected to host '%s:%u'.", host.c_str(), port);
    setSocketState(SocketConnected);
    connectedEvent(this);
  }
  else if(WSAGetLastError() != WSAEWOULDBLOCK)
  {
    // When using non blocking socket (most of the time), we don't get here.
    NNLOG("newnet.net.warn", "Cannot connect to host '%s:%u', error: %i.", host.c_str(), port, WSAGetLastError());
    setSocketError(ErrorCannotConnect);
    cannotConnectEvent(this);
  }
}
开发者ID:KenjiTakahashi,项目名称:newsoul,代码行数:60,代码来源:nntcpclientsocket.cpp


示例16: LongCrcSection

NetworkInformationSection::NetworkInformationSection(const uint8_t * const buffer) : LongCrcSection(buffer)
{
	networkId = UINT16(&buffer[3]);
	networkDescriptorsLength = sectionLength > 9 ? DVB_LENGTH(&buffer[8]) : 0;
	
	uint16_t pos = 10;
	uint16_t bytesLeft = sectionLength > 11 ? sectionLength - 11 : 0;
	uint16_t loopLength = 0;
	uint16_t bytesLeft2 = networkDescriptorsLength;

	while ( bytesLeft >= bytesLeft2 && bytesLeft2 > 1 && bytesLeft2 >= (loopLength = 2 + buffer[pos+1])) {
		descriptor(&buffer[pos], SCOPE_SI);
		pos += loopLength;
		bytesLeft -= loopLength;
		bytesLeft2 -= loopLength;
	}

	if (!bytesLeft2 && bytesLeft > 1) {
		bytesLeft2 = transportStreamLoopLength = DVB_LENGTH(&buffer[pos]);
		bytesLeft -= 2;
		pos += 2;
		while (bytesLeft >= bytesLeft2 && bytesLeft2 > 4 && bytesLeft2 >= (loopLength = 6 + DVB_LENGTH(&buffer[pos+4]))) {
			tsInfo.push_back(new TransportStreamInfo(&buffer[pos]));
			bytesLeft -= loopLength;
			bytesLeft2 -= loopLength;
			pos += loopLength;
		}
	}
}
开发者ID:OpenDMM,项目名称:libdvbsi-,代码行数:29,代码来源:network_information_section.cpp


示例17: xor_message

  void BulkRound::CreateDescriptor(const QByteArray &data)
  {
    int length = data.size();

    Hash hashalgo;

    QByteArray xor_message(length, 0);
    QVector<QByteArray> hashes;

    int my_idx = GetGroup().GetIndex(GetLocalId());

    foreach(const PublicIdentity &gc, GetGroup().GetRoster()) {
      QByteArray seed = _anon_dh.GetSharedSecret(gc.GetDhKey());

      if(hashes.size() == my_idx) {
        hashes.append(QByteArray());
        continue;
      }

      QByteArray msg(length, 0);
      CryptoRandom(seed).GenerateBlock(msg);
      hashes.append(hashalgo.ComputeHash(msg));
      Xor(xor_message, xor_message, msg);
    }

    QByteArray my_xor_message = QByteArray(length, 0);
    Xor(my_xor_message, xor_message, data);
    SetMyXorMessage(my_xor_message);
    hashes[my_idx] = hashalgo.ComputeHash(my_xor_message);

    QByteArray hash = hashalgo.ComputeHash(data);

    Descriptor descriptor(length, _anon_dh.GetPublicComponent(), hashes, hash);
    SetMyDescriptor(descriptor);
  }
开发者ID:applsdev,项目名称:Dissent,代码行数:35,代码来源:BulkRound.cpp


示例18: conv

std::vector<Descriptor> Image::getDescriptorsRotateInvariant(const std::vector<ImagePoint>& points, const int gaussKernelRadius, const BorderEffectType borderEffect) const
{
	const auto gradX = conv(KernelsFactory::sobelGradientXKernel(), borderEffect);
	const auto gradY = conv(KernelsFactory::sobelGradientYKernel(), borderEffect);
	const auto extraGaussKernelRadius = gaussKernelRadius * 2;
	const auto extraKernel = KernelsFactory::gaussKernel(extraGaussKernelRadius, GaussKernelType::FULL);
	auto descriptors = std::vector<Descriptor>();
	for (auto point : points) {
		auto angles = getPointMaxGradientAngles(point, extraGaussKernelRadius, gradX, gradY, extraKernel, borderEffect);
		for (auto angle : angles) {
			Descriptor descriptor(point.getX(), point.getY(), angle);
			const auto netStep = int(ceil(gaussKernelRadius * 2 / double(descriptor.getSize())));
			auto cosAngle = cos(angle);
			auto sinAngle = sin(angle);
			for (auto i = descriptor.getX() - extraGaussKernelRadius, kernel_i = 0; i < descriptor.getX() + extraGaussKernelRadius; ++i, ++kernel_i)
				for (auto j = descriptor.getY() - extraGaussKernelRadius, kernel_j = 0; j < descriptor.getY() + extraGaussKernelRadius; ++j, ++kernel_j) {
					const auto dx = gradX.getValue(i, j, borderEffect);
					const auto dy = gradY.getValue(i, j, borderEffect);
					const auto gradAngleToAdd = ImageHelper::getNormalizedAngle(atan2(dy, dx) - angle);
					const auto gradLength = sqrt(dx * dx + dy * dy) * extraKernel.get(kernel_i, kernel_j);
					auto windowRotatedX = int(round((i - descriptor.getX()) * cosAngle - (j - descriptor.getY()) * sinAngle));
					auto windowRotatedY = int(round((i - descriptor.getX()) * sinAngle + (j - descriptor.getY()) * cosAngle));
					if (windowRotatedX < -extraGaussKernelRadius || windowRotatedX > -1 || windowRotatedY < -extraGaussKernelRadius || windowRotatedY > -1) {
						continue;
					}
					descriptor.addValueOnAngleWithIndex((windowRotatedX + extraGaussKernelRadius) / netStep, (windowRotatedY + extraGaussKernelRadius) / netStep, gradAngleToAdd, gradLength);
				}
			descriptor.normalize();
			descriptors.emplace_back(std::move(descriptor));
		}
	}
	return descriptors;
}
开发者ID:AnatoliDubko,项目名称:CV,代码行数:33,代码来源:Image.cpp


示例19: qCDebug

void Discover::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
    QProcess *process = static_cast<QProcess*>(sender());

    // If the process was killed because guhd is shutting down...we dont't care any more about the result
    if (m_aboutToQuit)
        return;

    // Discovery
    if (process == m_discoveryProcess) {

        qCDebug(dcWallbe()) << "Discovery process finished";

        process->deleteLater();
        m_discoveryProcess = 0;

        QList<DeviceDescriptor> deviceDescriptors;
        if (exitCode != 0 || exitStatus != QProcess::NormalExit) {
            qCWarning(dcWallbe()) << "Network scan error:" << process->readAllStandardError();
            emit devicesDiscovered(deviceDescriptors);
            return;
        }

        QByteArray outputData = process->readAllStandardOutput();
        foreach (const Host &host, parseProcessOutput(outputData)) {
            DeviceDescriptor descriptor(wallbeEcoDeviceClassId, host.hostName(), host.address());
            descriptor.setParams( ParamList() << Param(wallbeEcoIpParamTypeId, host.address()));
            deviceDescriptors.append(descriptor);
        }
开发者ID:Boernsman,项目名称:wallbe,代码行数:29,代码来源:discover.cpp


示例20: descriptor

Object::Pointer SavePerspectiveHandler::Execute(const SmartPointer<const berry::ExecutionEvent>& event)
{

  IWorkbenchWindow::Pointer activeWorkbenchWindow = HandlerUtil::GetActiveWorkbenchWindow(event);
  if (activeWorkbenchWindow.IsNotNull())
  {
    IWorkbenchPage::Pointer page = activeWorkbenchWindow->GetActivePage();
    if (page.IsNotNull())
    {
      PerspectiveDescriptor::Pointer descriptor(page->GetPerspective().Cast<PerspectiveDescriptor>());
      if (descriptor.IsNotNull())
      {
        if (descriptor->IsSingleton())
        {
          SaveSingleton(page);
        }
        else
        {
          SaveNonSingleton(page, descriptor);
        }
      }
    }
  }
  return Object::Pointer();
}
开发者ID:151706061,项目名称:MITK,代码行数:25,代码来源:berrySavePerspectiveHandler.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ deserialize函数代码示例发布时间:2022-05-30
下一篇:
C++ description函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap