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


C++ CAST_PTR函数代码示例

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


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

示例1: CAST_PTR

void i4_horizontal_compact_window_class::receive_event(i4_event * ev)
{
	if (ev->type()==i4_event::WINDOW_MESSAGE)
	{
		CAST_PTR(mess,i4_window_message_class,ev);

		if (mess->sub_type==i4_window_message_class::NOTIFY_RESIZE)
		{
			CAST_PTR(res,i4_window_notify_resize_class,ev);
			sw32 ow=res->from()->width(), oh=res->from()->height();
			res->from()->private_resize(res->new_width, res->new_height);
			compact();
			res->from()->private_resize(ow, oh);
			note_undrawn(0,0, width()-1, height()-1);
		}
		else
		{
			i4_parent_window_class::receive_event(ev);
		}
	}
	else
	{
		i4_parent_window_class::receive_event(ev);
	}
}
开发者ID:pgrawehr,项目名称:golgotha,代码行数:25,代码来源:gui__browse_tree.cpp

示例2: cGT_AcquisitionModelForward

void*
cGT_AcquisitionModelForward(void* ptr_am, const void* ptr_imgs)
{
	try {
		CAST_PTR(DataHandle, h_am, ptr_am);
		CAST_PTR(DataHandle, h_imgs, ptr_imgs);
		AcquisitionModel& am = objectFromHandle<AcquisitionModel>(h_am);
		ImagesContainer& imgs = objectFromHandle<ImagesContainer>(h_imgs);
		boost::shared_ptr<AcquisitionsContainer> sptr_acqs = am.fwd(imgs);
		return sptrObjectHandle<AcquisitionsContainer>(sptr_acqs);
	}
	CATCH;
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:13,代码来源:cgadgetron.cpp

示例3: cGT_setCSMs

void*
cGT_setCSMs(void* ptr_am, const void* ptr_csms)
{
	try {
		CAST_PTR(DataHandle, h_am, ptr_am);
		CAST_PTR(DataHandle, h_csms, ptr_csms);
		AcquisitionModel& am = objectFromHandle<AcquisitionModel>(h_am);
		boost::shared_ptr<CoilSensitivitiesContainer> sptr_csms =
			objectSptrFromHandle<CoilSensitivitiesContainer>(h_csms);
		am.setCSMs(sptr_csms);
		return (void*)new DataHandle;
	}
	CATCH;
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:14,代码来源:cgadgetron.cpp

示例4: cGT_addGadget

void*
cGT_addGadget(void* ptr_gc, const char* id, const void* ptr_g)
{
	try {
		CAST_PTR(DataHandle, h_gc, ptr_gc);
		CAST_PTR(DataHandle, h_g, ptr_g);
		GadgetChain& gc = objectFromHandle<GadgetChain>(h_gc);
		boost::shared_ptr<aGadget>& g = objectSptrFromHandle<aGadget>(h_g);
		gc.add_gadget(id, g);
	}
	CATCH;

	return (void*)new DataHandle;
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:14,代码来源:cgadgetron.cpp

示例5: cGT_processImages

void*
cGT_processImages(void* ptr_proc, void* ptr_input)
{
	try {
		CAST_PTR(DataHandle, h_proc, ptr_proc);
		CAST_PTR(DataHandle, h_input, ptr_input);
		ImagesProcessor& proc = objectFromHandle<ImagesProcessor>(h_proc);
		ImagesContainer& input = objectFromHandle<ImagesContainer>(h_input);
		proc.process(input);
		boost::shared_ptr<ImagesContainer> sptr_img = proc.get_output();
		return sptrObjectHandle<ImagesContainer>(sptr_img);
	}
	CATCH;

}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:15,代码来源:cgadgetron.cpp

示例6: cGT_AcquisitionModel

void*
cGT_AcquisitionModel(const void* ptr_acqs, const void* ptr_imgs)
{
	try {
		CAST_PTR(DataHandle, h_acqs, ptr_acqs);
		CAST_PTR(DataHandle, h_imgs, ptr_imgs);
		boost::shared_ptr<AcquisitionsContainer> acqs =
			objectSptrFromHandle<AcquisitionsContainer>(h_acqs);
		boost::shared_ptr<ImagesContainer> imgs =
			objectSptrFromHandle<ImagesContainer>(h_imgs);
		boost::shared_ptr<AcquisitionModel> am(new AcquisitionModel(acqs, imgs));
		return sptrObjectHandle<AcquisitionModel>(am);
	}
	CATCH;
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:15,代码来源:cgadgetron.cpp

示例7: cGT_computeCoilSensitivities

void*
cGT_computeCoilSensitivities(void* ptr_csms, void* ptr_acqs)
{
	try {
		CAST_PTR(DataHandle, h_csms, ptr_csms);
		CAST_PTR(DataHandle, h_acqs, ptr_acqs);
		CoilSensitivitiesContainer& csms =
			objectFromHandle<CoilSensitivitiesContainer>(h_csms);
		AcquisitionsContainer& acqs =
			objectFromHandle<AcquisitionsContainer>(h_acqs);
		csms.compute(acqs);
		return (void*)new DataHandle;
	}
	CATCH;
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:15,代码来源:cgadgetron.cpp

示例8: cGT_reconstructImages

void*
cGT_reconstructImages(void* ptr_recon, void* ptr_input)
{
	try {
		CAST_PTR(DataHandle, h_recon, ptr_recon);
		CAST_PTR(DataHandle, h_input, ptr_input);
		ImagesReconstructor& recon = objectFromHandle<ImagesReconstructor>(h_recon);
		AcquisitionsContainer& input = objectFromHandle<AcquisitionsContainer>(h_input);
		recon.process(input);
		boost::shared_ptr<ImagesContainer> sptr_img = recon.get_output();
		return sptrObjectHandle<ImagesContainer>(sptr_img);
	}
	CATCH;

}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:15,代码来源:cgadgetron.cpp

示例9: cGT_processAcquisitions

void*
cGT_processAcquisitions(void* ptr_proc, void* ptr_input)
{
	try {
		CAST_PTR(DataHandle, h_proc, ptr_proc);
		CAST_PTR(DataHandle, h_input, ptr_input);
		AcquisitionsProcessor& proc =
			objectFromHandle<AcquisitionsProcessor>(h_proc);
		AcquisitionsContainer& input =
			objectFromHandle<AcquisitionsContainer>(h_input);
		proc.process(input);
		boost::shared_ptr<AcquisitionsContainer> sptr_ac = proc.get_output();
		return sptrObjectHandle<AcquisitionsContainer>(sptr_ac);
	}
	CATCH;
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:16,代码来源:cgadgetron.cpp

示例10: cGT_sendParameters

void*
cGT_sendParameters(void* ptr_con, const void* ptr_par)
{
	try {
		CAST_PTR(DataHandle, h_con, ptr_con);
		CAST_PTR(DataHandle, h_par, ptr_par);
		GTConnector& conn = objectFromHandle<GTConnector>(h_con);
		GadgetronClientConnector& con = conn();
		std::string& par = objectFromHandle<std::string>(h_par);
		//std::cout << par << std::endl;
		con.send_gadgetron_parameters(par);
	}
	CATCH;

	return (void*)new DataHandle;
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:16,代码来源:cgadgetron.cpp

示例11: signal

/**
 * Send signal to QMGR.  The input includes signal number and
 * signal data.  The signal data is normally a copy of a received
 * signal so it contains expected arbitrator node id and ticket.
 * The sender in signal data is the QMGR node id.
 */
void
ArbitMgr::sendSignalToQmgr(ArbitSignal& aSignal)
{
  NdbApiSignal signal(numberToRef(API_CLUSTERMGR, theFacade.ownId()));

  signal.theVerId_signalNumber = aSignal.gsn;
  signal.theReceiversBlockNumber = QMGR;
  signal.theTrace  = 0;
  signal.theLength = ArbitSignalData::SignalLength;

  ArbitSignalData* sd = CAST_PTR(ArbitSignalData, signal.getDataPtrSend());

  sd->sender = numberToRef(API_CLUSTERMGR, theFacade.ownId());
  sd->code = aSignal.data.code;
  sd->node = aSignal.data.node;
  sd->ticket = aSignal.data.ticket;
  sd->mask = aSignal.data.mask;

#ifdef DEBUG_ARBIT
  char buf[17] = "";
  ndbout << "arbit send: ";
  ndbout << " gsn=" << aSignal.gsn;
  ndbout << " recv=" << aSignal.data.sender;
  ndbout << " code=" << aSignal.data.code;
  ndbout << " node=" << aSignal.data.node;
  ndbout << " ticket=" << aSignal.data.ticket.getText(buf, sizeof(buf));
  ndbout << " mask=" << aSignal.data.mask.getText(buf, sizeof(buf));
  ndbout << endl;
#endif

  theFacade.lock_mutex();
  theFacade.sendSignalUnCond(&signal, aSignal.data.sender);
  theFacade.unlock_mutex();
}
开发者ID:0x00xw,项目名称:mysql-2,代码行数:40,代码来源:ClusterMgr.cpp

示例12: deleteObject

	void deleteObject(void* ptr)
	{
		if (!ptr)
			return;
		CAST_PTR(anObjectHandle, ptr_obj, ptr);
		delete ptr_obj;
	}
开发者ID:evgueni-ovtchinnikov,项目名称:iUtilities,代码行数:7,代码来源:data_handle.cpp

示例13: CAST_PTR

void g1_net_window_class::receive_event(i4_event * ev)
{
    if (ev->type()==i4_event::OBJECT_MESSAGE)
    {
        CAST_PTR(oev, i4_object_message_event_class, ev);
        if (oev->object==this)
        {
            if (oev->sub_type==(w32)poll_id)
            {
                poll();

                i4_object_message_event_class poll(this, poll_id);
                poll_event_id=i4_time_dev.request_event(this, &poll, poll_delay);
            }
            else
            {
                object_message(oev->sub_type);
            }
        }
        else
        {
            object_message(-1);
            i4_parent_window_class::receive_event(ev);
        }
    }
    else
    {
        i4_parent_window_class::receive_event(ev);
    }
}
开发者ID:pgrawehr,项目名称:golgotha,代码行数:30,代码来源:net__startup.cpp

示例14: cGT_setImageToRealConversion

void
cGT_setImageToRealConversion(void* ptr_imgs, int type)
{
	CAST_PTR(DataHandle, h_imgs, ptr_imgs);
	ImagesContainer& images = objectFromHandle<ImagesContainer>(h_imgs);
	images.set_image_to_real_conversion(type);
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:7,代码来源:cgadgetron.cpp

示例15: cGT_imageWrapFromContainer

void*
cGT_imageWrapFromContainer(void* ptr_imgs, unsigned int img_num)
{
	CAST_PTR(DataHandle, h_imgs, ptr_imgs);
	ImagesContainer& images = objectFromHandle<ImagesContainer>(h_imgs);
	return sptrObjectHandle<ImageWrap>(images.sptr_image_wrap(img_num));
}
开发者ID:CCPPETMR,项目名称:xGadgetron,代码行数:7,代码来源:cgadgetron.cpp


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