本文整理汇总了C++中pwr_BindMethod函数的典型用法代码示例。如果您正苦于以下问题:C++ pwr_BindMethod函数的具体用法?C++ pwr_BindMethod怎么用?C++ pwr_BindMethod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pwr_BindMethod函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ldh_ObjidToName
/*
If father of ASup has an "ActualValue" attribute, then make this ASup
refer to this attribute.
*/
sts = ldh_ObjidToName(Session, Father, ldh_eName_Hierarchy, Name,
sizeof(Name), &size);
if (EVEN(sts)) return PWRB__SUCCESS;
strcat(Name, ".ActualValue");
sts = ldh_NameToAttrRef(Session, Name, &Attribute);
if (EVEN(sts)) return PWRB__SUCCESS;
sts = ldh_SetObjectPar(Session, Object, "RtBody", "DataName", (char *)&Attribute,
sizeof(Attribute));
if (EVEN(sts)) return PWRB__SUCCESS;
return PWRB__SUCCESS;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(DsFast) = {
pwr_BindMethod(PostCreate),
pwr_BindMethod(PostMove),
pwr_NullMethod
};
示例2: ldh_ObjidToName
sts = ldh_ObjidToName ( ip->PointedSession, ip->Pointed.Objid,
ldh_eName_Object, name, sizeof(name), &size);
if ( EVEN(sts)) return sts;
dcli_translate_filename( filename, "$pwr_exe/wb_open_db.sh");
cdh_ToLower( db_id, db_id_p);
sprintf( cmd,
"%s \"%s\" \"%s\" \"%s\" \"\" \"%s\" &",
filename, db_id, CoLogin::username(), CoLogin::ucpassword(), name);
free( db_id_p);
sts = system( cmd);
if ( sts == -1 || sts == 127) {
printf("-- Error when creating process.\n");
return sts;
}
#endif
return 1;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(DbConfig) = {
pwr_BindMethod(OpenDb),
pwr_NullMethod
};
示例3: AnteCreate
static pwr_tStatus AnteCreate (
ldh_tSesContext Session,
pwr_tObjid Father,
pwr_tClassId Class
) {
// ClassHier should be a top object or under object Class
if ( Father.oix != 0) {
pwr_tStatus sts;
pwr_tOName name;
int size;
sts = ldh_ObjidToName( Session, Father, ldh_eName_Hierarchy, name, sizeof(name), &size);
if ( EVEN(sts)) return sts;
if ( strcmp( name, "Class") != 0)
return PWRS__POSCLASSHIER;
}
return PWRS__SUCCESS;
}
pwr_dExport pwr_BindMethods($ClassHier) = {
pwr_BindMethod(AnteCreate),
pwr_NullMethod
};
示例4: msg_GetMsg
}
else {
msg_GetMsg( sts, msg, sizeof(msg));
ip->wtt->message( 'E', msg);
}
}
return LDH__SUCCESS;
}
static pwr_tStatus ConnectAttributeFilter( ldh_sMenuCall *ip)
{
return 1;
}
pwr_dExport pwr_BindMethods($Object) = {
pwr_BindMethod(CreateObject),
pwr_BindMethod(CopyObject),
pwr_BindMethod(CopyObjectTree),
pwr_BindMethod(DeleteObject),
pwr_BindMethod(DeleteObjects),
pwr_BindMethod(IsOkCopyObject),
pwr_BindMethod(IsOkCopyObjectTree),
pwr_BindMethod(IsOkCreateObject),
pwr_BindMethod(IsOkMoveObject),
pwr_BindMethod(MoveObject),
pwr_BindMethod(OpenObject),
pwr_BindMethod(OpenTemplate),
pwr_BindMethod(SetDefaults),
pwr_BindMethod(ClassHelp),
pwr_BindMethod(HelpClass),
pwr_BindMethod(HelpClassFilter),
示例5: SyntaxCheck
/* wb_c_chanao.c -- work bench methods of the ChanAo class. */
#include "pwr_baseclasses.h"
#include "wb_pwrs.h"
#include "wb_pwrb_msg.h"
/*----------------------------------------------------------------------------*\
Syntax check.
\*----------------------------------------------------------------------------*/
static pwr_tStatus SyntaxCheck(
ldh_tSesContext Session, pwr_tAttrRef Object, /* current object */
int* ErrorCount, /* accumulated error count */
int* WarningCount /* accumulated waring count */
)
{
// pwr_tStatus sts;
// sts = wsx_CheckSigChanCon( Session, Object, ErrorCount, WarningCount);
// if (EVEN(sts)) return sts;
return PWRB__SUCCESS;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(ChanAo)
= { pwr_BindMethod(SyntaxCheck), pwr_NullMethod };
示例6: pwr_BindMethods
build.opt = ip->wnav->gbl.build;
build.webgraph( ip->Pointed.Objid);
if ( build.sts() == PWRB__NOBUILT)
ip->wnav->message( 'I', "Nothing to build");
return build.sts();
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(WebGraph) = {
pwr_BindMethod(OpenGraph),
pwr_BindMethod(Build),
pwr_NullMethod
};
示例7: PostCreate
Session, Object, ErrorCount, WarningCount, wsx_mCardOption_ErrorLimits);
}
static pwr_tStatus PostCreate(
ldh_tSesContext Session, pwr_tOid Object, pwr_tOid Father, pwr_tCid Class)
{
pwr_tStatus sts;
sts = dbcb_InsertPlcThreadObject(Session, Object);
if (EVEN(sts))
return sts;
sts = ssab_SetAddress((wb_session*)Session, Object);
return sts;
}
static pwr_tStatus SetAddress(ldh_sMenuCall* ip)
{
pwr_tStatus sts;
sts = ssab_SetAddress((wb_session*)ip->PointedSession, ip->Pointed.Objid);
return sts;
}
//
// Every method to be exported to the workbench should be registred here.
//
pwr_dExport pwr_BindMethods(Ssab_BaseDoCard) = { pwr_BindMethod(SyntaxCheck),
pwr_BindMethod(PostCreate), pwr_BindMethod(SetAddress), pwr_NullMethod };
示例8: sizeof
sizeof(toid));
if ( EVEN(sts)) return sts;
}
return PWRB__SUCCESS;
}
static pwr_tStatus AnteAdopt (
ldh_tSesContext Session,
pwr_tOid Father,
pwr_tCid Class
) {
// Only allow plc window objects
if ( Class != pwr_cClass_windowplc)
return PWRB__PLCPGMCHILD;
return PWRB__SUCCESS;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(PlcPgm) = {
pwr_BindMethod(OpenProgram),
pwr_BindMethod(Build),
pwr_BindMethod(SyntaxCheck),
pwr_BindMethod(PostCreate),
pwr_BindMethod(AnteAdopt),
pwr_NullMethod
};
示例9: Build
static pwr_tStatus Build (
ldh_sMenuCall *ip
)
{
wb_build build( *(wb_session *)ip->PointedSession, ip->wnav);
build.opt = ip->wnav->gbl.build;
build.webhandler( ip->Pointed.Objid);
if ( build.sts() == PWRB__NOBUILT)
ip->wnav->message( 'I', "Nothing to build");
return build.sts();
}
static pwr_tStatus PostCreate (
ldh_tSesContext Session,
pwr_tOid Object,
pwr_tOid Father,
pwr_tCid Class
) {
// Nothing to do from V4.7.0 ...
return PWRB__SUCCESS;
}
pwr_dExport pwr_BindMethods(WebHandler) = {
pwr_BindMethod(Build),
pwr_BindMethod(PostCreate),
pwr_NullMethod
};
示例10: Build
#include "co_cdh.h"
#include "co_dcli.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "wb_wnav.h"
#include "wb_build.h"
#include "cow_msgwindow.h"
#include "ge.h"
static pwr_tStatus Build (
ldh_sMenuCall *ip
)
{
wb_build build( *(wb_session *)ip->PointedSession, ip->wnav);
build.opt = ip->wnav->gbl.build;
build.application( ip->Pointed.Objid);
if ( build.sts() == PWRB__NOBUILT)
ip->wnav->message( 'I', "Nothing to build");
return build.sts();
}
pwr_dExport pwr_BindMethods(Application) = {
pwr_BindMethod(Build),
pwr_NullMethod
};
示例11: PostCreate
return PWRS__POSSECURITY;
return PWRS__SUCCESS;
}
static pwr_tStatus PostCreate (
ldh_tSesContext Session,
pwr_tObjid Object,
pwr_tObjid Father,
pwr_tClassId Class
) {
pwr_tStatus sts;
// Set name to Security
sts = ldh_SetObjectName( Session, Object, "Security");
if ( EVEN(sts)) return sts;
return PWRS__SUCCESS;
}
pwr_dExport pwr_BindMethods($Security) = {
pwr_BindMethod(AnteCreate),
pwr_BindMethod(AnteMove),
pwr_BindMethod(PostCreate),
pwr_NullMethod
};
示例12: if
wb_attribute ca = sp->attribute(co.oid(), "RtBody", "FileName");
if (!ca)
return ca.sts();
ca.value(filename);
if ((streq(filename, "index.html")) && idx < 1)
idx = 2;
else if (sscanf(filename, "index%d.html", &i) != 0) {
if (idx <= i)
idx = i + 1;
}
if (idx > 0) {
wb_attribute a = sp->attribute(o.oid(), "RtBody", "FileName");
if (!a)
return a.sts();
sprintf(filename, "index%d.html", idx);
try {
sp->writeAttribute(a, filename, sizeof(filename));
} catch (wb_error& e) {
return e.sts();
}
}
}
return PWRB__SUCCESS;
}
pwr_dExport pwr_BindMethods(OpPlaceWeb)
= { pwr_BindMethod(Build), pwr_BindMethod(PostCreate), pwr_NullMethod };
示例13: dbcb_InsertPlcThreadObject
pwr_tStatus sts;
sts = dbcb_InsertPlcThreadObject( Session, Object);
if ( EVEN(sts)) return sts;
sts = ssab_SetAddress( (wb_session *)Session, Object);
return sts;
}
static pwr_tStatus SetAddress (
ldh_sMenuCall *ip
)
{
pwr_tStatus sts;
sts = ssab_SetAddress( (wb_session *)ip->PointedSession, ip->Pointed.Objid);
return sts;
}
//
// Every method to be exported to the workbench should be registred here.
//
pwr_dExport pwr_BindMethods(Ssab_CO4uP) = {
pwr_BindMethod(SyntaxCheck),
pwr_BindMethod(PostCreate),
pwr_BindMethod(SetAddress),
pwr_NullMethod
};
示例14: ldh_ReadAttribute
continue;
sts = ldh_ReadAttribute(ip->PointedSession, &PattrXref, &SattrXref,
sizeof(pwr_sAttrRef));
if (EVEN(sts)) return sts;
if (memcmp(&SattrXref, &TattrRef, sizeof(pwr_sAttrRef)) == 0)
break;
}
if (i >= (int)Pdim) {
return PWRS__NOTCONN;
} else {
PattrRef = TattrRef;
SattrRef = PattrXref;
}
memset(&NoRef, 0, sizeof(NoRef));
sts = ldh_WriteAttribute(ip->PointedSession, &SattrRef, &NoRef,
sizeof(pwr_sAttrRef));
sts = ldh_WriteAttribute(ip->PointedSession, &PattrRef, &NoRef,
sizeof(pwr_sAttrRef));
return sts;
}
pwr_dExport pwr_BindMethods($AttrXRef) = {
pwr_BindMethod(Connect),
pwr_BindMethod(IsOkConnect),
pwr_BindMethod(Disconnect),
pwr_BindMethod(IsOkDisconnect),
pwr_NullMethod
};
示例15: AnteMove
if (ODD(sts))
return PWRS__SECURITYALREX;
return PWRS__SUCCESS;
}
static pwr_tStatus AnteMove(ldh_tSesContext Session, pwr_tObjid Object,
pwr_tObjid Father, pwr_tObjid OldFather)
{
// Check that that the father is the same
if (!(Father.oix == OldFather.oix && Father.vid == OldFather.vid))
return PWRS__POSSECURITY;
return PWRS__SUCCESS;
}
static pwr_tStatus PostCreate(ldh_tSesContext Session, pwr_tObjid Object,
pwr_tObjid Father, pwr_tClassId Class)
{
pwr_tStatus sts;
// Set name to Security
sts = ldh_SetObjectName(Session, Object, "Security");
if (EVEN(sts))
return sts;
return PWRS__SUCCESS;
}
pwr_dExport pwr_BindMethods($Security) = { pwr_BindMethod(AnteCreate),
pwr_BindMethod(AnteMove), pwr_BindMethod(PostCreate), pwr_NullMethod };