DATA_PTR 示例代码

2022-03-03

以下示例是关于cpp中包含DATA_PTR用法的示例代码,想了解DATA_PTR的具体用法?DATA_PTR怎么用?DATA_PTR使用的例子?那么可以参考以下10个相关示例代码来学习它的具体使用方法。

示例1:
mvtkVolumeToVolumeFilter.cpp开发语言: C++项目名称: mvtk代码行数: 235
90						case 0:
91							CompareVoxel[i] = (data_ptr[tmp] == data_ptr[tmp-zinc-yinc-1]);
92							break;
93						case 1:
94							CompareVoxel[i] = (data_ptr[tmp] == data_ptr[tmp-zinc-yinc]);
95							break;
96						case 2:
97							CompareVoxel[i] = (data_ptr[tmp] == data_ptr[tmp-zinc-yinc+1]);
98							break;
99						case 3:
100							CompareVoxel[i] = (data_ptr[tmp] == data_ptr[tmp-zinc-1]);
101							break;
168						case 26:
169							CompareVoxel[i] = (data_ptr[tmp] == data_ptr[tmp+zinc+yinc+1]);
170							break;
示例2:
Image.cpp开发语言: C++项目名称: tgg代码行数: 1067
181  const GLubyte *colormap = NULL;
182  const GLubyte *data_ptr;
183
186      _name = ibuff.filename ();
187      data_ptr = ibuff.data ();
188      _standardCoordSystem = true;
190      // Read TGA header
191      _header = reinterpret_cast<const TGA_Header *>(data_ptr);
192      data_ptr += sizeof (TGA_Header) + _header->id_lenght;
203	  // NOTE: color map is stored in BGR
204	  colormap = data_ptr;
205	  data_ptr += _header->cm_length * (_header->cm_size >> 3);
216	  // Uncompressed 8 bits color index
217	  readTGA8bits (data_ptr, colormap);
218	  break;
示例3:
llp.cpp开发语言: C++项目名称: hw5代码行数: 360
82   */
83  Double_node *data_ptr = new Double_node; 
84  data_ptr->doc = new_doc;
85  if (size == 0) {
86    head           = data_ptr;
87    tail           = data_ptr;
88    data_ptr->prev = NULL;
89    data_ptr->next = NULL;
94  } else if (size > 0) {
95    data_ptr->prev  = tail;
96    tail->next      = data_ptr;
97    data_ptr->next  = NULL;
98    tail            = data_ptr;
示例4:
label.cpp开发语言: C++项目名称: myNana代码行数: 912
318							_m_change_font(graph, u->fblock_ptr);
319							u->data_ptr->measure(graph);
320						}
371					{
372						data * data_ptr = i->data_ptr;
373						nana::size sz = data_ptr->size();
386
387							if((false == data_ptr->is_text()) && (sz.height < max_ascent + max_descent))
388								sz.height = max_ascent + max_descent;
543					case fblock::aligns::baseline:
544						return static_cast<int>(px.baseline - (data_ptr->is_text() ? data_ptr->ascent() : data_ptr->size().height));
545					default:	break;
574							fblock * fblock_ptr = u->fblock_ptr;
575							data * data_ptr = u->data_ptr;
576							
示例5:
label.cpp开发语言: C++项目名称: myNana代码行数: 873
295							_m_change_font(graph, value.fblock_ptr);
296							value.data_ptr->measure(graph);
297						}
348					{
349						data * data_ptr = i->data_ptr;
350						nana::size sz = data_ptr->size();
363
364							if((false == data_ptr->is_text()) && (sz.height < max_ascent + max_descent))
365								sz.height = max_ascent + max_descent;
515					case fblock::aligns::baseline:
516						return static_cast<int>(px.baseline - (data_ptr->is_text() ? data_ptr->ascent() : data_ptr->size().height));
517					default:	break;
546							fblock * fblock_ptr = i->fblock_ptr;
547							data * data_ptr = i->data_ptr;
548
示例6:
avrreadelf.cpp开发语言: C++项目名称: simulavr代码行数: 451
229            const char *data = psec->get_data();
230            const char *data_ptr = data, *data_end = data + filesize;
231
232            while(data_ptr < data_end) {
233                char tag = *data_ptr;
234                char length = *(data_ptr + 1);
235                // Length check already done in ELFGetDeviceNameAndSignature().
242                    core->SetClockFreq((SystemClockOffset)1000000000 /
243                                       ((siminfo_long_t *)data_ptr)->value);
244                    break;
246                    avr_message("Connecting file %s as serial in to pin %s at %d baud.",
247                                ((siminfo_serial_t *)data_ptr)->filename,
248                                ((siminfo_serial_t *)data_ptr)->pin,
示例7:
memory.cc开发语言: C++项目名称: os代码行数: 368
40{
41  Bit8u *data_ptr;
42  bx_phy_address a20addr = A20ADDR(addr);
117#ifdef BX_LITTLE_ENDIAN
118    data_ptr = (Bit8u *) data;
119#else // BX_BIG_ENDIAN
120    data_ptr = (Bit8u *) data + (len - 1);
121#endif
126      while(1) {
127        *(BX_MEM_THIS get_vector(a20addr)) = *data_ptr;
128        if (len == 1) return;
131#ifdef BX_LITTLE_ENDIAN
132        data_ptr++;
133#else // BX_BIG_ENDIAN
示例8:
image.cpp开发语言: C++项目名称: godot代码行数: 2154
1956
1957				dst_data_ptr[width * (desti.y + i) + desti.x + j] = src_data_ptr[p_src.width * (srci.y+i) + srci.x+j];
1958			}
2018
2019			data_ptr[(i<<2)+0]=srgb2lin[ data_ptr[(i<<2)+0] ];
2020			data_ptr[(i<<2)+1]=srgb2lin[ data_ptr[(i<<2)+1] ];
2021			data_ptr[(i<<2)+2]=srgb2lin[ data_ptr[(i<<2)+2] ];
2022		}
2031
2032			data_ptr[(i*3)+0]=srgb2lin[ data_ptr[(i*3)+0] ];
2033			data_ptr[(i*3)+1]=srgb2lin[ data_ptr[(i*3)+1] ];
2034			data_ptr[(i*3)+2]=srgb2lin[ data_ptr[(i*3)+2] ];
2035		}
示例9:
m_config.cc开发语言: C++项目名称: eureka-editor-mod代码行数: 1386
97
98	void *data_ptr;   // Pointer to the data
99}
552			{
553				*((bool *) (opt->data_ptr)) = false;
554			}
556			{
557				*((bool *) (opt->data_ptr)) = true;
558			}
561		case OPT_CONFIRM:
562			*((confirm_t *) opt->data_ptr) = confirm_e2i (value);
563			break;
565		case OPT_INTEGER:
566			*((int *) opt->data_ptr) = atoi(value);
567			break;
示例10:
rbzmq.cpp开发语言: C++项目名称: zeromq2代码行数: 287
42{
43    assert (!DATA_PTR (self_));
44    void *ctx = zmq_init (NUM2INT (app_threads_), NUM2INT (io_threads_),
50
51    DATA_PTR (self_) = (void*) ctx;
52    return self_;
69{
70    assert (!DATA_PTR (self_));
71
76
77    void *s = zmq_socket (DATA_PTR (context_), NUM2INT (type_));
78    if (!s) {
82
83    DATA_PTR (self_) = (void*) s;
84    return self_;

本文地址:https://www.itbaoku.cn/snippets/415936.html