这篇教程C++ type_name函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中type_name函数的典型用法代码示例。如果您正苦于以下问题:C++ type_name函数的具体用法?C++ type_name怎么用?C++ type_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了type_name函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: type_namestd::ostream& operator<<(std::ostream& o, type_id t) { return o << type_name(t); }
开发者ID:andrew-buckley,项目名称:qpid-proton,代码行数:1,
示例2: make_coercion_errorconversion_error make_coercion_error(const char* cpp, type_id amqp) { return conversion_error(std::string("invalid proton::coerce<") + cpp + ">(" + type_name(amqp) + ")");}
开发者ID:clebertsuconic,项目名称:qpid-proton,代码行数:3,
示例3: face_node_range /// Node indices for each face IndicesT face_nodes; /// Iterator range over the nodes of the given face RangeT face_node_range(const Uint face) const { if(face_first_nodes.empty()) return boost::make_iterator_range(face_nodes.begin(), face_nodes.end()); IndicesT::const_iterator begin = face_nodes.begin() + face_first_nodes[face]; return boost::make_iterator_range(begin, begin + face_node_counts[face]); } }; /// Default constructor without arguments ElementType( const std::string& name = type_name() ); /// Default destructor virtual ~ElementType(); static std::string type_name() { return "ElementType"; } /// @return m_nameShape std::string shape_name() const { return Mesh::GeoShape::Convert::instance().to_str( m_shape ); } /// @return m_geoShape GeoShape::Type shape() const { return m_shape; } /// @return number of faces Uint nb_faces() const { return m_nb_faces; }
开发者ID:Ivor23,项目名称:coolfluid3,代码行数:29,
示例4: ares_expand_namestatic const unsigned char *display_rr(const unsigned char *aptr, const unsigned char *abuf, int alen, dns_resp_t *response){ const unsigned char *p; char *name; int type, dnsclass, ttl, dlen, status; long len; struct in_addr addr; /* Parse the RR name. */ status = ares_expand_name(aptr, abuf, alen, &name, &len); if (status != ARES_SUCCESS) return NULL; aptr += len; /* Make sure there is enough data after the RR name for the fixed * part of the RR. */ if (aptr + RRFIXEDSZ > abuf + alen) { xfree(name); return NULL; } /* Parse the fixed part of the RR, and advance to the RR data field. */ type = DNS_RR_TYPE(aptr); dnsclass = DNS_RR_CLASS(aptr); ttl = DNS_RR_TTL(aptr); dlen = DNS_RR_LEN(aptr); aptr += RRFIXEDSZ; if (aptr + dlen > abuf + alen) { xfree(name); return NULL; } /* Display the RR name, class, and type. */ sprintf(msg, "/t%-15s./t%d", name, ttl); addtobuffer(response->msgbuf, msg); if (dnsclass != C_IN) { sprintf(msg, "/t%s", class_name(dnsclass)); addtobuffer(response->msgbuf, msg); } sprintf(msg, "/t%s", type_name(type)); addtobuffer(response->msgbuf, msg); xfree(name); /* Display the RR data. Don't touch aptr. */ switch (type) { case T_CNAME: case T_MB: case T_MD: case T_MF: case T_MG: case T_MR: case T_NS: case T_PTR: /* For these types, the RR data is just a domain name. */ status = ares_expand_name(aptr, abuf, alen, &name, &len); if (status != ARES_SUCCESS) return NULL; sprintf(msg, "/t%s.", name); addtobuffer(response->msgbuf, msg); xfree(name); break; case T_HINFO: /* The RR data is two length-counted character strings. */ p = aptr; len = *p; if (p + len + 1 > aptr + dlen) return NULL; sprintf(msg, "/t%.*s", (int) len, p + 1); addtobuffer(response->msgbuf, msg); p += len + 1; len = *p; if (p + len + 1 > aptr + dlen) return NULL; sprintf(msg, "/t%.*s", (int) len, p + 1); addtobuffer(response->msgbuf, msg); break; case T_MINFO: /* The RR data is two domain names. */ p = aptr; status = ares_expand_name(p, abuf, alen, &name, &len); if (status != ARES_SUCCESS) return NULL; sprintf(msg, "/t%s.", name); addtobuffer(response->msgbuf, msg); xfree(name); p += len; status = ares_expand_name(p, abuf, alen, &name, &len); if (status != ARES_SUCCESS) return NULL; sprintf(msg, "/t%s.", name); addtobuffer(response->msgbuf, msg); xfree(name); break; case T_MX: /* The RR data is two bytes giving a preference ordering, and then a domain name. */ if (dlen < 2) return NULL; sprintf(msg, "/t%d", (aptr[0] << 8) | aptr[1]); addtobuffer(response->msgbuf, msg); status = ares_expand_name(aptr + 2, abuf, alen, &name, &len); if (status != ARES_SUCCESS) return NULL;//.........这里部分代码省略.........
开发者ID:tjyang,项目名称:abmon,代码行数:101,
示例5: R_ASSERT2void game_sv_GameState::Create (shared_str &options){ string_path fn_game; m_item_respawner.clear_respawns(); if (FS.exist(fn_game, "$level$", "level.game")) { IReader *F = FS.r_open (fn_game); IReader *O = 0; // Load RPoints if (0!=(O = F->open_chunk (RPOINT_CHUNK))) { for (int id=0; O->find_chunk(id); ++id) { RPoint R; u8 team; u8 type; u16 GameType; shared_str rp_profile; O->r_fvector3 (R.P); O->r_fvector3 (R.A); team = O->r_u8 (); type = O->r_u8 (); GameType = O->r_u16 (); if(type==rptItemSpawn) O->r_stringZ (rp_profile); if (GameType != EGameIDs(u16(-1))) { if ((Type() == eGameIDCaptureTheArtefact) && (GameType & eGameIDCaptureTheArtefact)) { team = team - 1; R_ASSERT2( ((team >= 0) && (team < 4)) || (type != rptActorSpawn), "Problem with CTA Team indexes. Propably you have added rpoint of team 0 for cta game type."); } if ((!(GameType & eGameIDDeathmatch) && (Type() == eGameIDDeathmatch)) || (!(GameType & eGameIDTeamDeathmatch) && (Type() == eGameIDTeamDeathmatch)) || (!(GameType & eGameIDArtefactHunt) && (Type() == eGameIDArtefactHunt)) || (!(GameType & eGameIDCaptureTheArtefact) && (Type() == eGameIDCaptureTheArtefact)) ) { continue; }; }; switch (type) { case rptActorSpawn: { rpoints[team].push_back (R); for (int i=0; i<int(rpoints[team].size())-1; i++) { RPoint rp = rpoints[team][i]; float dist = R.P.distance_to_xz(rp.P)/2; if (dist<rpoints_MinDist[team]) rpoints_MinDist[team] = dist; dist = R.P.distance_to(rp.P)/2; if (dist<rpoints_Dist[team]) rpoints_Dist[team] = dist; }; }break; case rptItemSpawn: { m_item_respawner.add_new_rpoint(rp_profile, R); } }; }; O->close(); } FS.r_close (F); } if (!g_dedicated_server) { // loading scripts ai().script_engine().remove_script_process(ScriptEngine::eScriptProcessorGame); string_path S; FS.update_path (S,"$game_config$","script.ltx"); CInifile *l_tpIniFile = xr_new<CInifile>(S); R_ASSERT (l_tpIniFile); if( l_tpIniFile->section_exist( type_name() ) ) if (l_tpIniFile->r_string(type_name(),"script")) ai().script_engine().add_script_process(ScriptEngine::eScriptProcessorGame,xr_new<CScriptProcess>("game",l_tpIniFile->r_string(type_name(),"script"))); else ai().script_engine().add_script_process(ScriptEngine::eScriptProcessorGame,xr_new<CScriptProcess>("game","")); xr_delete (l_tpIniFile); } //--------------------------------------------------------------------- ConsoleCommands_Create(); //---------------------------------------------------------------------// CCC_LoadCFG_custom* pTmp = xr_new<CCC_LoadCFG_custom>("sv_");// pTmp->Execute (Console->ConfigFile);// xr_delete (pTmp); //--------------------------------------------------------------------- LPCSTR svcfg_ltx_name = "-svcfg ";//.........这里部分代码省略.........
开发者ID:AntonioModer,项目名称:xray-16,代码行数:101,
示例6: do_object void do_object(int begin, int end) { type_name("jobject" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例7: debug/** * /brief Destroy the processing step */ProcessingStep::~ProcessingStep() { debug(LOG_DEBUG, DEBUG_LOG, 0, "destroying %s @ %p", type_name().c_str(), this); // ensure we are neither precursor nor successor of any other step remove_me();}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:9,
示例8: stringprintfstd::string InstrumentComponent::toString() { return stringprintf("%-16.16s %-8.8s %-32.32s %-2ld %s", type_name().c_str(), component_typename().c_str(), name().c_str(), unit(), servername().c_str());}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:5,
示例9: print_treevoidprint_tree (FILE *fp, struct predicate *node, int indent){ int i; if (node == NULL) return; for (i = 0; i < indent; i++) fprintf (fp, " "); fprintf (fp, "pred=["); print_predicate (fp, node); fprintf (fp, "] type=%s prec=%s", type_name (node->p_type), prec_name (node->p_prec)); fprintf (fp, " cost=%s rate=%#03.2g %sside effects ", cost_name (node->p_cost), node->est_success_rate, (node->side_effects ? "" : "no ")); if (node->need_stat || node->need_type || node->need_inum) { int comma = 0; fprintf (fp, "Needs "); if (node->need_stat) { fprintf (fp, "stat"); comma = 1; } if (node->need_inum) { fprintf (fp, "%sinode", comma ? "," : ""); comma = 1; } if (node->need_type) { fprintf (fp, "%stype", comma ? "," : ""); } } fprintf (fp, "/n"); for (i = 0; i < indent; i++) fprintf (fp, " "); if (NULL == node->pred_left && NULL == node->pred_right) { fprintf (fp, "no children./n"); } else { if (node->pred_left) { fprintf (fp, "left:/n"); print_tree (fp, node->pred_left, indent + 1); } else { fprintf (fp, "no left./n"); } for (i = 0; i < indent; i++) fprintf (fp, " "); if (node->pred_right) { fprintf (fp, "right:/n"); print_tree (fp, node->pred_right, indent + 1); } else { fprintf (fp, "no right./n"); } }}
开发者ID:LifeHunter,项目名称:findutils,代码行数:72,
示例10: printfvoid slug::dump() // print contents of a slug{ printf("# %d %-4.4s parm %d dv %d base %d s%d f%d H%d/n#/t/t%s/n", serialno(), type_name(), parm, dv, base, size, font, hpos, headstr());}
开发者ID:n-t-roff,项目名称:DWB3.3,代码行数:6,
示例11: unpack_arraystatic int unpack_array(scanner_t *s, json_t *root, va_list *ap){ size_t i = 0; int strict = 0; if(root && !json_is_array(root)) { set_error(s, "<validation>", "Expected array, got %s", type_name(root)); return -1; } next_token(s); while(s->token != ']') { json_t *value; if(strict != 0) { set_error(s, "<format>", "Expected ']' after '%c', got '%c'", (strict == 1 ? '!' : '*'), s->token); return -1; } if(!s->token) { set_error(s, "<format>", "Unexpected end of format string"); return -1; } if(s->token == '!' || s->token == '*') { strict = (s->token == '!' ? 1 : -1); next_token(s); continue; } if(!strchr(unpack_value_starters, s->token)) { set_error(s, "<format>", "Unexpected format character '%c'", s->token); return -1; } if(!root) { /* skipping */ value = NULL; } else { value = json_array_get(root, i); if(!value) { set_error(s, "<validation>", "Array index %lu out of range", (unsigned long)i); return -1; } } if(unpack(s, value, ap)) return -1; next_token(s); i++; } if(strict == 0 && (s->flags & JSON_STRICT)) strict = 1; if(root && strict == 1 && i != json_array_size(root)) { long diff = (long)json_array_size(root) - (long)i; set_error(s, "<validation>", "%li array item(s) left unpacked", diff); return -1; } return 0;}
开发者ID:mkawick,项目名称:Station04,代码行数:69,
示例12: unpack_objectstatic int unpack_object(scanner_t *s, json_t *root, va_list *ap){ int ret = -1; int strict = 0; /* Use a set (emulated by a hashtable) to check that all object keys are accessed. Checking that the correct number of keys were accessed is not enough, as the same key can be unpacked multiple times. */ hashtable_t key_set; if(hashtable_init(&key_set)) { set_error(s, "<internal>", "Out of memory"); return -1; } if(root && !json_is_object(root)) { set_error(s, "<validation>", "Expected object, got %s", type_name(root)); goto out; } next_token(s); while(s->token != '}') { const char *key; json_t *value; int opt = 0; if(strict != 0) { set_error(s, "<format>", "Expected '}' after '%c', got '%c'", (strict == 1 ? '!' : '*'), s->token); goto out; } if(!s->token) { set_error(s, "<format>", "Unexpected end of format string"); goto out; } if(s->token == '!' || s->token == '*') { strict = (s->token == '!' ? 1 : -1); next_token(s); continue; } if(s->token != 's') { set_error(s, "<format>", "Expected format 's', got '%c'", s->token); goto out; } key = va_arg(*ap, const char *); if(!key) { set_error(s, "<args>", "NULL object key"); goto out; } next_token(s); if(s->token == '?') { opt = 1; next_token(s); } if(!root) { /* skipping */ value = NULL; } else { value = json_object_get(root, key); if(!value && !opt) { set_error(s, "<validation>", "Object item not found: %s", key); goto out; } } if(unpack(s, value, ap)) goto out; hashtable_set(&key_set, key, 0, json_null()); next_token(s); } if(strict == 0 && (s->flags & JSON_STRICT)) strict = 1; if(root && strict == 1 && key_set.size != json_object_size(root)) { long diff = (long)json_object_size(root) - (long)key_set.size; set_error(s, "<validation>", "%li object item(s) left unpacked", diff); goto out; } ret = 0;out: hashtable_close(&key_set); return ret;}
开发者ID:mkawick,项目名称:Station04,代码行数:98,
示例13: fsck_tag_bufferstatic int fsck_tag_buffer(struct tag *tag, const char *data, unsigned long size, struct fsck_options *options){ struct object_id oid; int ret = 0; const char *buffer; char *to_free = NULL, *eol; struct strbuf sb = STRBUF_INIT; const char *p; if (data) buffer = data; else { enum object_type type; buffer = to_free = read_object_file(&tag->object.oid, &type, &size); if (!buffer) return report(options, &tag->object, FSCK_MSG_MISSING_TAG_OBJECT, "cannot read tag object"); if (type != OBJ_TAG) { ret = report(options, &tag->object, FSCK_MSG_TAG_OBJECT_NOT_TAG, "expected tag got %s", type_name(type)); goto done; } } ret = verify_headers(buffer, size, &tag->object, options); if (ret) goto done; if (!skip_prefix(buffer, "object ", &buffer)) { ret = report(options, &tag->object, FSCK_MSG_MISSING_OBJECT, "invalid format - expected 'object' line"); goto done; } if (parse_oid_hex(buffer, &oid, &p) || *p != '/n') { ret = report(options, &tag->object, FSCK_MSG_BAD_OBJECT_SHA1, "invalid 'object' line format - bad sha1"); if (ret) goto done; } buffer = p + 1; if (!skip_prefix(buffer, "type ", &buffer)) { ret = report(options, &tag->object, FSCK_MSG_MISSING_TYPE_ENTRY, "invalid format - expected 'type' line"); goto done; } eol = strchr(buffer, '/n'); if (!eol) { ret = report(options, &tag->object, FSCK_MSG_MISSING_TYPE, "invalid format - unexpected end after 'type' line"); goto done; } if (type_from_string_gently(buffer, eol - buffer, 1) < 0) ret = report(options, &tag->object, FSCK_MSG_BAD_TYPE, "invalid 'type' value"); if (ret) goto done; buffer = eol + 1; if (!skip_prefix(buffer, "tag ", &buffer)) { ret = report(options, &tag->object, FSCK_MSG_MISSING_TAG_ENTRY, "invalid format - expected 'tag' line"); goto done; } eol = strchr(buffer, '/n'); if (!eol) { ret = report(options, &tag->object, FSCK_MSG_MISSING_TAG, "invalid format - unexpected end after 'type' line"); goto done; } strbuf_addf(&sb, "refs/tags/%.*s", (int)(eol - buffer), buffer); if (check_refname_format(sb.buf, 0)) { ret = report(options, &tag->object, FSCK_MSG_BAD_TAG_NAME, "invalid 'tag' name: %.*s", (int)(eol - buffer), buffer); if (ret) goto done; } buffer = eol + 1; if (!skip_prefix(buffer, "tagger ", &buffer)) { /* early tags do not contain 'tagger' lines; warn only */ ret = report(options, &tag->object, FSCK_MSG_MISSING_TAGGER_ENTRY, "invalid format - expected 'tagger' line"); if (ret) goto done; } else ret = fsck_ident(&buffer, &tag->object, options);done: strbuf_release(&sb); free(to_free); return ret;}
开发者ID:PEPE-coin,项目名称:git,代码行数:94,
示例14: do_long void do_long() { type_name("jlong" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例15: do_bool void do_bool() { type_name("jboolean"); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例16: do_void void do_void() { type_name("void" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例17: do_char void do_char() { type_name("jchar" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例18: do_array void do_array (int begin, int end) { type_name("jobject" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例19: do_float void do_float() { type_name("jfloat" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例20: id const std::string& id() const { if (id_.empty()) return type_name(); else return id_; }
开发者ID:biddyweb,项目名称:wesnoth,代码行数:1,
示例21: do_double void do_double() { type_name("jdouble" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例22: ares_expand_namestatic const unsigned char *display_rr(const unsigned char *aptr, const unsigned char *abuf, int alen){ const unsigned char *p; int type, dnsclass, ttl, dlen, status; long len; char addr[46]; union { unsigned char * as_uchar; char * as_char; } name; /* Parse the RR name. */ status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len); if (status != ARES_SUCCESS) return NULL; aptr += len; /* Make sure there is enough data after the RR name for the fixed * part of the RR. */ if (aptr + RRFIXEDSZ > abuf + alen) { ares_free_string(name.as_char); return NULL; } /* Parse the fixed part of the RR, and advance to the RR data * field. */ type = DNS_RR_TYPE(aptr); dnsclass = DNS_RR_CLASS(aptr); ttl = DNS_RR_TTL(aptr); dlen = DNS_RR_LEN(aptr); aptr += RRFIXEDSZ; if (aptr + dlen > abuf + alen) { ares_free_string(name.as_char); return NULL; } /* Display the RR name, class, and type. */ printf("/t%-15s./t%d", name.as_char, ttl); if (dnsclass != C_IN) printf("/t%s", class_name(dnsclass)); printf("/t%s", type_name(type)); ares_free_string(name.as_char); /* Display the RR data. Don't touch aptr. */ switch (type) { case T_CNAME: case T_MB: case T_MD: case T_MF: case T_MG: case T_MR: case T_NS: case T_PTR: /* For these types, the RR data is just a domain name. */ status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len); if (status != ARES_SUCCESS) return NULL; printf("/t%s.", name.as_char); ares_free_string(name.as_char); break; case T_HINFO: /* The RR data is two length-counted character strings. */ p = aptr; len = *p; if (p + len + 1 > aptr + dlen) return NULL; status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); if (status != ARES_SUCCESS) return NULL; printf("/t%s", name.as_char); ares_free_string(name.as_char); p += len; len = *p; if (p + len + 1 > aptr + dlen) return NULL; status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); if (status != ARES_SUCCESS) return NULL; printf("/t%s", name.as_char); ares_free_string(name.as_char); break; case T_MINFO: /* The RR data is two domain names. */ p = aptr; status = ares_expand_name(p, abuf, alen, &name.as_char, &len); if (status != ARES_SUCCESS) return NULL; printf("/t%s.", name.as_char); ares_free_string(name.as_char); p += len; status = ares_expand_name(p, abuf, alen, &name.as_char, &len); if (status != ARES_SUCCESS) return NULL;//.........这里部分代码省略.........
开发者ID:changloong,项目名称:gool,代码行数:101,
示例23: do_byte void do_byte() { type_name("jbyte" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例24: c_addvoid c_add() { switch (sp->type) {#ifndef NO_BUFFER_TYPE case T_BUFFER: { if (!((sp-1)->type == T_BUFFER)) { error("Bad type argument to +. Had %s and %s./n", type_name((sp - 1)->type), type_name(sp->type)); } else { buffer_t *b; b = allocate_buffer(sp->u.buf->size + (sp - 1)->u.buf->size); memcpy(b->item, (sp - 1)->u.buf->item, (sp - 1)->u.buf->size); memcpy(b->item + (sp - 1)->u.buf->size, sp->u.buf->item, sp->u.buf->size); free_buffer((sp--)->u.buf); free_buffer(sp->u.buf); sp->u.buf = b; } break; } /* end of x + T_BUFFER */#endif case T_NUMBER: { switch ((--sp)->type) { case T_NUMBER: sp->u.number += (sp+1)->u.number; break; case T_REAL: sp->u.real += (sp+1)->u.number; break; case T_STRING: { char buff[20]; sprintf(buff, "%d", (sp+1)->u.number); EXTEND_SVALUE_STRING(sp, buff, "f_add: 2"); break; } default: error("Bad type argument to +. Had %s and %s./n", type_name(sp->type), type_name((sp+1)->type)); } break; } /* end of x + NUMBER */ case T_REAL: { switch ((--sp)->type) { case T_NUMBER: sp->type = T_REAL; sp->u.real = sp->u.number + (sp+1)->u.real; break; case T_REAL: sp->u.real += (sp+1)->u.real; break; case T_STRING: { char buff[40]; sprintf(buff, "%f", (sp+1)->u.real); EXTEND_SVALUE_STRING(sp, buff, "f_add: 2"); break; } default: error("Bad type argument to +. Had %s and %s/n", type_name(sp->type), type_name((sp+1)->type)); } break; } /* end of x + T_REAL */ case T_ARRAY: { if (!((sp-1)->type == T_ARRAY)) { error("Bad type argument to +. Had %s and %s/n", type_name((sp - 1)->type), type_name(sp->type)); } else { /* add_array now free's the arrays */ (sp-1)->u.arr = add_array((sp - 1)->u.arr, sp->u.arr); sp--; break; } } /* end of x + T_ARRAY */ case T_MAPPING: { if ((sp-1)->type == T_MAPPING) { mapping_t *map; map = add_mapping((sp - 1)->u.map, sp->u.map); free_mapping((sp--)->u.map); free_mapping(sp->u.map); sp->u.map = map; break; } else error("Bad type argument to +. Had %s and %s/n", type_name((sp - 1)->type), type_name(sp->type)); } /* end of x + T_MAPPING */ case T_STRING: { switch ((sp-1)->type) { case T_NUMBER: {//.........这里部分代码省略.........
开发者ID:xcw0579,项目名称:mudOS,代码行数:101,
示例25: do_short void do_short() { type_name("jshort" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例26: strcmpbool TControl::is_type(char *tname){ return strcmp(type_name(),tname)==0;}
开发者ID:Artorios,项目名称:rootkit.com,代码行数:4,
示例27: do_int void do_int() { type_name("jint" ); }
开发者ID:dain,项目名称:graal,代码行数:1,
示例28: ShapeFunction/// 1D shape functions./// Therefore the only possible SFD element types are Lines (1D), Quadrilaterals(2D), Hexahedrals(3D)class SFDM_API ShapeFunction : public mesh::ShapeFunction {public: typedef boost::detail::multi_array::multi_array_view<Real,2> FieldView;private: typedef const boost::detail::multi_array::const_sub_array<Uint,1> RowRef;public: /// Constructor ShapeFunction(const std::string& name = type_name()); /// Type name static std::string type_name() { return "ShapeFunction"; } // Concrete implementation virtual const RealMatrix& local_coordinates() const { return sol_pts(); } // Concrete implementation virtual RealRowVector value(const RealVector& local_coordinate) const; // Concrete implementation virtual RealMatrix gradient(const RealVector& local_coordinate) const; // Concrete implementation virtual Uint nb_nodes() const { return nb_sol_pts(); }
开发者ID:xyuan,项目名称:coolfluid3,代码行数:31,
示例29: la_pltexituintptr_tla_pltexit(Elf32_Sym *symp, uint_t symndx, uintptr_t *refcookie, uintptr_t *defcookie, uintptr_t retval)#endif{#if !defined(_LP64) const char *sym_name = (const char *)symp->st_name;#endif sigset_t omask; char buf[256]; GElf_Sym sym; prsyminfo_t si; ctf_file_t *ctfp; ctf_funcinfo_t finfo; char *defname = (char *)(*defcookie); char *refname = (char *)(*refcookie); abilock(&omask); if (pidout) (void) fprintf(ABISTREAM, "%7u:", (unsigned int)getpid()); if (retval == 0) { if (verbose_list == NULL) { (void) fprintf(ABISTREAM, "<- %-8s -> %8s:%s()/n", refname, defname, sym_name); (void) fflush(ABISTREAM); } abiunlock(&omask); return (retval); } if ((ctfp = Pname_to_ctf(proc_hdl, defname)) == NULL) goto fail; if (Pxlookup_by_name(proc_hdl, PR_LMID_EVERY, defname, sym_name, &sym, &si) != 0) goto fail; if (ctf_func_info(ctfp, si.prs_id, &finfo) == CTF_ERR) goto fail; if (verbose_list != NULL) { if (check_intlist(verbose_list, sym_name) != 0) { (void) type_name(ctfp, finfo.ctc_return, buf, sizeof (buf)); (void) fprintf(ABISTREAM, "/treturn = (%s) ", buf); print_value(ctfp, finfo.ctc_return, retval); (void) fprintf(ABISTREAM, "/n"); (void) fprintf(ABISTREAM, "<- %-8s -> %8s:%s()", refname, defname, sym_name); (void) fprintf(ABISTREAM, " = 0x%p/n", (void *)retval); } } else { (void) fprintf(ABISTREAM, "<- %-8s -> %8s:%s()", refname, defname, sym_name); (void) fprintf(ABISTREAM, " = 0x%p/n", (void *)retval); } (void) fflush(ABISTREAM); abiunlock(&omask); return (retval);fail: if (verbose_list != NULL) { if (check_intlist(verbose_list, sym_name) != 0) { (void) fprintf(ABISTREAM, "/treturn = 0x%p/n", (void *)retval); (void) fprintf(ABISTREAM, "<- %-8s -> %8s:%s()", refname, defname, sym_name); (void) fprintf(ABISTREAM, " = 0x%p/n", (void *)retval); } } else { (void) fprintf(ABISTREAM, "<- %-8s -> %8s:%s()", refname, defname, sym_name); (void) fprintf(ABISTREAM, " = 0x%p/n", (void *)retval); } (void) fflush(ABISTREAM); abiunlock(&omask); return (retval);}
开发者ID:NanXiao,项目名称:illumos-joyent,代码行数:82,
注:本文中的type_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ type_name_no_tag函数代码示例 C++ type_keystroke_by_string函数代码示例 |