• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pwr_BindMethod函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了pwr_BindMethod函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
};
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:30,代码来源:wb_c_dsfast.cpp


示例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
};
开发者ID:jordibrus,项目名称:proview,代码行数:29,代码来源:wb_c_dbconfig.cpp


示例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
};





开发者ID:ManfredHerrmann,项目名称:proview,代码行数:24,代码来源:wb_c_classhier.cpp


示例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),
开发者ID:jordibrus,项目名称:proview,代码行数:31,代码来源:wb_c_object.cpp


示例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 };
开发者ID:siamect,项目名称:proview,代码行数:30,代码来源:wb_c_chanao.cpp


示例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
};











开发者ID:Strongc,项目名称:proview,代码行数:18,代码来源:wb_c_webgraph.cpp


示例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 };
开发者ID:siamect,项目名称:proview,代码行数:30,代码来源:wb_c_ssab_basedocard.cpp


示例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
};
开发者ID:jordibrus,项目名称:proview,代码行数:30,代码来源:wb_c_plcpgm.cpp


示例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
};

开发者ID:jordibrus,项目名称:proview,代码行数:29,代码来源:wb_c_webhandler.cpp


示例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
};

开发者ID:jordibrus,项目名称:proview,代码行数:29,代码来源:wb_c_application.cpp


示例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
};





开发者ID:ManfredHerrmann,项目名称:proview,代码行数:25,代码来源:wb_c_security.cpp


示例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 };
开发者ID:siamect,项目名称:proview,代码行数:30,代码来源:wb_c_opplaceweb.cpp


示例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
};
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:30,代码来源:wb_c_ssab_co4up.cpp


示例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
};
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:30,代码来源:wb_c_attrxref.cpp


示例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 };
开发者ID:siamect,项目名称:proview,代码行数:30,代码来源:wb_c_security.cpp


示例16: selectlist_a

    wb_attribute a = sp->attribute( &Object);
    if ( !a) return a.sts();

    // Check Attribute
    wb_attribute selectlist_a( a, 0, "EventSelectList");
    if (!selectlist_a) return selectlist_a.sts();

    selectlist_a.value( selectlist);
    if ( !selectlist_a) return selectlist_a.sts();

    bool empty = true;
    for ( unsigned int i = 0; i < sizeof(selectlist)/sizeof(selectlist[0]); i++) {
        if ( strcmp( selectlist[i], "") != 0) {
            empty = false;
            break;
        }
    }
    if ( empty)
        wsx_error_msg_str( Session, "EventSelectList is empty", Object, 'W', ErrorCount, WarningCount);

    return PWRB__SUCCESS;
}

pwr_dExport pwr_BindMethods(OpPlace) = {
    pwr_BindMethod(PostCreate),
    pwr_BindMethod(SyntaxCheck),
    pwr_NullMethod
};

开发者ID:jordibrus,项目名称:proview,代码行数:28,代码来源:wb_c_opplace.cpp


示例17: SyntaxCheck

/*----------------------------------------------------------------------------*\
  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_CheckCard( Session, Object, ErrorCount, WarningCount,
		wsx_mCardOption_DevName);
  if (EVEN(sts)) return sts;

  return PWRB__SUCCESS;
}

/*----------------------------------------------------------------------------*\
  Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/

pwr_dExport pwr_BindMethods(Do_HVDO32) = {
  pwr_BindMethod(AnteAdopt),
  pwr_BindMethod(PostUnadopt),
  pwr_BindMethod(PostAdopt),
  pwr_BindMethod(SyntaxCheck),
  pwr_NullMethod
};
开发者ID:jordibrus,项目名称:proview,代码行数:30,代码来源:wb_c_do_hvdo32.cpp


示例18: SyntaxCheck

  return PWRB__SUCCESS;
}
/*----------------------------------------------------------------------------*\
  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_CheckCard(
      Session, Object, ErrorCount, WarningCount, wsx_mCardOption_DevName);
  if (EVEN(sts))
    return sts;

  return PWRB__SUCCESS;
}

/*----------------------------------------------------------------------------*\
  Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/

pwr_dExport pwr_BindMethods(Do_HVDO32) = { pwr_BindMethod(AnteAdopt),
  pwr_BindMethod(PostUnadopt), pwr_BindMethod(PostAdopt),
  pwr_BindMethod(SyntaxCheck), pwr_NullMethod };
开发者ID:siamect,项目名称:proview,代码行数:29,代码来源:wb_c_do_hvdo32.cpp


示例19: SyntaxCheck

//

static pwr_tStatus SyntaxCheck( ldh_tSesContext Session,
                                pwr_tAttrRef Object,
                                int *ErrorCount,
                                int *WarningCount)
{
    wb_session *sp = (wb_session *)Session;
    pwr_tOid mount_oid;

    // Check Object attribute
    wb_attribute a = sp->attribute( Object.Objid, "SysBody", "Object");
    if (!a) return a.sts();

    a.value( &mount_oid);
    if ( !a) return a.sts();

    if ( cdh_ObjidIsNull( mount_oid)) {
        wsx_error_msg_str( Session, "Mounted object is missing", Object, 'E', ErrorCount, WarningCount);
    }
    return PWRS__SUCCESS;
}

//
//  Every method to be exported to the workbench should be registred here.
//
pwr_dExport pwr_BindMethods($MountObject) = {
    pwr_BindMethod(SyntaxCheck),
    pwr_NullMethod
};
开发者ID:jordibrus,项目名称:proview,代码行数:30,代码来源:wb_c_mountobject.cpp


示例20: ldh_SetObjectPar

      
      sts = ldh_SetObjectPar(ip->PointedSession, oid, "SysBody", "ButtonName", 
			     str, sizeof(pwr_tString40));
      if ( EVEN(sts)) return sts;
      
      sts = ldh_SetObjectPar(ip->PointedSession, oid, "SysBody", "RefAttribute", 
			     str, sizeof(pwr_tString40));
      if ( EVEN(sts)) return sts;
    }
  }

  if ( plctemplate) {
    sts = ldh_CreateObject( ip->PointedSession, &oid, "Code",
			    pwr_cClass_PlcTemplate,
			    ip->Pointed.Objid, ldh_eDest_IntoLast);
  }
  return PWRS__SUCCESS;
}

pwr_dExport pwr_BindMethods($ClassDef) = {
  pwr_BindMethod(AnteCreate),
  pwr_BindMethod(OpenObjectGraph),
  pwr_BindMethod(ConfigFc),
  pwr_NullMethod
};





开发者ID:Strongc,项目名称:proview,代码行数:24,代码来源:wb_c_classdef.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pwr_Return函数代码示例发布时间:2022-05-30
下一篇:
C++ pwr_Assert函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap