您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DohCheck函数代码示例

51自学网 2021-06-01 20:29:21
  C++
这篇教程C++ DohCheck函数代码示例写得很实用,希望能帮到您。

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

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

示例1: fputs

DOH *DohCopy(const DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (!obj)    return 0;  if (!DohCheck(b)) {#if SWIG_DEBUG_DELETE    fputs("DOH: Fatal error. Attempt to copy a non-doh object./n", stderr);    abort();#else    assert(0);#endif    return 0;  }  objinfo = b->type;  if (objinfo->doh_copy) {    DohBase *bc = (DohBase *) (objinfo->doh_copy) (b);    if ((bc) && b->meta) {      bc->meta = Copy(b->meta);    }    return (DOH *) bc;  }  return 0;}
开发者ID:0xb1dd1e,项目名称:swig,代码行数:25,


示例2: DohObjMalloc

DOHString *DohNewStringWithSize(const DOH *so, int len) {  int l = 0, max;  String *str;  char *s;  if (DohCheck(so)) {    s = (char *) String_data((String *) so);  } else {    s = (char *) so;  }  str = (String *) DohMalloc(sizeof(String));  str->hashkey = -1;  str->sp = 0;  str->line = 1;  str->file = 0;  max = INIT_MAXSIZE;  if (s) {    l = (int) len;    if ((l + 1) > max)      max = l + 1;  }  str->str = (char *) DohMalloc(max);  str->maxsize = max;  if (s) {    strncpy(str->str, s, len);    str->len = l;    str->sp = l;  } else {    str->str[0] = 0;    str->len = 0;  }  return DohObjMalloc(&DohStringType, str);}
开发者ID:sunaku,项目名称:swig-ruby-ffi,代码行数:33,


示例3: DohNewString

DOHString *DohNewString(const DOH *so){    int l = 0, max;    String *str;    char *s;    if (DohCheck(so)) s = Char(so);    else s = (char *) so;    str = (String *) DohMalloc(sizeof(String));    str->hashkey = -1;    str->sp = 0;    str->line = 1;    str->file = 0;    max = INIT_MAXSIZE;    if (s) {      l = (int) strlen(s);      if ((l+1) > max) max = l+1;    }    str->str = (char *) DohMalloc(max);    str->maxsize = max;    if (s) {	strcpy(str->str,s);	str->len = l;	str->sp = l;    } else {	str->str[0] = 0;	str->len = 0;    }    return DohObjMalloc(&DohStringType,str);}
开发者ID:kanbang,项目名称:Colt,代码行数:30,


示例4: List_insert

static int List_insert(DOH *lo, int pos, DOH *item) {  List *l = (List *) ObjData(lo);  int i;  if (!item)    return -1;  if (!DohCheck(item)) {    item = NewString(item);    Decref(item);  }  if (pos == DOH_END)    pos = l->nitems;  if (pos < 0)    pos = 0;  if (pos > l->nitems)    pos = l->nitems;  if (l->nitems == l->maxitems)    more(l);  for (i = l->nitems; i > pos; i--) {    l->items[i] = l->items[i - 1];  }  l->items[pos] = item;  Incref(item);  l->nitems++;  return 0;}
开发者ID:GSGroup,项目名称:swig-v8,代码行数:26,


示例5: DohSetmeta

intDohSetmeta(DOH *ho, const DOH *name, const DOH *value) {  DohBase *h = (DohBase *) ho;  if (!DohCheck(ho)) return 0;  if (!h->meta) h->meta = NewHash();  return DohSetattr(h->meta, name, value);}
开发者ID:janearc,项目名称:posixnap_old,代码行数:7,


示例6: DohDelmeta

intDohDelmeta(DOH *ho, const DOH *name) {  DohBase *h = (DohBase *) ho;  if (!DohCheck(ho)) return 0;  if (!h->meta) return 0;  return DohDelattr(h->meta, name);}
开发者ID:janearc,项目名称:posixnap_old,代码行数:7,


示例7: DohDelete

void DohDelete(DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (!obj)    return;  if (!DohCheck(b)) {#if SWIG_DEBUG_DELETE    fputs("DOH: Fatal error. Attempt to delete a non-doh object./n", stderr);    abort();#else    assert(0);#endif    return;  }  if (b->flag_intern)    return;  assert(b->refcount > 0);  b->refcount--;  if (b->refcount <= 0) {    objinfo = b->type;    if (objinfo->doh_del) {      (objinfo->doh_del) (b);    } else {      if (b->data)	DohFree(b->data);    }    DohObjFree(b);  }}
开发者ID:0xb1dd1e,项目名称:swig,代码行数:30,


示例8: DohIsString

intDohIsString(const DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (!DohCheck(b)) return 0;  objinfo = b->type;  if (objinfo->doh_string) return 1;  else return 0;}
开发者ID:LorenzMeier,项目名称:swig-wx,代码行数:9,


示例9: DohIsSequence

intDohIsSequence(const DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (!DohCheck(b)) return 0;  objinfo = b->type;  if (objinfo->doh_list) return 1;  else return 0;}
开发者ID:LorenzMeier,项目名称:swig-wx,代码行数:9,


示例10: DohCmp

intDohCmp(const DOH *obj1, const DOH *obj2) {  DohBase *b1, *b2;  DohObjInfo *b1info, *b2info;  b1 = (DohBase *) obj1;  b2 = (DohBase *) obj2;  if ((!DohCheck(b1)) || (!DohCheck(b2))) {    if ((b1 == 0) && (b2 == 0)) return 0;    if (b1 && !b2) return 1;    if (!b1 &&  b2) return -1;    return strcmp((char *) DohData(b1),(char *) DohData(b2));  }  b1info = b1->type;  b2info = b2->type;  if ((b1info == b2info) && (b1info->doh_cmp))     return (b1info->doh_cmp)(b1,b2);  return 1;}
开发者ID:janearc,项目名称:posixnap_old,代码行数:18,


示例11: DohSeek

int DohSeek(DOH *obj, long offset, int whence) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(obj)) {    objinfo = b->type;    if ((objinfo->doh_file) && (objinfo->doh_file->doh_seek)) {      return (objinfo->doh_file->doh_seek) (b, offset, whence);    }    return -1;  }  return fseek((FILE *) b, offset, whence);}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:12,


示例12: DohTell

long DohTell(DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(obj)) {    objinfo = b->type;    if ((objinfo->doh_file) && (objinfo->doh_file->doh_tell)) {      return (objinfo->doh_file->doh_tell) (b);    }    return -1;  }  return ftell((FILE *) b);}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:12,


示例13: DohUngetc

int DohUngetc(int ch, DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(obj)) {    objinfo = b->type;    if (objinfo->doh_file->doh_ungetc) {      return (objinfo->doh_file->doh_ungetc) (b, ch);    }    return EOF;  }  return ungetc(ch, (FILE *) b);}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:12,


示例14: DohClose

int DohClose(DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(obj)) {    objinfo = b->type;    if (objinfo->doh_file->doh_close) {      return (objinfo->doh_file->doh_close) (b);    }    return 0;  }  return fclose((FILE *) obj);}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:12,


示例15: DohHashval

intDohHashval(const DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(b)) {    objinfo = b->type;    if (objinfo->doh_hashval) {      return (objinfo->doh_hashval)(b);    }  }  return 0;}
开发者ID:janearc,项目名称:posixnap_old,代码行数:12,


示例16: return

void *DohData(const DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(obj)) {    objinfo = b->type;    if (objinfo->doh_data) {      return (objinfo->doh_data) (b);    }    return 0;  }  return (void *) obj;}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:12,


示例17: String_setfile

static void String_setfile(DOH *so, DOH *file) {  DOH *fo;  String *str = (String *) ObjData(so);  if (!DohCheck(file)) {    fo = NewString(file);    Decref(fo);  } else    fo = file;  Incref(fo);  Delete(str->file);  str->file = fo;}
开发者ID:GSGroup,项目名称:swig-v8,代码行数:13,


示例18: DohWrite

int DohWrite(DOH *obj, void *buffer, int length) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(obj)) {    objinfo = b->type;    if ((objinfo->doh_file) && (objinfo->doh_file->doh_write)) {      return (objinfo->doh_file->doh_write) (b, buffer, length);    }    return -1;  }  /* Hmmm.  Not a file.  Maybe it's a real FILE */  return fwrite(buffer, 1, length, (FILE *) b);}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:13,


示例19: List_setfile

static void List_setfile(DOH *lo, DOH *file) {  DOH *fo;  List *l = (List *) ObjData(lo);  if (!DohCheck(file)) {    fo = NewString(file);    Decref(fo);  } else    fo = file;  Incref(fo);  Delete(l->file);  l->file = fo;}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:13,


示例20: String_insert

static int String_insert(DOH *so, int pos, DOH *str) {  String *s;  char *nstr;  int len;  char *data;  if (pos == DOH_END) {    DohString_append(so, str);    return 0;  }  s = (String *) ObjData(so);  s->hashkey = -1;  if (DohCheck(str)) {    String *ss = (String *) ObjData(str);    data = (char *) String_data(str);    len = ss->len;  } else {    data = (char *) (str);    len = (int) strlen(data);  }  nstr = s->str;  if (pos < 0)    pos = 0;  else if (pos > s->len)    pos = s->len;  /* See if there is room to insert the new data */  while (s->maxsize <= s->len + len) {    int newsize = 2 * s->maxsize;    s->str = (char *) DohRealloc(s->str, newsize);    assert(s->str);    s->maxsize = newsize;  }  memmove(s->str + pos + len, s->str + pos, (s->len - pos));  memcpy(s->str + pos, data, len);  if (s->sp >= pos) {    int i;    for (i = 0; i < len; i++) {      if (data[i] == '/n')	s->line++;    }    s->sp += len;  }  s->len += len;  s->str[s->len] = 0;  return 0;}
开发者ID:charlie5,项目名称:swig4ada,代码行数:51,


示例21: DohEqual

intDohEqual(const DOH *obj1, const DOH *obj2) {  DohBase *b1 = (DohBase *) obj1;  DohBase *b2 = (DohBase *) obj2;  if (!b1) {    return !b2;  } else if (!b2) {    return 0;  } else {    DohObjInfo *b1info = 0;    DohObjInfo *b2info = 0;    if (DohCheck(b1)) {      b1info = b1->type;      if (DohCheck(b2)) {	b2info = b2->type;      } else {	int len = (b1info->doh_len)(b1);	char *cobj = (char *) obj2;	return len == (int)strlen(cobj) ? (memcmp(RawData(b1), cobj, len) == 0) : 0;      }    } else if (DohCheck(b2)) {      int len = (b2->type->doh_len)(b2);      char *cobj = (char *) obj1;      return len == (int)strlen(cobj) ? (memcmp(RawData(b2), cobj, len) == 0) : 0;    } else {      return strcmp((char*) obj1, (char*) obj2) == 0;    }        if (!b1info) {      return obj1 == obj2;    } else if ((b1info == b2info)) {      return b1info->doh_equal ? (b1info->doh_equal)(b1,b2) : 	(b1info->doh_cmp ? (b1info->doh_cmp)(b1,b2) == 0 : (b1 == b2));    } else {      return 0;    }  }}
开发者ID:LorenzMeier,项目名称:swig-wx,代码行数:38,


示例22: DohCmp

intDohCmp(const DOH *obj1, const DOH *obj2) {  DohBase *b1, *b2;  DohObjInfo *b1info, *b2info;  int c1, c2;  b1 = (DohBase *) obj1;  b2 = (DohBase *) obj2;  c1 = DohCheck(b1);  c2 = DohCheck(b2);  /* most of the times, obj2 is a plain c string */    if (!c1 || !c2) {    if ((b1 == 0) && (b2 == 0)) return 0;    if (b1 && !b2) return 1;    if (!b1 &&  b2) return -1;    return strcmp((char *) (c1 ? RawData(b1) : (void*) obj1),		  (char *) (c2 ? RawData(b2) : (void*) obj2));  }  b1info = b1->type;  b2info = b2->type;  if ((b1info == b2info) && (b1info->doh_cmp))     return (b1info->doh_cmp)(b1,b2);  return 1;}
开发者ID:LorenzMeier,项目名称:swig-wx,代码行数:23,


示例23: NewString

DOH *DohStr(const DOH *obj) {  char buffer[512];  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (DohCheck(b)) {    objinfo = b->type;    if (objinfo->doh_str) {      return (objinfo->doh_str) (b);    }    sprintf(buffer, "<Object '%s' at %p>", objinfo->objname, (void *) b);    return NewString(buffer);  } else {    return NewString(obj);  }}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:15,


示例24: List_set

static int List_set(DOH *lo, int n, DOH *val) {  List *l = (List *) ObjData(lo);  if (!val)    return -1;  assert(!((n < 0) || (n >= l->nitems)));  if (!DohCheck(val)) {    val = NewString(val);    Decref(val);  }  Delete(l->items[n]);  l->items[n] = val;  Incref(val);  Delete(val);  return 0;}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:15,


示例25: DohLen

/* ----------------------------------------------------------------------------- * DohLen() - Defaults to strlen() if not a DOH object * ----------------------------------------------------------------------------- */int DohLen(const DOH *obj) {  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (!b)    return 0;  if (DohCheck(b)) {    objinfo = b->type;    if (objinfo->doh_len) {      return (objinfo->doh_len) (b);    }    return 0;  } else {    return strlen((char *) obj);  }}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:18,


示例26: DohFirst

DohIteratorDohFirst(DOH *obj) {  DohIterator iter;  DohBase     *b;  DohObjInfo  *binfo;  b = (DohBase *) obj;  if (DohCheck(b)) {    binfo = b->type;    if (binfo->doh_first) {      return (binfo->doh_first)(b);    }  }  iter.object  = 0;  iter.item    = 0;  iter.key     = 0;  return iter;}
开发者ID:janearc,项目名称:posixnap_old,代码行数:18,


示例27: DohGetc

int DohGetc(DOH *obj) {  static DOH *lastdoh = 0;  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (obj == lastdoh) {    objinfo = b->type;    return (objinfo->doh_file->doh_getc) (b);  }  if (DohCheck(obj)) {    objinfo = b->type;    if (objinfo->doh_file->doh_getc) {      lastdoh = obj;      return (objinfo->doh_file->doh_getc) (b);    }    return EOF;  }  return fgetc((FILE *) b);}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:18,


示例28: DohPutc

int DohPutc(int ch, DOH *obj) {  static DOH *lastdoh = 0;  DohBase *b = (DohBase *) obj;  DohObjInfo *objinfo;  if (obj == lastdoh) {    objinfo = b->type;    return (objinfo->doh_file->doh_putc) (b, ch);  }  if (DohCheck(obj)) {    objinfo = b->type;    if (objinfo->doh_file->doh_putc) {      lastdoh = obj;      return (objinfo->doh_file->doh_putc) (b, ch);    }    return EOF;  }  return fputc(ch, (FILE *) b);}
开发者ID:abhishekgahlot,项目名称:Python-Fingerprint-Attendance-System,代码行数:19,


示例29: DohString_append

static void DohString_append(DOH *so, const DOHString_or_char *str) {  int oldlen, newlen, newmaxsize, l, sp;  char *tc;  String *s = (String *) ObjData(so);  char *newstr = 0;  if (DohCheck(str)) {    String *ss = (String *) ObjData(str);    newstr = (char *) String_data((DOH *) str);    l = ss->len;  } else {    newstr = (char *) (str);    l = (int) strlen(newstr);  }  if (!newstr)    return;  s->hashkey = -1;  oldlen = s->len;  newlen = oldlen + l + 1;  if (newlen >= s->maxsize - 1) {    newmaxsize = 2 * s->maxsize;    if (newlen >= newmaxsize - 1)      newmaxsize = newlen + 1;    s->str = (char *) DohRealloc(s->str, newmaxsize);    assert(s->str);    s->maxsize = newmaxsize;  }  tc = s->str;  memcpy(tc + oldlen, newstr, l + 1);  sp = s->sp;  if (sp >= oldlen) {    int i = oldlen + l - sp;    tc += sp;    for (; i; --i) {      if (*(tc++) == '/n')	s->line++;    }    s->sp = oldlen + l;  }  s->len += l;}
开发者ID:GSGroup,项目名称:swig-v8,代码行数:42,


示例30: DohObjMalloc

DOHString *DohNewString(const DOHString_or_char *so) {  int l = 0, max;  String *str;  char *s;  int hashkey = -1;  if (DohCheck(so)) {    str = (String *) ObjData(so);    s = (char *) String_data((String *) so);    l = s ? str->len : 0;    hashkey = str->hashkey;  } else {    s = (char *) so;    l = s ? (int) strlen(s) : 0;  }  str = (String *) DohMalloc(sizeof(String));  str->hashkey = hashkey;  str->sp = 0;  str->line = 1;  str->file = 0;  max = INIT_MAXSIZE;  if (s) {    if ((l + 1) > max)      max = l + 1;  }  str->str = (char *) DohMalloc(max);  str->maxsize = max;  if (s) {    strcpy(str->str, s);    str->len = l;    str->sp = l;  } else {    str->str[0] = 0;    str->len = 0;  }  return DohObjMalloc(&DohStringType, str);}
开发者ID:GSGroup,项目名称:swig-v8,代码行数:37,



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


C++ Domain函数代码示例
C++ DockControlBar函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。