#ifndef _XFSPTRDATA_H_
#define _XFSPTRDATA_H_

#include <XFSPTR.H>
#include <Windows.h>
#include <string>
#include <vector>

// UNIT
typedef struct _XFS_UNIT {
WORD m_strBase;
WORD m_wX;
WORD m_wY;
}XFS_UNIT;

// SIZE
typedef struct _XFS_SIZE {
WORD m_wWidth;
WORD m_wHeight;
}XFS_SIZE;

// ALIGNMENT
typedef struct _XFS_ALIGNMENT {
WORD m_strAlignment;
WORD m_wXoffset;
WORD m_wYoffset;
}XFS_ALIGNMENT;

// VERSION
typedef struct _XFS_VERSION {
WORD m_wMajor;
WORD m_wMinor;
std::string m_strDate;
std::string m_strAuthor;
}XFS_VERSION;

// POSITION
typedef struct _XFS_POSITION {
WORD m_wX;
WORD m_wY;
}XFS_POSITION;

// INDEX
typedef struct _XFS_INDEX {
WORD m_wRepeatcount;
WORD m_wXoffset;
WORD m_wYoffset;
}XFS_INDEX;

// RGBCOLOR
typedef struct _XFS_RGBCOLOR {
WORD m_bRed;
WORD m_bGreen;
WORD m_bBlue;
}XFS_RGBCOLOR;

// REPEATONX
typedef struct _XFS_REPEATONX {
WORD m_wRepeatCount;
WORD m_wXoffset;
}XFS_REPEATONX;

// REPEATONY
typedef struct _XFS_REPEATONY {
WORD m_wRepeatCount;
WORD m_wYoffset;
}XFS_REPEATONY;

// PRINTAREA
typedef struct _XFS_PRINTAREA {
WORD m_wX;
WORD m_wY;
WORD m_wWidth;
WORD m_wHeight;
}XFS_PRINTAREA;

// RESTRICTED
typedef struct _XFS_RESTRICTED {
WORD m_wX;
WORD m_wY;
WORD m_wWidth;
WORD m_wHeight;
}XFS_RESTRICTED;

// XFSFIELD
typedef struct _wfs_ptr_form_field {
XFS_POSITION position;

std::string m_strFollows;
std::string m_strHeader;
std::string m_strFooter;

WORD m_strSide;

XFS_SIZE size;
XFS_INDEX index;

WORD m_strType;
WORD m_strScaling;
WORD m_strBarcode;
WORD m_strCoercivity;
WORD m_strClass;
WORD m_strAccess;
WORD m_strOverflow;

DWORD m_strStyle;
WORD m_strCase;
WORD m_strHorizontal;
WORD m_strVertical;
WORD m_strColor;

XFS_RGBCOLOR rgbColor;
WORD m_dwLanguage;
std::string m_strFont;

WORD m_dwPointSize;
WORD m_dwCpi;
WORD m_dwLpi;
std::string m_strFormat;
std::string m_strInitialValue;

// extra
std::string m_strFieldName;

void Init() {
position.m_wX = 0;
position.m_wY = 0;
m_strFollows = "";
m_strHeader = "";
m_strFooter = "";

m_strSide = 0; // FIELDSIDE_FRONT;
size.m_wWidth = 0;;
size.m_wHeight = 0;

index.m_wRepeatcount = 0;
index.m_wXoffset = 0;
index.m_wYoffset = 0;

m_strType = 0; // FIELDTYPE_TEXT;
m_strScaling = 0; // FIELDSCALING_BESTFIT;
m_strBarcode = 0; // FIELDBARCODE_NONE;
m_strCoercivity = 0; // FIELDCOERCIVITY_AUTO;
m_strClass = 1; // FIELDCLASS_OPTIONAL;
m_strAccess = 2; // FIELDACCESS_WRITE;
m_strOverflow = 0; // FIELDOVERFLOW_TERMINATE;

m_strStyle = 0; // FIELDSTYLE_NORMAL;
m_strCase = 0; // FIELDCASE_NOCHANGE;
m_strHorizontal = 0; // FIELDHORIZONTAL_LEFT;
m_strVertical = 0; // FIELDVERTICAL_BOTTOM;
m_strColor = 0; // FIELDCOLOR_BLACK;

rgbColor.m_bRed = 0;
rgbColor.m_bGreen = 0;
rgbColor.m_bBlue = 0;

m_dwLanguage = 0x0409;
m_strFont = "";
m_dwPointSize = 0;
m_dwCpi = 0;
m_dwLpi = 0;

m_strFormat = "";
m_strInitialValue = "";

m_strFieldName = "";
}
}WFSPTRFORMFIELD, *LPWFSPTRFORMFIELD;

// XFSFRAME
typedef struct _wfs_ptr_form_frame {
XFS_POSITION position;
std::string m_strFrames;
std::string m_strHeader;
std::string m_strFooter;
WORD m_strSide;

XFS_SIZE size;
XFS_REPEATONX repeatonx;
XFS_REPEATONY repeatony;

WORD m_strType;
WORD m_strClass;
WORD m_strOverflow;
DWORD m_strStyle;
WORD m_strColor;
XFS_RGBCOLOR rgbColor;
WORD m_strFillColor;
XFS_RGBCOLOR rgbFillColor;
WORD m_strFillStyle;
std::string m_strSubStsign;
std::string m_strTitle;
WORD m_strHorizontal;
WORD m_strVertical;

// extra
std::string m_strFrameName;

void Init() {
position.m_wX = 0;
position.m_wY = 0;

m_strFrames = "";
m_strHeader = "";
m_strFooter = "";

m_strSide = 0;

size.m_wWidth = 0;
size.m_wHeight = 0;

repeatonx.m_wRepeatCount = 0;
repeatonx.m_wXoffset = 0;

repeatony.m_wRepeatCount = 0;
repeatony.m_wYoffset = 0;

m_strType = 0;

m_strClass = 0; // FRAMECLASS_OPTIONAL
m_strOverflow = 0; // FRAMEOVERFLOW_TERMINATE;
m_strStyle = 0x0000; // FRAMESTYLE_SINGLE_THIN
m_strColor = 0; // FRAMECOLOR_BLACK

rgbColor.m_bRed = 0;
rgbColor.m_bGreen = 0;
rgbColor.m_bBlue = 0;

m_strFillColor = 1; // FRAMEFILLCOLOR_WHITE

rgbFillColor.m_bRed = 255;
rgbFillColor.m_bGreen = 255;
rgbFillColor.m_bBlue = 255;

m_strFillStyle = 0; // FRAMEFILLSTYLE_NONE
m_strSubStsign = "";
m_strTitle = "";
m_strHorizontal = 0; // FRAMEHORIZONTAL_LEFT
m_strVertical = 0; // FRAMEVERTICAL_TOP

m_strFrameName = "";
}
}WFSPTRFORMFRAME, *LPWFSPTRFORMFRAME;

// XFSFSUBFORM
typedef struct _wfs_ptr_form_subform {
XFS_POSITION position;
XFS_SIZE size;

std::vector<WFSPTRFORMFIELD> listFields;
std::vector<WFSPTRFORMFRAME> listFrames;

// extra
std::string m_strSubFormName;
WORD m_dwNumFields; // the number of fields
WORD m_dwNumFrames; // the number of frames
WORD m_dwSize; // size of this struct

void Init() {
m_strSubFormName = "";
}
} WFSPTRFORMSUBFORM, *LPWFSPTRFORMSUBFORM;

// XFSFFORM
typedef struct _wfs_ptr_form {
XFS_UNIT unit;
XFS_SIZE size;
XFS_ALIGNMENT alignment;

WORD m_strOrientation;
WORD m_dwSkew;
XFS_VERSION version;
WORD m_dwLanguage;
WORD m_dwCpi;
WORD m_dwLpi;
WORD m_dwPointSize;
std::string m_strCopyRight;
std::string m_strTitle;
std::string m_strComment;
std::string m_strUserPrompt;

std::vector<WFSPTRFORMFIELD> listFields;
std::vector<WFSPTRFORMFRAME> listFrames;
std::vector<WFSPTRFORMSUBFORM> listSubforms;

// extra;
std::string strFileName;
std::string m_strFormName;
std::string m_strFields;
WORD m_dwNumFields; // the number of fields
WORD m_dwNumFrames; // the number of frames
WORD m_dwNumSubForms; // the number of subformnames;
WORD m_dwSize; // size of this struct

int nLastFieldIndex;
int nLastFrameIndex;
std::vector<std::string> listTempFormKeys;
std::vector<std::string> listTempLastFieldKeys;
std::vector<std::string> listTempLastFrameKeys;

void Init() {
unit.m_strBase = WFS_FRM_ROWCOLUMN; // ROWCOLUMN
unit.m_wX = 0;
unit.m_wY = 0;

size.m_wWidth = 0;
size.m_wHeight = 0;

alignment.m_strAlignment = 0; // TOPLEFT
alignment.m_wXoffset = 0;
alignment.m_wYoffset = 0;

m_strOrientation = 0;
m_dwSkew = 0;

version.m_wMajor = 0;
version.m_wMinor = 0;
version.m_strDate = "";
version.m_strAuthor = "";

m_dwLanguage = 0x0409;
m_dwCpi = 0;
m_dwLpi = 0;
m_dwPointSize = 0;
m_strCopyRight = "";
m_strTitle = "";
m_strComment = "";
m_strUserPrompt = "";

strFileName = "";
m_strFormName = "";
m_dwNumFields = 0;
m_dwNumFrames = 0;
m_dwNumSubForms = 0;
m_dwSize = 0;

nLastFieldIndex = -1; // start from -1
nLastFrameIndex = -1; // start from -1
}
} WFSPTRFORM, *LPWFSPTRFORM;

// XFSFMEDIA
typedef struct _wfs_ptr_media {
WORD m_strType;
WORD m_strSource;
XFS_UNIT unit;
XFS_SIZE size;
XFS_PRINTAREA printArea;
XFS_RESTRICTED restricted;
WORD m_strFold;

WORD m_dwStaggering;
WORD m_dwPage;
WORD m_dwLines;

// extra
std::string strFileName;
std::string m_strMediaName;

std::vector<std::string> listTempMediaKeys;

void Init() {
m_strType = WFS_FRM_MEDIAGENERIC; // GENERIC
m_strSource = WFS_PTR_PAPERANY; // ANY

unit.m_wX = 0;
unit.m_wY = 0;

size.m_wWidth = 0;
size.m_wHeight = 0;

printArea.m_wX = 0;
printArea.m_wY = 0;
printArea.m_wWidth = 0;
printArea.m_wHeight = 0;

restricted.m_wX = 0;
restricted.m_wY = 0;
restricted.m_wWidth = 0;
restricted.m_wHeight = 0;

m_strFold = 1; // MEDIAFLOD_HORIZONTAL;
m_dwStaggering = 0;
m_dwPage = 0;
m_dwLines = 0;

strFileName = "";
m_strMediaName = "";
}
}WFSPTRMEDIA, *LPWFSPTRMEDIA;

// XFSFFIELDKEYINDEXVALUE
typedef struct _wfs_ptr_field_key_index_value {
std::string strKey;
int nIndex;
std::string strValue;
WFSPTRFORMFIELD ptrField;

void Init() {
strKey = "";
nIndex = 0;
strValue = "";
ptrField.Init();
}
}WFSPTRFIELDKEYINDEXVALUE, *LPWFSPTRFIELDKEYINDEXVALUE;
#endif

WOSA/XFS PTR Form解析库—xfsptrdata.h的更多相关文章

  1. WOSA/XFS PTR Form解析库—FormRule.h

    #ifndef _FORMRULE_H_#define _FORMRULE_H_ #include <XFSPTR.H>#include <string>#include &l ...

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

    class AFX_EX_CLASS CNuXfsForm {public: CNuXfsForm(); ~CNuXfsForm(); /******************************* ...

  3. WOSA/XFS PTR Form解析库—测试工具预览

  4. WOSA/XFS PTR FORM—基础知识

    目录 一.XFS PTR 二.XFS PTR FORM 三.Form.子Form.字段.框架.表单和媒介的定义 正文 一.XFS PTR Class Name PTR Class Identifier ...

  5. 【C++】cmdline——轻量级的C++命令行解析库

    1.说明 cmdline是一个轻量级的c++命令行参数解析工具,全部源码只有一个cmdline.h头文件. 2.代码 20171210_命令行进行解析.cpp // 20171210_命令行进行解析. ...

  6. 【转】编译quickfast解析库(沪深level2行情转码库)

     转自http://blog.csdn.net/hacode/article/details/7065889 编译quickfast解析库(沪深level2行情转码库) 目录(?)[-] 1 下载源代 ...

  7. WOSA/XFS及SP综述

    转自  http://blog.csdn.net/andyhou/article/details/6888416 前言:         写给ATM硬件和软件人员的无言歌.         希望对工作 ...

  8. 【转】adns解析库——域名解析实例(C++、linux)

    转自:http://blog.csdn.net/fty8788/article/details/7480334 adns是一个开源的dns解析库 官方文档:http://www.chiark.gree ...

  9. OC封装的TLV数据格式解析库

    作者:朱克锋 邮箱:zhukefeng@iboxpay.com 转载请注明出处:http://blog.csdn.net/linux_zkf TLV是一种可变格式,意思就是: Type类型, Leng ...

随机推荐

  1. ThreadLocal管理Connection

    ThreadLocal管理Connection 每一个用户都对应有一个单独线程,每一个线程都有一个数据库连接对象Connection对象接待它. 一个用户对应一个线程,这个线程中的Connection ...

  2. Google Chrome Native Messaging开发实录(二)Chrome Extension扩展

    接上一篇<Google Chrome Native Messaging开发实录(一)背景介绍>的项目背景,话不多说,有关Chrome Extension介绍和文档就不展开了,直接上代码. ...

  3. 为什么研发团队不适合量化KPI的绩效考核?

    研发团队(如果不是外包,不是机械性的活动)如果进行的是creative的有创造性的智力活动,那么应该不适合用量化KPI的绩效考核和激励,不应该用工时.bug数(难度大的bug可能多,测试人员可能没有经 ...

  4. Java reflect 反射学习笔记

    1. class 类的使用 万事万物皆对象 (基本数据类型, 静态成员不是面向对象), 所以我们创建的每一个类都是对象, 即类本身是java.lang.Class类的实例对象, 但是这些对象不需要 n ...

  5. Is it possible to display icons in a PopupMenu?

    I really like the new PopupMenu we got in 3.0, but I just can't display any icons next to the menu i ...

  6. HTML5本地储存sessionStorage的销毁数据问题

    前几天项目中用到了本地储存,虽然说也就是几个api,但之前有一个问题一直没有去想,我们知道本地储存分为两种,一种是临时储存,关闭浏览器后数据就会销毁,另外一种是没有时间限制的储存,我们做的这个页面比较 ...

  7. Redis开发与运维

    常用命令 redis-server启动redis redis-server /opt/redis/redis.conf    配置启动 redis-server --port 6379 --dir / ...

  8. 【IT笔试面试题整理】位操作

    如何准备: Bit manipulation can be a scary thing to many candidates, but it doesn't need to be! If you're ...

  9. BeanDefinition到Bean

    转自:http://songzi0206.iteye.com/blog/1430239 当 BeanDefinition 注册完毕以后, Spring Bean 工厂就可以随时根据需要进行实例化了.对 ...

  10. WPF 中Canvas图形移动、缩放代码

    从Flash转C#,很多内容一知半解,边摸索边前进,代码粗糙,权当留个脚印. 只是想得到一个基础的移动和缩放功能的界面,找了很久都是画线.画矩形等基础形状的代码,移动和缩放说的并不清晰,只能自己努力来 ...