Foxit PDF SDK
fs_ofdcustomtag.h
1 #ifndef FS_OFD_CUSTOMTAG_H_
2 #define FS_OFD_CUSTOMTAG_H_
3 
4 #include "common/fs_common.h"
5 
11 namespace foxit {
15 namespace ofd {
16 class OfficeNode;
17 
19 class CustomTag FS_FINAL : public Base {
20  public:
22  ~CustomTag();
23 
29  CustomTag(const CustomTag& other);
30 
38  CustomTag& operator = (const CustomTag& other);
39 
47  bool operator == (const CustomTag& other) const;
48 
56  bool operator != (const CustomTag& other) const;
57 
65  bool IsEmpty() const;
66 
72  String GetType();
73 
81  bool SetType(const String& type);
82 
90  bool ExtractFile(const String& file);
91 
99  bool SetFile(const String& file);
100 
101  explicit CustomTag(FS_HANDLE handle);
102 };
103 
105 class CustomTags FS_FINAL : public Base {
106  public:
108  ~CustomTags();
109 
115  CustomTags(const CustomTags& other);
116 
124  CustomTags& operator = (const CustomTags& other);
125 
133  bool operator == (const CustomTags& other) const;
134 
142  bool operator != (const CustomTags& other) const;
143 
151  bool IsEmpty() const;
152 
158  int GetCustomTagCount();
159 
168  CustomTag GetCustomTag(int index);
169 
178  CustomTag AddCustomTag(int index);
179 
188  bool CreateOfficeNodeByXmlBuffer(const void* data, size_t data_len);
189 
197  bool CreateOfficeNodeByXmlFile(const String& file_path);
198 
206  bool CreateOfficeNodeByXmlFile(const WString& file_path);
207 
216 
223 
230 
238  void BeginOfficeNode(const String& tag_name);
239 
247  void EndOfficeNode(const String& tag_name);
248 
249  explicit CustomTags(FS_HANDLE handle);
250 };
251 
252 } // namespace ofd
253 } // namespace foxit
254 
255 #endif // FS_OFD_CUSTOMTAG_H_
Definition: fs_ofdofficenode.h:25
~CustomTag()
析构函数。
bool operator==(const CustomTags &other) const
相等操作符。
bool SetType(const String &type)
设置类型。
String GetType()
获取类型。
文件读取接口。
Definition: fx_stream.h:587
Definition: fs_ofdcustomtag.h:19
宽字符串类
Definition: fx_string.h:1457
bool operator==(const CustomTag &other) const
相等操作符。
bool operator !=(const CustomTag &other) const
不相等操作符。
bool SetFile(const String &file)
通过文件设置内容。
OfficeNode CreateOfficeNode()
创建一个空的公文语义节点。
Definition: fs_ofdcustomtag.h:105
CustomTag AddCustomTag(int index)
添加一个自定义标签对象。
CustomTag(const CustomTag &other)
构造函数,通过另一个自定义标签对象。
bool IsEmpty() const
检查当前对象是否为空。
OfficeNode GetOfficeNode()
获取公文语义节点。
CustomTag GetCustomTag(int index)
获取指定索引的自定义标签对象。
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
bool CreateOfficeNodeByXmlBuffer(const void *data, size_t data_len)
通过XML缓冲区创建公文语义节点。
通用定义和类的头文件。
bool ExtractFile(const String &file)
导出内容到文件。
int GetCustomTagCount()
获取自定义标签的数量。
Definition: fs_basictypes.h:465
void BeginOfficeNode(const String &tag_name)
开始新的公文语义节点标标签。
~CustomTags()
析构函数。
CustomTag & operator=(const CustomTag &other)
赋值操作符。
Foxit命名空间。
Definition: fs_taggedpdf.h:27
字节字符串类
Definition: fx_string.h:317
bool CreateOfficeNodeByXmlFile(const String &file_path)
通过XML文件创建公文语义节点。
void EndOfficeNode(const String &tag_name)
结束当前公文语义节点标标签。
bool operator !=(const CustomTags &other) const
不相等操作符。
bool IsEmpty() const
检查当前对象是否为空。
CustomTags(const CustomTags &other)
构造函数,通过另一个自定义标签集合对象。
CustomTags & operator=(const CustomTags &other)
赋值操作符。