• WOSA/XFS PTR Form解析库—头文件


    class AFX_EX_CLASS CNuXfsForm {
    public:
    CNuXfsForm();
    ~CNuXfsForm();

    /******************************************************************************
    Function:
    Set parsing Form related parameters.
    Input parameters:
    1.lpszFormDir:Form file directory
    2.lpszFormFileStr: Vertical line split file type (support access subdirectory)
    The format is as follows:
    *.form|*.wfm|*.xfs|form*.form|form*.wfm|form*.xfs
    3.lpszFormKeySetStr: The requirement of the comma division in English is to parse the Form attribute
    The format is as follows:
    UNIT,POINTSIZE,ALIGNMENT,ORIENTATION,SKEW,VERSION,LANGUAGE,CPI,LPI,SIZE,COPYRIGHT,TITLE,COMMENT,USERPROMPT
    4.lpszFieldKeySetStr: the requirement of the comma division in English is to parse the Field attribute
    The format is as follows:
    POSITION,FOLLOWS,HEADER,FOOTER,SIDE,SIZE,INDEX,TYPE,SCALING,BARCODE,COERCIVITY,CLASS,ACCESS,OVERFLOW,STYLE,CASE,HORIZONTAL,VERTICAL,COLOR,RGBCOLOR,LANGUAGE,FONT,POINTSIZE,CPI,LPI,FORMAT,INITIALVALUE
    5.bCheckValidList: Check formlist or medialist is valid when load
    6.bWriteFormLog: Write form log when query form or media

    Output parameters:
    None

    Return Value
    0:Success
    others:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_SetFormParams(
    LPSTR lpszFormDir
    , LPSTR lpszFormFileStr
    , LPSTR lpszFormKeySetStr
    , LPSTR lpszFieldKeySetStr
    , bool bCheckValidList = false
    , bool bWriteFormLog = false);

    /******************************************************************************
    Function:
    Get the list of forms available on the device..
    Input parameters:
    None

    Output parameters:
    1.lpszFormList: Form list
    2.lpNumItems: Forms count

    Return Value
    0:Success
    others:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_PtrInfFormList(
    LPSTR lpszFormList
    , int *lpNumItems);

    /******************************************************************************
    Function:
    Get the list of medias available on the device..
    Input parameters:
    None

    Output parameters:
    1.lpszMediaList: Media list
    2.pNumItems: Medias count

    Return Value
    0:Success
    others:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_PtrInfMediaList(
    LPSTR lpszMediaList
    , int *lpNumItems);

    /******************************************************************************
    Function:
    Gets the detailed description of the specified form.
    Input parameters:
    1.lpszFormName:Specified form name(NULL,empty,string)

    Output parameters:
    1.lpHeader: Form info
    2.lpNumFields :Form fields count

    Return Value
    0:Success
    -1:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_PtrInfQueryForm(
    LPSTR lpszFormName
    , LPWFSFRMHEADER lpHeader
    , int *lpNumFields);

    /******************************************************************************
    Function:
    Gets the detailed description of the specified media.
    Input parameters:
    1.lpszMediaName:Specified media name(NULL,empty,string)

    Output parameters:
    1.lpMedia: Media info

    Return Value
    0:Success
    others:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_PtrInfQueryMedia(
    LPSTR lpszMediaName
    , LPWFSFRMMEDIA lpMedia);


    /******************************************************************************
    Function:
    Gets detailed information about a single or all field description on the specified form.
    Input parameters:
    1.lpQueryField:A single or all field on the specified form(NULL,empty,string)

    Output parameters:
    1.lppFields: Form fields info

    Return Value
    0:Success
    others:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_PtrInfQueryField(
    LPWFSPTRQUERYFIELD lpQueryField
    , LPWFSFRMFIELD *lppFields);

    /******************************************************************************
    Function:
    Gets the structured definition information for the form specified for printing.
    Input parameters:
    1.lpPrintForm:Specified media name(NULL,empty,string)
    2.bSortPosition: Whether or not to sort the position

    Output parameters:
    1.lpPtrForm: Generated structured Form definition information
    2.lpPtrMedia: Generated structured Media definition information

    Return Value
    0:Success
    others:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_PtrCmdPrintForm(
    LPWFSPTRPRINTFORM lpPrintForm
    , LPWFSPTRFORM lpPtrForm
    , LPWFSPTRMEDIA lpPtrMedia
    , bool bSortPosition = false);

    /******************************************************************************
    Function:
    Gets the structured definition information for the form specified for printing.
    Input parameters:
    1.lpReadForm: Specify a form to limit read information(NULL,empty,string)

    Output parameters:
    1.lpPtrForm: Generated structured Form definition information
    2.lpPtrMedia: Generated structured Media definition information

    Return Value
    0:Success
    others:WFS_ERR_PTR_...
    ******************************************************************************/
    int NUFRM_PtrCmdReadForm(
    LPWFSPTRREADFORM lpReadForm
    , LPWFSPTRFORM lpPtrForm
    , LPWFSPTRMEDIA lpPtrMedia);

    CNuLog *m_pLog = NULL;
    char m_szFormDir[256];

    /******************************************************************************
    Extra:
    ******************************************************************************/
    int NUFRM_GetPTRFormInfo(
    LPSTR lpszFileName
    , LPSTR lpszFormName
    , LPWFSPTRFORM lpPtrForm
    , bool bSortPosition = false);

    int NUFRM_GetPTRMediaInfo(
    LPSTR lpszFileName
    , LPSTR lpszMediaName
    , LPWFSPTRMEDIA lpPtrMedia);

    int NUFRM_GetPTRFormListField(
    LPWFSPTRPRINTFORM lpPrintForm
    , LPWFSPTRFORM lpPtrForm
    , std::vector<WFSPTRFIELDKEYINDEXVALUE> &listField);

    int NUFRM_PTRPrintDoc(
    LPWFSPTRPRINTFORM lpPrintForm
    , LPWFSPTRFORM lpPtrForm
    , LPWFSPTRMEDIA lpPtrMedia
    , LPSTR lpszPrinterName
    , LPSTR lpszDefaultFont
    , float fDefalutPointSize = 10.5f);

    int NUFRM_PTRGenerateImage(
    LPWFSPTRPRINTFORM lpPrintForm
    , LPWFSPTRFORM lpPtrForm
    , LPWFSPTRMEDIA lpPtrMedia
    , LPSTR lpszCreateFileName
    , LPSTR lpszDefaultFont
    , float fDefalutPointSize = 10.5f
    , int nXmm = 0
    , int nYmm = 0
    , float fPixScale = 1.0);
    };
    typedef CNuXfsForm* (__cdecl *CNUXFSFORM)(CNuLog *pLog, char *pcExtra, DWORD dwExtra);

  • 相关阅读:
    在React中使用Redux数据流
    开发中经常遇到的一些css样式问题
    记录一下CSS outline-width 属性
    使用git stash命令保存和恢复进度
    一分钟搭建好webpack通用坏境
    二维码生成(QRCode.js)
    IE6浏览器有哪些常见的bug,缺陷或者与标准不一致的地方,如何解决
    如何进行网站性能优化
    JavaScript深拷贝与浅拷贝的理解
    新问题: 两个样式对同一个元素操作,为什么最新的样式没有起作用?(已解决)
  • 原文地址:https://www.cnblogs.com/lizhigang/p/10407135.html
Copyright © 2020-2023  润新知