本文整理汇总了C++中OWNER函数的典型用法代码示例。如果您正苦于以下问题:C++ OWNER函数的具体用法?C++ OWNER怎么用?C++ OWNER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OWNER函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Button_Processor
extern MRESULT EXPENTRY Button_Processor ( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ) {
static PWINDOWPROC DefaultProcessor = 0 ;
switch ( msg ) {
case WM_CREATE: {
CLASSINFO ClassInfo ;
WinQueryClassInfo ( WinQueryAnchorBlock(hwnd), WC_BUTTON, &ClassInfo ) ;
DefaultProcessor = ClassInfo.pfnWindowProc ;
break; }
case WM_SETFOCUS: {
USHORT Id = WinQueryWindowUShort ( hwnd, QWS_ID ) ;
if ( mp2 ) {
Sys_SendMessage( hwnd, BM_SETDEFAULT, MPFROMSHORT(TRUE), 0 ) ;
Sys_SendMessage( OWNER(hwnd), WM_CONTROL, MPFROM2SHORT(Id,BN_SETFOCUS), 0 ) ;
} else {
Sys_SendMessage( hwnd, BM_SETDEFAULT, MPFROMSHORT(FALSE), 0 ) ;
Sys_SendMessage( OWNER(hwnd), WM_CONTROL, MPFROM2SHORT(Id,BN_KILLFOCUS), 0 ) ;
} /* endif */
break; }
} /* endswitch */
return ( DefaultProcessor ? DefaultProcessor ( hwnd, msg, mp1, mp2 ) : 0 ) ;
}
开发者ID:OS2World,项目名称:APP-PRODUCTIVITY-Escriba,代码行数:27,代码来源:CONTROLS.CPP
示例2: mfn_controls
const char *
mfn_controls(MFUNARGS)
{
dbref obj;
dbref obj2;
obj = mesg_dbref_raw(player, what, perms, argv[0]);
if (obj == AMBIGUOUS || obj == NOTHING || obj == UNKNOWN)
ABORT_MPI("CONTROLS","Match failed. (1)");
if (obj == PERMDENIED)
ABORT_MPI("CONTROLS","Permission denied. (1)");
if (obj == HOME) obj = DBFETCH(player)->sp.player.home;
if (argc > 1) {
obj2 = mesg_dbref_raw(player, what, perms, argv[1]);
if (obj2 == AMBIGUOUS || obj2 == NOTHING || obj2 == UNKNOWN)
ABORT_MPI("CONTROLS","Match failed. (2)");
if (obj2 == PERMDENIED)
ABORT_MPI("CONTROLS","Permission denied. (2)");
if (obj2 == HOME) obj2 = DBFETCH(player)->sp.player.home;
if (Typeof(obj2) != TYPE_PLAYER) obj2 = OWNER(obj2);
} else {
obj2 = OWNER(perms);
}
if (controls(obj2, obj)) {
return "1";
} else {
return "0";
}
}
开发者ID:GlowMUCK,项目名称:GlowMUCK,代码行数:30,代码来源:mfuns2.c
示例3: onInit
Core::Command* Jumping::
onInit()
{
// TODO return command to change texture
Base::EventManager::process(new MakeTriggerForPlatforms(OWNER(), true));
return new Jump(OWNER(), 20 * m_power);
}
开发者ID:hop-,项目名称:Mercurius,代码行数:7,代码来源:states.cpp
示例4: mesg_read_perms
int
mesg_read_perms(dbref player, dbref perms, dbref obj)
{
if ((obj == 0) || (obj == player) || (obj == perms)) return 1;
if (OWNER(perms) == OWNER(obj)) return 1;
if (Wizperms(perms)) return 1;
return 0;
}
开发者ID:CyberLeo,项目名称:protomuck,代码行数:8,代码来源:msgparse.c
示例5: blessprops_wildcard
int
blessprops_wildcard(dbref player, dbref thing, const char *dir, const char *wild, int blessp)
{
char propname[BUFFER_LEN];
char wld[BUFFER_LEN];
char buf[BUFFER_LEN];
char buf2[BUFFER_LEN];
char *ptr, *wldcrd = wld;
PropPtr propadr, pptr;
int i, cnt = 0;
int recurse = 0;
#ifdef GOD_PRIV
if(tp_strict_god_priv && !God(player) && God(OWNER(thing))) {
notify(player,"Only God may touch what is God's.");
return 0;
}
#endif
strcpyn(wld, sizeof(wld), wild);
i = strlen(wld);
if (i && wld[i - 1] == PROPDIR_DELIMITER)
strcatn(wld, sizeof(wld), "*");
for (wldcrd = wld; *wldcrd == PROPDIR_DELIMITER; wldcrd++) ;
if (!strcmp(wldcrd, "**"))
recurse = 1;
for (ptr = wldcrd; *ptr && *ptr != PROPDIR_DELIMITER; ptr++) ;
if (*ptr)
*ptr++ = '\0';
propadr = first_prop(thing, (char *) dir, &pptr, propname, sizeof(propname));
while (propadr) {
if (equalstr(wldcrd, propname)) {
snprintf(buf, sizeof(buf), "%s%c%s", dir, PROPDIR_DELIMITER, propname);
if (!Prop_System(buf) && ((!Prop_Hidden(buf) && !(PropFlags(propadr) & PROP_SYSPERMS))
|| Wizard(OWNER(player)))) {
if (!*ptr || recurse) {
cnt++;
if (blessp) {
set_property_flags(thing, buf, PROP_BLESSED);
snprintf(buf2, sizeof(buf2), "Blessed %s", buf);
} else {
clear_property_flags(thing, buf, PROP_BLESSED);
snprintf(buf2, sizeof(buf2), "Unblessed %s", buf);
}
notify(player, buf2);
}
if (recurse)
ptr = "**";
cnt += blessprops_wildcard(player, thing, buf, ptr, blessp);
}
}
propadr = next_prop(pptr, propadr, propname, sizeof(propname));
}
return cnt;
}
开发者ID:hyena,项目名称:fuzzball,代码行数:57,代码来源:wiz.c
示例6: safegetprop_strict
const char *
safegetprop_strict(dbref player, dbref what, dbref perms, const char *inbuf)
{
const char *ptr;
char bbuf[BUFFER_LEN];
char vl[32];
if (!inbuf) {
notify_nolisten(player, "PropFetch: Propname required.", 1);
return NULL;
}
while (*inbuf == PROPDIR_DELIMITER)
inbuf++;
if (!*inbuf) {
notify_nolisten(player, "PropFetch: Propname required.", 1);
return NULL;
}
strcpy(bbuf, inbuf);
if (!Archperms(perms)) {
if (Prop_Hidden(bbuf)) {
notify_nolisten(player, "PropFetch: Permission denied.", 1);
return NULL;
}
if (Prop_Private(bbuf) && OWNER(perms) != OWNER(what)) {
notify_nolisten(player, "PropFetch: Permission denied.", 1);
return NULL;
}
}
ptr = get_property_class(what, bbuf);
if (!ptr) {
int i;
i = get_property_value(what, bbuf);
if (!i) {
dbref dd;
dd = get_property_dbref(what, bbuf);
if (dd == NOTHING) {
*vl = '\0';
ptr = vl;
return ptr;
} else {
sprintf(vl, "#%d", dd);
ptr = vl;
}
} else {
sprintf(vl, "%d", i);
ptr = vl;
}
}
#ifdef COMPRESS
ptr = uncompress(ptr);
#endif
return ptr;
}
开发者ID:CyberLeo,项目名称:protomuck,代码行数:56,代码来源:msgparse.c
示例7: mesg_local_perms
int
mesg_local_perms(dbref player, dbref perms, dbref obj)
{
if (OWNER(perms) == OWNER(getloc(obj))) return 1;
if (isneighbor(perms, obj)) return 1;
if (isneighbor(player, obj)) return 1;
if (Mageperms(perms)) return 1;
if (mesg_read_perms(player, perms, obj)) return 1;
return 0;
}
开发者ID:CyberLeo,项目名称:protomuck,代码行数:10,代码来源:msgparse.c
示例8: onKeyEvent2
void OnLadder::
onKeyEvent2(Base::Event* e)
{
Core::KeyEvent* k = Core::KeyEvent::cast(e);
assert(0 != k);
if (k->mode() == Core::KeyEvent::Mode::Down
&& k->key() == Core::InputManager::Key::Jump) {
Base::EventManager::process(new Core::OnAir(OWNER()));
OWNER()->changeState(this, new Jumping);
}
}
开发者ID:hop-,项目名称:Mercurius,代码行数:11,代码来源:states.cpp
示例9: mesg_read_perms
int
mesg_read_perms(dbref player, dbref perms, dbref obj, int mesgtyp)
{
if ((obj == 0) || (obj == player) || (obj == perms))
return 1;
if (OWNER(perms) == OWNER(obj))
return 1;
if ((mesgtyp & MPI_ISBLESSED))
return 1;
return 0;
}
开发者ID:PyroMuddypaw,项目名称:fuzzball,代码行数:11,代码来源:msgparse.c
示例10: atTheSwitch
void SwitchActive::
atTheSwitch(Base::Event* e)
{
AtTheSwitch* as = AtTheSwitch::cast(e);
assert(0 != as);
if (as->switchObject() != OWNER()
&& as->status() == true) {
return;
}
OWNER()->changeState(this, new SwitchInactive);
}
开发者ID:hop-,项目名称:Mercurius,代码行数:11,代码来源:states.cpp
示例11: onToggle
void SwitchState::
onToggle(Base::Event* e)
{
ToggleTheSwitch* t = ToggleTheSwitch::cast(e);
assert(0 != t);
if (t->switchObject() != OWNER()) {
return;
}
assert(0 != OWNER());
OWNER()->changeState(this, new SwitchState(!m_status));
}
开发者ID:hop-,项目名称:Mercurius,代码行数:11,代码来源:states.cpp
示例12: mesg_dbref_strict
dbref
mesg_dbref_strict(int descr, dbref player, dbref what, dbref perms, char *buf)
{
dbref obj = mesg_dbref_raw(descr, player, what, perms, buf);
if (obj == UNKNOWN) return obj;
if (!Wizperms(perms) && OWNER(perms) != OWNER(obj)) {
obj = PERMDENIED;
}
return obj;
}
开发者ID:CyberLeo,项目名称:protomuck,代码行数:11,代码来源:msgparse.c
示例13: mesg_dbref_strict
dbref
mesg_dbref_strict(int descr, dbref player, dbref what, dbref perms, char *buf, int mesgtyp)
{
dbref obj = mesg_dbref_raw(descr, player, what, perms, buf);
if (obj == UNKNOWN)
return obj;
if (!(mesgtyp & MPI_ISBLESSED) && OWNER(perms) != OWNER(obj)) {
obj = PERMDENIED;
}
return obj;
}
开发者ID:PyroMuddypaw,项目名称:fuzzball,代码行数:12,代码来源:msgparse.c
示例14: msg_unparse_macro
static void
msg_unparse_macro(dbref player, dbref what, dbref perms, char *name, int argc, argv_typ argv, char *rest, int maxchars)
{
const char *ptr;
char *ptr2;
char buf[BUFFER_LEN];
char buf2[BUFFER_LEN];
dbref obj;
int i, p = 0;
strcpy(buf, rest);
sprintf(buf2, "_msgmacs/%s", name);
obj = what;
ptr = get_mfunc(name);
if (!ptr || !*ptr) ptr = safegetprop_strict(player, OWNER(obj), perms, buf2);
if (!ptr || !*ptr) ptr = safegetprop_limited(player, obj, OWNER(obj), perms, buf2);
if (!ptr || !*ptr) ptr = safegetprop_strict(player, 0, perms, buf2);
while (ptr && *ptr && p < (maxchars - 1)) {
if (*ptr == '\\') {
if (*(ptr+1) == 'r') {
rest[p++] = '\r';
ptr++; ptr++;
} else {
rest[p++] = *(ptr++);
rest[p++] = *(ptr++);
}
} else if (*ptr == MFUN_LEADCHAR) {
if (*(ptr+1) == MFUN_ARGSTART && isdigit(*(ptr + 2)) &&
*(ptr + 3) == MFUN_ARGEND) {
ptr++; ptr++;
i = *(ptr++) - '1';
ptr++;
if (i >= argc || i < 0) {
ptr2 = NULL;
} else {
ptr2 = argv[i];
}
while (ptr2 && *ptr2 && p < (maxchars - 1)) {
rest[p++] = *(ptr2++);
}
} else {
rest[p++] = *(ptr++);
}
} else {
rest[p++] = *(ptr++);
}
}
ptr2 = buf;
while (ptr2 && *ptr2 && p < (maxchars - 1)) {
rest[p++] = *(ptr2++);
}
rest[p] = '\0';
}
开发者ID:TealWizard,项目名称:TinyMUCK-Tapestries,代码行数:53,代码来源:msgparse.c
示例15: mesg_local_perms
int
mesg_local_perms(dbref player, dbref perms, dbref obj, int mesgtyp)
{
if (getloc(obj) != NOTHING && OWNER(perms) == OWNER(getloc(obj)))
return 1;
if (isneighbor(perms, obj))
return 1;
if (isneighbor(player, obj))
return 1;
if (mesg_read_perms(player, perms, obj, mesgtyp))
return 1;
return 0;
}
开发者ID:PyroMuddypaw,项目名称:fuzzball,代码行数:13,代码来源:msgparse.c
示例16: find_mlev
dbref
find_mlev(dbref prog, struct frame * fr, int st)
{
if ((FLAGS(prog) & STICKY) && (FLAGS(prog) & HAVEN)) {
if ((st > 1) && (TrueWizard(OWNER(prog))))
return (find_mlev(fr->caller.st[st - 1], fr, st - 1));
}
if (MLevel(prog) < MLevel(OWNER(prog))) {
return (MLevel(prog));
} else {
return (MLevel(OWNER(prog)));
}
}
开发者ID:rhencke,项目名称:fuzzball,代码行数:13,代码来源:interp.c
示例17: command
Core::Command* Jumping::
command()
{
assert(0 != OWNER()->component<Core::Physics>());
if (OWNER()->component<Core::Physics>()->velocity().y() < 0) {
OWNER()->changeState(this, new Falling);
return 0;
}
if (0 == m_count) {
return 0;
}
--m_count;
return new Jump(OWNER(), m_power);
}
开发者ID:hop-,项目名称:Mercurius,代码行数:14,代码来源:states.cpp
示例18: onLadder
void VerticalMovementState::
onLadder(Base::Event* e)
{
OnLadderEvent* ol = OnLadderEvent::cast(e);
assert(0 != ol);
if (ol->object() != OWNER()) {
return;
}
if (ol->direction() == Core::VerticalDirection::None) {
OWNER()->changeState(this, new OnLadder);
} else {
OWNER()->changeState(this, new MoveOnLadder(ol->direction()));
}
}
开发者ID:hop-,项目名称:Mercurius,代码行数:14,代码来源:states.cpp
示例19: self_statement_Or
void self_statement_Or(Or *v2548,OID v1741,OID v332)
{ GC_BIND;
{ char * v1743 = GC_STRING(check_var_string(copy_string("v_or"),v1741,v332));
new_block_void();
interface_I_class(Kernel._boolean);
princ_string(v1743);
princ_string(copy_string(";"));
breakline_void();
{ OID gc_local;
ITERATE(v1744);
bag *v1744_support;
v1744_support = GC_OBJECT(list,v2548->args);
for (START(v1744_support); NEXT(v1744);)
{ new_block_void();
statement_any(v1744,_string_(v1743),v332);
princ_string(copy_string("if ("));
princ_string(v1743);
princ_string(copy_string(" == "));
(*Generate.produce)(Generate.PRODUCER->value,
Kernel.ctrue);
princ_string(copy_string(") "));
if (Kernel._string == OWNER(v1741))
{ c_princ_string(string_v(v1741));
princ_string(copy_string(" ="));
}
expression_boolean(CTRUE,v332);
princ_string(copy_string("; "));
breakline_void();
princ_string(copy_string("else "));
}
}
if (Kernel._string == OWNER(v1741))
{ c_princ_string(string_v(v1741));
princ_string(copy_string(" = "));
expression_boolean(CFALSE,v332);
princ_string(copy_string(";"));
}
else { expression_boolean(CFALSE,v332);
princ_string(copy_string(";"));
}
{ OID gc_local;
ITERATE(v1744);
bag *v1744_support;
v1744_support = GC_OBJECT(list,v2548->args);
for (START(v1744_support); NEXT(v1744);)
close_block_void();
}
close_block_void();
}
GC_UNBIND;}
开发者ID:ycaseau,项目名称:CLAIRE3.3,代码行数:50,代码来源:gstat.cpp
示例20: self_statement_Assign
void self_statement_Assign(Assign *v2548,OID v1741,OID v332)
{ GC_BIND;
{ OID v1743 = GC_OID(v2548->var);
OID v1744 = GC_OID(v2548->arg);
ClaireBoolean * v2454 = ((boolean_I_any(v332) == CTRUE) ? ((Optimize.OPT->loop_gc == CTRUE) ? ((inner2outer_ask_any(v1744) == CTRUE) ? CTRUE: CFALSE): CFALSE): CFALSE);
OID v1745;
{ if ((v2454 == CTRUE) &&
(INHERIT(OWNER(v1744),Optimize._to_protect)))
v1745 = (*Kernel.arg)(v1744);
else v1745 = v1744;
GC_OID(v1745);}
if (Kernel._string == OWNER(v1741))
{ new_block_void();
statement_any(v1745,v1741,v332);
princ_string(copy_string(" "));
if (v2454 == CTRUE)
(*Generate.gc_protection_exp)(Generate.PRODUCER->value,
v1743,
Kernel.cfalse,
v1741,
v332);
else { ident_symbol(OBJECT(Variable,v1743)->pname);
princ_string(copy_string(" = "));
(*Kernel.c_princ)(v1741);
princ_string(copy_string(""));
}
princ_string(copy_string(";"));
close_block_void();
princ_string(copy_string(""));
}
else if (v2454 == CTRUE)
{ new_block_void();
statement_any(v1745,GC_OID((*Generate.c_string)(Generate.PRODUCER->value,
v1743)),v332);
princ_string(copy_string(" "));
(*Generate.gc_protection_exp)(Generate.PRODUCER->value,
v1743,
Kernel.ctrue,
v1743,
v332);
princ_string(copy_string(";"));
close_block_void();
princ_string(copy_string(""));
}
else statement_any(v1744,GC_OID((*Generate.c_string)(Generate.PRODUCER->value,
v1743)),v332);
}
GC_UNBIND;}
开发者ID:ycaseau,项目名称:CLAIRE3.3,代码行数:48,代码来源:gstat.cpp
注:本文中的OWNER函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论