这篇教程C++ zlist_destroy函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中zlist_destroy函数的典型用法代码示例。如果您正苦于以下问题:C++ zlist_destroy函数的具体用法?C++ zlist_destroy怎么用?C++ zlist_destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了zlist_destroy函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: zconfig_destroyvoidzconfig_destroy (zconfig_t **self_p){ assert (self_p); if (*self_p) { zconfig_t *self = *self_p; // Destroy all children and siblings recursively if (self->child) zconfig_destroy (&self->child); if (self->next) zconfig_destroy (&self->next); zlist_destroy (&self->comments); free (self->name); free (self->value); free (self); *self_p = NULL; }}
开发者ID:AndreasBomholtz,项目名称:czmq,代码行数:19,
示例2: client_destroystatic voidclient_destroy (client_t **self_p){ assert (self_p); if (*self_p) { client_t *self = *self_p; fmq_config_destroy (&self->config); fmq_msg_destroy (&self->request); fmq_msg_destroy (&self->reply); // Destroy subscriptions while (zlist_size (self->subs)) { sub_t *sub = (sub_t *) zlist_pop (self->subs); sub_destroy (&sub); } zlist_destroy (&self->subs); free (self); *self_p = NULL; }}
开发者ID:zoobab,项目名称:filemq,代码行数:19,
示例3: zconfig_commentvoidzconfig_comment (zconfig_t *self, char *format, ...){ if (format) { if (!self->comments) { self->comments = zlist_new (); zlist_autofree (self->comments); } va_list argptr; va_start (argptr, format); char *string = zsys_vprintf (format, argptr); va_end (argptr); zlist_append (self->comments, string); free (string); } else zlist_destroy (&self->comments);}
开发者ID:AndreasBomholtz,项目名称:czmq,代码行数:19,
示例4: zsync_node_destroystatic voidzsync_node_destroy (zsync_node_t **self_p){ assert (self_p); if (*self_p) { zsync_node_t *self = *self_p; zuuid_destroy (&self->own_uuid); // TODO destroy all zsync_peers zlist_destroy (&self->peers); zhash_destroy (&self->zyre_peers); zyre_destroy (&self->zyre); free (self); self_p = NULL; }}
开发者ID:skyformat99,项目名称:protocol,代码行数:19,
示例5: mainint main(void){ zctx_t *ctx = zctx_new(); lbbroker_t *self = (lbbroker_t *)zmalloc(sizeof(lbbroker_t)); self->frontend = zsocket_new(ctx, ZMQ_ROUTER); self->backend = zsocket_new(ctx, ZMQ_ROUTER);#if (defined (WIN32)) zsocket_bind(self->frontend, "tcp://*:5672"); // frontend zsocket_bind(self->backend, "tcp://*:5673"); // backend#else zsocket_bind(self->frontend, "ipc://frontend.ipc"); zsocket_bind(self->backend, "ipc://backend.ipc");#endif int client_nbr; for (client_nbr = 0; client_nbr < NBR_CLIENTS; client_nbr++) zthread_new(client_task, NULL); int worker_nbr; for (worker_nbr = 0; worker_nbr < NBR_WORKERS; worker_nbr++) zthread_new(worker_task, NULL); // Queue of available workers self->workers = zlist_new(); // Prepare reactor and fire it up zloop_t *reactor = zloop_new(); zmq_pollitem_t poller = { self->backend, 0, ZMQ_POLLIN }; zloop_poller(reactor, &poller, s_handle_backend, self); zloop_start(reactor); zloop_destroy(&reactor); // When we're done, clean up properly while (zlist_size(self->workers)) { zframe_t *frame = (zframe_t *)zlist_pop(self->workers); zframe_destroy(&frame); } zlist_destroy(&self->workers); zctx_destroy(&ctx); free(self); return 0;}
开发者ID:a524631266,项目名称:Ongoing-Study,代码行数:42,
示例6: main/*PUB tcp://*:9003<< [ "(?stock:[A-Z][A-Z0-9]+)" ] [ timestamp :f64 ] [ price :f64 ]*/int main(int argc, const char* argv[]){ SetConsoleTitle(L"tickz.server"); // initialize random number generator srand( (unsigned int)time(NULL) ); // initialize stock data tick_t msft = tick_new("MSFT", 41.78); tick_t aapl = tick_new("AAPL", 95.35); tick_t goog = tick_new("GOOG",571.09); tick_t yhoo = tick_new("YHOO", 34.53); tick_t bbry = tick_new("BBRY", 10.90); zlist_t *stocks = zlist_new(); zlist_append(stocks,&msft); zlist_append(stocks,&aapl); zlist_append(stocks,&goog); zlist_append(stocks,&yhoo); zlist_append(stocks,&bbry); // set up publisher zctx_t *ctx = zctx_new(); void *pub = zsocket_new(ctx,ZMQ_PUB); zsocket_bind(pub,"tcp://*:9003"); // set up main loop zloop_t *loop = zloop_new(); zloop_data_t loopdata; loopdata.stocks = stocks; loopdata.socket = pub; // every 500 ms, update the stocks and publish the new data int timer = zloop_timer(loop,500,0,onloop,&loopdata); //TOOD: take delay as input zloop_start(loop); //NOTE: CTRL+C will cleanly interrupt the infinite loop // clean up zctx_destroy(&ctx); zlist_destroy(&stocks); return 0;}
开发者ID:linnet,项目名称:BeyondTheBox,代码行数:48,
示例7: cleanup_pushvoid cleanup_push (cleaner_fun_f *fun, void * arg){ pthread_mutex_lock(&mutex); if (! cleanup_list || cleaner_pid != getpid()) { // This odd dance is to handle forked processes that do not exec if (cleaner_pid != 0 && cleanup_list) { zlist_destroy(&cleanup_list); } cleanup_list = zlist_new(); cleaner_pid = getpid(); atexit(cleanup); } struct cleaner * c = calloc(sizeof(struct cleaner), 1); c->fun = fun; c->arg = arg; /* Ignore return code, no way to return it callery anyway... */ (void) zlist_push(cleanup_list, c); pthread_mutex_unlock(&mutex);}
开发者ID:tpatki,项目名称:flux-core,代码行数:20,
示例8: zinterface_testvoidzinterface_test(bool verbose){ printf(" * zinterface: "); zlist_t *interfaces = zinterface_list(); assert(interfaces); if (verbose) { printf("Len: %zu/n", zlist_size(interfaces)); zinterface_t *iface = zlist_first(interfaces); while (iface) { printf ("%s/t%s/t%s/t%s/n", zinterface_name(iface), zinterface_address(iface), zinterface_netmask(iface), zinterface_broadcast(iface)); iface = zlist_next(interfaces); } } zlist_destroy(&interfaces); printf("OK/n");}
开发者ID:VanL,项目名称:czmq,代码行数:20,
示例9: ztask_job_request_dumpvoidztask_job_request_dump (ztask_job_request_t *self){ assert (self); zclock_log("ztask_job_request: Processes=%ld", zhash_size (self->processes)); zlist_t *keys = zhash_keys (self->processes); char *key = (char *) zlist_first (keys); ztask_job_proc_t *p; while (key) { zclock_log ("ztask_job_request: key=%s", key); p = (ztask_job_proc_t *) zhash_lookup (self->processes, key); ztask_job_proc_dump (p); key = (char *) zlist_next (keys); } zlist_destroy (&keys);}
开发者ID:savke,项目名称:ztask0,代码行数:20,
示例10: zlist_dupzlist_t *zlist_dup (zlist_t *self){ if (!self) return NULL; zlist_t *copy = zlist_new (); copy->autofree = self->autofree; if (copy) { node_t *node; for (node = self->head; node; node = node->next) { if (!zlist_append (copy, node->item)) { zlist_destroy (©); break; } } } return copy;}
开发者ID:bakirtasa,项目名称:czmq,代码行数:20,
示例11: zconfig_destroyvoidzconfig_destroy (zconfig_t **self_p){ assert (self_p); if (*self_p) { zconfig_t *self = *self_p; // Destroy all children and siblings recursively zconfig_destroy (&self->child); zconfig_destroy (&self->next); // Destroy other properties and then self zlist_destroy (&self->comments); zfile_destroy (&self->file); free (self->name); free (self->value); free (self); *self_p = NULL; }}
开发者ID:RUNDSP,项目名称:czmq,代码行数:20,
示例12: zhash_commentvoidzhash_comment (zhash_t *self, const char *format, ...){ if (format) { if (!self->comments) { self->comments = zlist_new (); if (!self->comments) return; zlist_autofree (self->comments); } va_list argptr; va_start (argptr, format); char *string = zsys_vprintf (format, argptr); va_end (argptr); if (string) zlist_append (self->comments, string); zstr_free (&string); } else zlist_destroy (&self->comments);}
开发者ID:ritchiecarroll,项目名称:czmq,代码行数:21,
示例13: zre_msg_destroyvoidzre_msg_destroy (zre_msg_t **self_p){ assert (self_p); if (*self_p) { zre_msg_t *self = *self_p; // Free class properties zframe_destroy (&self->routing_id); free (self->ipaddress); if (self->groups) zlist_destroy (&self->groups); zhash_destroy (&self->headers); zmsg_destroy (&self->content); free (self->group); // Free object itself free (self); *self_p = NULL; }}
开发者ID:karinies,项目名称:coast,代码行数:21,
示例14: zctx_destroyvoidzctx_destroy (zctx_t **self_p){ assert (self_p); if (*self_p) { zctx_t *self = *self_p; // Destroy all sockets while (zlist_size (self->sockets)) zctx__socket_destroy (self, zlist_first (self->sockets)); zlist_destroy (&self->sockets); zmutex_destroy (&self->mutex); // ZMQ context may not yet be instantiated if (self->context && !self->shadow) zmq_term (self->context); free (self); *self_p = NULL; }}
开发者ID:calid,项目名称:czmq,代码行数:21,
示例15: module_start_allint module_start_all (modhash_t *mh){ zlist_t *uuids; char *uuid; int rc = -1; if (!(uuids = zhash_keys (mh->zh_byuuid))) oom (); uuid = zlist_first (uuids); while (uuid) { module_t *p = zhash_lookup (mh->zh_byuuid, uuid); assert (p != NULL); if (module_start (p) < 0) goto done; uuid = zlist_next (uuids); } rc = 0;done: zlist_destroy (&uuids); return rc;}
开发者ID:surajpkn,项目名称:flux-core,代码行数:21,
示例16: mount_sub_storestatic voidmount_sub_store (mount_t *self, client_t *client, fmq_msg_t *request){ // Store subscription along with any previous ones // Coalesce subscriptions that are on same path char *path = fmq_msg_path (request); sub_t *sub = (sub_t *) zlist_first (self->subs); while (sub) { if (client == sub->client) { // If old subscription is superset/same as new, ignore new if (strncmp (path, sub->path, strlen (sub->path)) == 0) return; else // If new subscription is superset of old one, remove old if (strncmp (sub->path, path, strlen (path)) == 0) { zlist_remove (self->subs, sub); sub_destroy (&sub); sub = (sub_t *) zlist_first (self->subs); } else sub = (sub_t *) zlist_next (self->subs); } else sub = (sub_t *) zlist_next (self->subs); } // New subscription for this client, append to our list sub = sub_new (client, path, fmq_msg_cache (request)); zlist_append (self->subs, sub); // If client requested resync, send full mount contents now if (fmq_msg_options_number (client->request, "RESYNC", 0) == 1) { zlist_t *patches = fmq_dir_resync (self->dir, self->alias); while (zlist_size (patches)) { fmq_patch_t *patch = (fmq_patch_t *) zlist_pop (patches); sub_patch_add (sub, patch); fmq_patch_destroy (&patch); } zlist_destroy (&patches); }}
开发者ID:JuanCerezuela,项目名称:filemq,代码行数:40,
示例17: zctx_newzctx_t *zctx_new (void){ zctx_t *self = (zctx_t *) zmalloc (sizeof (zctx_t)); if (!self) return NULL; self->sockets = zlist_new (); self->mutex = zmutex_new (); if (!self->sockets || !self->mutex) { zlist_destroy (&self->sockets); zmutex_destroy (&self->mutex); free (self); return NULL; } self->iothreads = 1; self->pipehwm = 1000; self->sndhwm = 1000; self->rcvhwm = 1000; zsys_catch_interrupts (); return self;}
开发者ID:Lucky7Studio,项目名称:czmq,代码行数:22,
示例18: client_destroystatic voidclient_destroy (client_t **self_p){ assert (self_p); if (*self_p) { client_t *self = *self_p; fmq_config_destroy (&self->config); int server_nbr; for (server_nbr = 0; server_nbr < self->nbr_servers; server_nbr++) { server_t *server = self->servers [server_nbr]; server_destroy (&server); } // Destroy subscriptions while (zlist_size (self->subs)) { sub_t *sub = (sub_t *) zlist_pop (self->subs); sub_destroy (&sub); } zlist_destroy (&self->subs); free (self); *self_p = NULL; }}
开发者ID:stephen-wolf,项目名称:filemq,代码行数:22,
示例19: oommodule_t *module_lookup_byname (modhash_t *mh, const char *name){ zlist_t *uuids; char *uuid; module_t *result = NULL; if (!(uuids = zhash_keys (mh->zh_byuuid))) oom (); uuid = zlist_first (uuids); while (uuid) { module_t *p = zhash_lookup (mh->zh_byuuid, uuid); assert (p != NULL); if (!strcmp (module_get_name (p), name)) { result = p; break; } uuid = zlist_next (uuids); p = NULL; } zlist_destroy (&uuids); return result;}
开发者ID:surajpkn,项目名称:flux-core,代码行数:22,
示例20: cache_expire_entriesint cache_expire_entries (struct cache *cache, int current_epoch, int thresh){ zlist_t *keys; char *ref; struct cache_entry *hp; int count = 0; if (!(keys = zhash_keys (cache->zh))) oom (); while ((ref = zlist_pop (keys))) { if ((hp = zhash_lookup (cache->zh, ref)) && !cache_entry_get_dirty (hp) && cache_entry_get_valid (hp) && (thresh == 0 || cache_entry_age (hp, current_epoch) > thresh)) { zhash_delete (cache->zh, ref); count++; } free (ref); } zlist_destroy (&keys); return count;}
开发者ID:tpatki,项目名称:flux-core,代码行数:22,
示例21: lsmod_map_hashvoid lsmod_map_hash (zhash_t *mods, flux_lsmod_f cb, void *arg){ zlist_t *keys = NULL; const char *key; mod_t *m; int errnum = 0; if (!(keys = zhash_keys (mods))) oom (); key = zlist_first (keys); while (key != NULL) { if ((m = zhash_lookup (mods, key))) { if (cb (m->name, m->size, m->digest, m->idle, nodeset_str (m->nodeset), arg) < 0) { if (errno > errnum) errnum = errno; } } key = zlist_next (keys); } zlist_destroy (&keys);}
开发者ID:dinesh121991,项目名称:flux-core,代码行数:22,
示例22: zdir_resynczlist_t *zdir_resync (zdir_t *self, const char *alias){ zlist_t *patches = zlist_new (); if (!patches) return NULL; zfile_t **files = zdir_flatten (self); uint index; for (index = 0;; index++) { zfile_t *file = files [index]; if (!file) break; if (zlist_append (patches, zdir_patch_new ( self->path, file, patch_create, alias))) { zlist_destroy (&patches); break; } } freen (files); return patches;}
开发者ID:diorcety,项目名称:czmq,代码行数:22,
示例23: zproto_example_destroyvoidzproto_example_destroy (zproto_example_t **self_p){ assert (self_p); if (*self_p) { zproto_example_t *self = *self_p; // Free class properties zframe_destroy (&self->routing_id); free (self->data); if (self->aliases) zlist_destroy (&self->aliases); zhash_destroy (&self->headers); zchunk_destroy (&self->public_key); zuuid_destroy (&self->identifier); zframe_destroy (&self->address); zmsg_destroy (&self->content); // Free object itself free (self); *self_p = NULL; }}
开发者ID:asokoloski,项目名称:zproto,代码行数:23,
示例24: emit_command_help_from_patternstatic void emit_command_help_from_pattern (const char *pattern, FILE *fp){ zhash_t *zh = NULL; zlist_t *keys = NULL; const char *cat; zh = get_command_list_hash (pattern); if (zh == NULL) return; keys = zhash_keys (zh); zlist_sort (keys, (zlist_compare_fn *) category_cmp); cat = zlist_first (keys); while (cat) { emit_command_list_category (zh, cat, fp); if ((cat = zlist_next (keys))) fprintf (fp, "/n"); } zlist_destroy (&keys); zhash_destroy (&zh); return;}
开发者ID:flux-framework,项目名称:flux-core,代码行数:23,
示例25: START_TESTEND_TEST// --------------------------------------------------------------------------/// Try to _pop () a zlist_t *START_TEST(test_msg_pop_l){ sam_selftest_introduce ("test_msg_pop_h"); zmsg_t *zmsg = zmsg_new (); if (zmsg_pushstr (zmsg, "value2") || zmsg_pushstr (zmsg, "value1") || zmsg_pushstr (zmsg, "2")) { ck_abort_msg ("could not build zmsg"); } sam_msg_t *msg = sam_msg_new (&zmsg); ck_assert_int_eq (sam_msg_size (msg), 3); zlist_t *list; int rc = sam_msg_pop (msg, "l", &list); ck_assert_int_eq (rc, 0); ck_assert_int_eq (sam_msg_size (msg), 0); ck_assert_int_eq (zlist_size (list), 2); ck_assert_str_eq (zlist_first (list), "value1"); ck_assert_str_eq (zlist_next (list), "value2"); ck_assert (zlist_next (list) == NULL); zlist_destroy (&list); sam_msg_destroy (&msg);}
开发者ID:dreadworks,项目名称:samwise,代码行数:36,
示例26: zhash_keyszlist_t *zhash_keys (zhash_t *self){ assert (self); zlist_t *keys = zlist_new (); if (!keys) return NULL; zlist_set_destructor (keys, self->key_destructor); zlist_set_duplicator (keys, self->key_duplicator); uint index; size_t limit = primes [self->prime_index]; for (index = 0; index < limit; index++) { item_t *item = self->items [index]; while (item) { if (zlist_append (keys, (void *) item->key)) { zlist_destroy (&keys); break; } item = item->next; } } return keys;}
开发者ID:PSG-Luna,项目名称:czmq,代码行数:24,
示例27: flux_msg_handler_destroyvoid flux_msg_handler_destroy (flux_msg_handler_t *w){ if (w) { assert (w->magic == HANDLER_MAGIC); flux_msg_handler_stop (w); if (w->match.topic_glob) free (w->match.topic_glob); if (w->coproc) coproc_destroy (w->coproc); if (w->backlog) { flux_msg_t *msg; while ((msg = zlist_pop (w->backlog))) flux_msg_destroy (msg); zlist_destroy (&w->backlog); } if (w->wait_match.topic_glob) free (w->wait_match.topic_glob); if (w->arg_free) w->arg_free (w->arg); w->magic = ~HANDLER_MAGIC; dispatch_usecount_decr (w->d); free (w); }}
开发者ID:surajpkn,项目名称:flux-core,代码行数:24,
示例28: zyre_node_destroystatic voidzyre_node_destroy (zyre_node_t **self_p){ assert (self_p); if (*self_p) { zyre_node_t *self = *self_p; zpoller_destroy (&self->poller); zuuid_destroy (&self->uuid); zhash_destroy (&self->peers); zhash_destroy (&self->peer_groups); zlist_destroy (&self->own_groups); zhash_destroy (&self->headers); zsock_destroy (&self->inbox); zsock_destroy (&self->outbox); zactor_destroy (&self->beacon); zactor_destroy (&self->gossip); zstr_free (&self->endpoint); zstr_free (&self->gossip_bind); zstr_free (&self->gossip_connect); free (self->name); free (self); *self_p = NULL; }}
开发者ID:opedroso,项目名称:zyre,代码行数:24,
示例29: main//.........这里部分代码省略......... if (primary [0].revents & ZMQ_POLLIN) { msg = zmsg_recv (localbe); if (!msg) break; // Interrupted zframe_t *address = zmsg_unwrap (msg); zlist_append (workers, address); local_capacity++; // If it's READY, don't route the message any further zframe_t *frame = zmsg_first (msg); if (memcmp (zframe_data (frame), LRU_READY, 1) == 0) zmsg_destroy (&msg); } // Or handle reply from peer broker else if (primary [1].revents & ZMQ_POLLIN) { msg = zmsg_recv (cloudbe); if (!msg) break; // Interrupted // We don't use peer broker address for anything zframe_t *address = zmsg_unwrap (msg); zframe_destroy (&address); } // Route reply to cloud if it's addressed to a broker for (argn = 2; msg && argn < argc; argn++) { char *data = (char *) zframe_data (zmsg_first (msg)); size_t size = zframe_size (zmsg_first (msg)); if (size == strlen (argv [argn]) && memcmp (data, argv [argn], size) == 0) zmsg_send (&msg, cloudfe); } // Route reply to client if we still need to if (msg) zmsg_send (&msg, localfe); // Handle capacity updates if (primary [2].revents & ZMQ_POLLIN) { char *status = zstr_recv (statefe); cloud_capacity = atoi (status); free (status); } // Handle monitor message if (primary [3].revents & ZMQ_POLLIN) { char *status = zstr_recv (monitor); printf ("%s/n", status); free (status); } // Now route as many clients requests as we can handle // - If we have local capacity we poll both localfe and cloudfe // - If we have cloud capacity only, we poll just localfe // - Route any request locally if we can, else to cloud // while (local_capacity + cloud_capacity) { zmq_pollitem_t secondary [] = { { localfe, 0, ZMQ_POLLIN, 0 }, { cloudfe, 0, ZMQ_POLLIN, 0 } }; if (local_capacity) rc = zmq_poll (secondary, 2, 0); else rc = zmq_poll (secondary, 1, 0); assert (rc >= 0); if (secondary [0].revents & ZMQ_POLLIN) msg = zmsg_recv (localfe); else if (secondary [1].revents & ZMQ_POLLIN) msg = zmsg_recv (cloudfe); else break; // No work, go back to primary if (local_capacity) { zframe_t *frame = (zframe_t *) zlist_pop (workers); zmsg_wrap (msg, frame); zmsg_send (&msg, localbe); local_capacity--; } else { // Route to random broker peer int random_peer = randof (argc - 2) + 2; zmsg_pushmem (msg, argv [random_peer], strlen (argv [random_peer])); zmsg_send (&msg, cloudbe); } } if (local_capacity != previous) { // We stick our own address onto the envelope zstr_sendm (statebe, self); // Broadcast new capacity zstr_sendf (statebe, "%d", local_capacity); } } // When we're done, clean up properly while (zlist_size (workers)) { zframe_t *frame = (zframe_t *) zlist_pop (workers); zframe_destroy (&frame); } zlist_destroy (&workers); zctx_destroy (&ctx); return EXIT_SUCCESS;}
开发者ID:nivertech,项目名称:zguide,代码行数:101,
示例30: do_zone//.........这里部分代码省略......... zlist_add(thing, zonemaster); zlist_add(zonemaster, thing); notify_quiet(player, "Zone Master added to object."); break; case ZONE_DELETE: if( !*tname || !*pname ) { notify_quiet(player, "This switch expects two arguments."); return; } /* Find out what the zone is */ init_match(player, pname, NOTYPE); match_everything(0); zonemaster = noisy_match_result(); if (zonemaster == NOTHING) return; init_match(player, tname, NOTYPE); match_everything(0); thing = noisy_match_result(); if( thing == NOTHING ) return; if(!zlist_inlist(thing, zonemaster)) { notify_quiet(player, "That is not one of this object's Zone Masters."); return; } /* only need to control zmo or be zonewiz to delete or control object */ if(!Controls(player, thing) && !Controls(player, zonemaster) && !could_doit(player, zonemaster, A_LZONEWIZ, 0, 0) ) { notify_quiet(player, "Permission denied."); return; } if ( (NoMod(thing) && !WizMod(player)) || (Backstage(player) && NoBackstage(thing)) ) { notify_quiet(player, "Permission denied."); return; } zlist_del(thing, zonemaster); zlist_del(zonemaster, thing); notify_quiet(player, "Deleted."); break; case ZONE_PURGE: if( !*tname || *pname) { notify_quiet(player, "This switch expects one argument."); return; } /* Find out what the zone is */ init_match(player, tname, NOTYPE); match_everything(0); thing = noisy_match_result(); if (thing == NOTHING) return; if( ZoneMaster(thing) ) { if(!Controls(player, thing) && !could_doit(player, thing, A_LZONEWIZ, 0, 0)) { notify_quiet(player, "Permission denied."); return; } if ( (NoMod(thing) && !WizMod(player)) || (Backstage(player) && NoBackstage(thing)) ) { notify_quiet(player, "Permission denied."); return; } zlist_destroy(thing); notify_quiet(player, "All objects removed from zone."); } else { if(!Controls(player, thing)) { notify_quiet(player, "Permission denied."); return; } if ( (NoMod(thing) && !WizMod(player)) || (Backstage(player) && NoBackstage(thing)) ) { notify_quiet(player, "Permission denied."); return; } zlist_destroy(thing); notify_quiet(player, "Object removed from all zones."); } break; default: notify_quiet(player, "Unknown switch!"); break; } return;}
开发者ID:pdbogen,项目名称:RhostMUSH,代码行数:101,
注:本文中的zlist_destroy函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ zlist_first函数代码示例 C++ zlist_append函数代码示例 |