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


C++ Tcl_GetHashValue函数代码示例

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


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

示例1: NextSigMapEntry

ClientData
NextSigMapEntry (
    SignalMapSearch *searchPtr)
{
    Tcl_HashEntry *entryPtr;

    entryPtr = Tcl_NextHashEntry(searchPtr);
    if (entryPtr != NULL) {
        return Tcl_GetHashValue(entryPtr);
    } else {
        return NULL;
    }
}
开发者ID:kostix,项目名称:posix-signal,代码行数:13,代码来源:sigmap.c

示例2: while

/*
 * Ttk_StyleMap --
 * 	Look up state-specific option value from specified style.
 */
Tcl_Obj *Ttk_StyleMap(Ttk_Style style, const char *optionName, Ttk_State state)
{
    while (style) {
	Tcl_HashEntry *entryPtr =
	    Tcl_FindHashEntry(&style->settingsTable, optionName);
	if (entryPtr) {
	    Ttk_StateMap stateMap = Tcl_GetHashValue(entryPtr);
	    return Ttk_StateMapLookup(NULL, stateMap, state);
	}
	style = style->parentStyle;
    }
    return 0;
}
开发者ID:afmayer,项目名称:tcl-tk,代码行数:17,代码来源:ttkTheme.c

示例3: GetBitmapFromObj

static TkBitmap *
GetBitmapFromObj(
    Tk_Window tkwin,		/* Window in which the bitmap will be used. */
    Tcl_Obj *objPtr)		/* The object that describes the desired
				 * bitmap. */
{
    TkBitmap *bitmapPtr;
    Tcl_HashEntry *hashPtr;
    TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;

    if (objPtr->typePtr != &tkBitmapObjType) {
	InitBitmapObj(objPtr);
    }

    bitmapPtr = objPtr->internalRep.twoPtrValue.ptr1;
    if (bitmapPtr != NULL) {
	if ((bitmapPtr->resourceRefCount > 0)
		&& (Tk_Display(tkwin) == bitmapPtr->display)) {
	    return bitmapPtr;
	}
	hashPtr = bitmapPtr->nameHashPtr;
	FreeBitmapObj(objPtr);
    } else {
	hashPtr = Tcl_FindHashEntry(&dispPtr->bitmapNameTable,
		Tcl_GetString(objPtr));
	if (hashPtr == NULL) {
	    goto error;
	}
    }

    /*
     * At this point we've got a hash table entry, off of which hang one or
     * more TkBitmap structures. See if any of them will work.
     */

    for (bitmapPtr = Tcl_GetHashValue(hashPtr); bitmapPtr != NULL;
	    bitmapPtr = bitmapPtr->nextPtr) {
	if (Tk_Display(tkwin) == bitmapPtr->display) {
	    objPtr->internalRep.twoPtrValue.ptr1 = bitmapPtr;
	    bitmapPtr->objRefCount++;
	    return bitmapPtr;
	}
    }

  error:
    Tcl_Panic("GetBitmapFromObj called with non-existent bitmap!");
    /*
     * The following code isn't reached; it's just there to please compilers.
     */
    return NULL;
}
开发者ID:afmayer,项目名称:tcl-tk,代码行数:51,代码来源:tkBitmap.c

示例4: get_material

/* Get material pointer from material name */
int 
get_material(const char *mat_name, material_t **mat ) 
{
    Tcl_HashEntry *entry;

    entry = Tcl_FindHashEntry(&g_hier_material_table, mat_name);
    if (0 == entry) {
        return TCL_ERROR;
    } else {
        *mat = (material_t*)Tcl_GetHashValue(entry);
    }

    return TCL_OK;
}
开发者ID:FeeJai,项目名称:Tux-Racer-4-iOS,代码行数:15,代码来源:hier.c

示例5: Delete_RR_Hash

/* Destroy the RR hash for a sender, and all its associated values. */
void Delete_RR_Hash(member *the_member)
{
  Tcl_HashTable *the_table = &the_member->RR_Hash;
  Tcl_HashEntry *the_entry;
  Tcl_HashSearch the_search;
  
  the_entry = Tcl_FirstHashEntry(the_table, &the_search);
  while (the_entry != NULL) {
    free(Tcl_GetHashValue(the_entry));
    the_entry = Tcl_NextHashEntry(&the_search);
  }

  Tcl_DeleteHashTable(the_table);
}
开发者ID:chenhaizhao21,项目名称:Test-Network,代码行数:15,代码来源:rtp_mlist_internal.c

示例6: tn_delete

void
tn_delete (TNPtr n)
{
    T* t = n->tree;

    /* We assume that the node either has no parent or siblings anymore,
     * or that their presence does not matter. The node may still have
     * children. They are deleted recursively. That is the situation
     * where the parent/sibling information does not matter anymore, and
     * can be ignored.
     */

    tn_notleaf (n);
    tn_notnode (n);

    Tcl_DecrRefCount	(n->name); n->name = NULL;
    Tcl_DeleteHashEntry (n->he);   n->he   = NULL;

    if (n->child) {
	int i;

	for (i = 0; i < n->nchildren; i++) {
	    ASSERT_BOUNDS (i, n->nchildren);

	    tn_delete (n->child [i]);
	    n->child [i] = NULL;
	}
	ckfree ((char*) n->child);

	n->child       = NULL;
	n->nchildren   = 0;
	n->maxchildren = 0;
    }

    if (n->attr) {
	Tcl_HashSearch	hs;
	Tcl_HashEntry*	he;

	for(he = Tcl_FirstHashEntry(n->attr, &hs);
	    he != NULL;
	    he = Tcl_NextHashEntry(&hs)) {
	    Tcl_DecrRefCount ((Tcl_Obj*) Tcl_GetHashValue(he));
	}
	Tcl_DeleteHashTable(n->attr);
	ckfree ((char*) n->attr);
	n->attr = NULL;
    }

    ckfree ((char*) n);
}
开发者ID:Brucegx,项目名称:Appstore719,代码行数:50,代码来源:tn.c

示例7: TclpThreadDataKeyGet

void *
TclpThreadDataKeyGet(
    Tcl_ThreadDataKey *keyPtr)	/* Identifier for the data chunk, really
				 * (int**) */
{
    Tcl_HashTable *hashTablePtr =
	    ThreadStorageGetHashTable(Tcl_GetCurrentThread());
    Tcl_HashEntry *hPtr = Tcl_FindHashEntry(hashTablePtr, (char *) keyPtr);

    if (hPtr == NULL) {
	return NULL;
    }
    return Tcl_GetHashValue(hPtr);
}
开发者ID:aosm,项目名称:tcl,代码行数:14,代码来源:tclThreadStorage.c

示例8: FuzzyVoteAccumSet

static void
FuzzyVoteAccumSet (Tcl_HashTable *accum, List<AccumElement> *bins,
                   int x, int y, int scale, int val)
{
int loc[3];
loc[0] = x; loc[1] = y; loc[2] = scale;
Tcl_HashEntry *entry = Tcl_FindHashEntry(accum,(char*)loc);
AccumElement *elem = (AccumElement*)(Tcl_GetHashValue(entry));
bins[elem->value].unchain(elem);
if (val>255)
    val = 255;
bins[val].addLast(elem);
elem->value = val;
}
开发者ID:LearningProcess,项目名称:PEWSHOOM,代码行数:14,代码来源:search.cpp

示例9: Ttk_DeleteTagTable

void Ttk_DeleteTagTable(Ttk_TagTable tagTable)
{
    Tcl_HashSearch search;
    Tcl_HashEntry *entryPtr;

    entryPtr = Tcl_FirstHashEntry(&tagTable->tags, &search);
    while (entryPtr != NULL) {
	DeleteTag(tagTable, Tcl_GetHashValue(entryPtr));
	entryPtr = Tcl_NextHashEntry(&search);
    }

    Tcl_DeleteHashTable(&tagTable->tags);
    ckfree((void*)tagTable);
}
开发者ID:AbaqusPowerUsers,项目名称:AbaqusPythonScripts,代码行数:14,代码来源:ttkTagSet.c

示例10: FirstSigMapEntry

ClientData
FirstSigMapEntry (
    SignalMap *sigmapPtr,
    SignalMapSearch *searchPtr)
{
    Tcl_HashEntry *entryPtr;

    entryPtr = Tcl_FirstHashEntry(sigmapPtr, searchPtr);
    if (entryPtr != NULL) {
        return Tcl_GetHashValue(entryPtr);
    } else {
        return NULL;
    }
}
开发者ID:kostix,项目名称:posix-signal,代码行数:14,代码来源:sigmap.c

示例11: FuzzyVoteAccumZero

static void
FuzzyVoteAccumZero (Tcl_HashTable *accum, List<AccumElement> *bins,
                    int x, int y, int scale)
{
int loc[3];
loc[0] = x; loc[1] = y; loc[2] = scale;
Tcl_HashEntry *entry = Tcl_FindHashEntry(accum,(char*)loc);
if (entry == NULL)
    return;
AccumElement *elem = (AccumElement*)(Tcl_GetHashValue(entry));
bins[elem->value].unchain(elem);
bins[0].addLast(elem);
elem->value = 0;
}
开发者ID:LearningProcess,项目名称:PEWSHOOM,代码行数:14,代码来源:search.cpp

示例12: TkDeleteAllImages

void
TkDeleteAllImages(
    TkMainInfo *mainPtr)	/* Structure describing application that is
				 * going away. */
{
    Tcl_HashSearch search;
    Tcl_HashEntry *hPtr;

    for (hPtr = Tcl_FirstHashEntry(&mainPtr->imageTable, &search);
	    hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) {
	EventuallyDeleteImage(Tcl_GetHashValue(hPtr), 1);
    }
    Tcl_DeleteHashTable(&mainPtr->imageTable);
}
开发者ID:tcltk,项目名称:tk,代码行数:14,代码来源:tkImage.c

示例13: Tcl_FindHashEntry

Tcl_DBusBus *DBus_GetConnection(Tcl_Interp *interp, Tcl_Obj *const name)
{
   Tcl_HashEntry *entry;
   Tcl_DBusBus *dbus;

   entry = Tcl_FindHashEntry(&bus, (char *) name);
   if (entry == NULL) return NULL;
   dbus = (Tcl_DBusBus *) Tcl_GetHashValue(entry);
   entry = Tcl_FindHashEntry(dbus->snoop, (char *) interp);
   if (entry != NULL)
     return dbus;
   else
     return NULL;
}
开发者ID:recri,项目名称:keyer,代码行数:14,代码来源:dbusMain.c

示例14: HTUTree_replaceNode_tcl

int HTUTree_replaceNode_tcl(ClientData clientData, Tcl_Interp *interp, 
			 int argc, char **argv) {
  if (argc == 5) {
    char *tree_key = argv[1];
    const char *realm = argv[2];
    const char *path = argv[3];
    char *void_key = argv[4];
    if ( tree_key && realm && path) {
      Tcl_HashEntry *tree_entry = Tcl_FindHashEntry(&HTableUTree, tree_key);
      Tcl_HashEntry *void_entry = Tcl_FindHashEntry(&HTableVoid, void_key);
      if ( tree_entry && void_entry ) {
	HTUTree *tree = Tcl_GetHashValue(tree_entry);
	void *context = Tcl_GetHashValue(void_entry);
	BOOL result = HTUTree_replaceNode(tree, realm, path, context);
	Tcl_AppendResult(interp, result ? "YES" : "NO", NULL);
	return TCL_OK;
      }
    }
    Tcl_AppendResult(interp, bad_vars, NULL);
    return TCL_ERROR;
  }
  Tcl_AppendResult(interp, bad_vars, NULL);
  return TCL_ERROR;
}
开发者ID:Hiroyuki-Nagata,项目名称:libwww,代码行数:24,代码来源:HTUTree_glue.c

示例15: Nsf_PointerTypeLookup

void *
Nsf_PointerTypeLookup(const char* typeName) {
  const Tcl_HashEntry *hPtr;

  nonnull_assert(typeName != NULL);

  NsfMutexLock(&pointerMutex);
  hPtr = Tcl_CreateHashEntry(pointerHashTablePtr, typeName, NULL);
  NsfMutexUnlock(&pointerMutex);

  if (hPtr != NULL) {
    return Tcl_GetHashValue(hPtr);
  }
  return NULL;
}
开发者ID:gustafn,项目名称:nsf,代码行数:15,代码来源:nsfPointer.c


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