SILVERCODERS DocToText  4.0.1512
Converts DOC, XLS, XLSB, PPT, RTF, ODF (ODT, ODS, ODP), OOXML (DOCX, XLSX, PPTX), iWork (PAGES, NUMBERS, KEYNOTE), ODFXML (FODP, FODS, FODT), PDF, EML and HTML documents to plain text. Extracts metadata and annotations.
 All Classes Functions Enumerations Pages
attachment.h
1 #ifndef DOCTOTEXT_ATTACHMENT_H
2 #define DOCTOTEXT_ATTACHMENT_H
3 
4 #include <map>
5 #include <string>
6 #include "variant.h"
7 
8 namespace doctotext
9 {
16  class Attachment
17  {
18  private:
19  struct Implementation;
20  Implementation* impl;
21 
22  public:
23  Attachment();
24  Attachment(const std::string& file_name);
25  Attachment(const Attachment& attachment);
26  Attachment& operator = (const Attachment& attachment);
27  ~Attachment();
28  void setFileName(const std::string& file_name);
29  void setBinaryContent(const std::string& binary_content);
30  void addField(const std::string& field_name, const Variant& field_value);
31 
33  const char* filename() const;
34 
36  const char* binaryContent() const;
37 
39  size_t binaryContentSize() const;
40 
42  bool hasField(const std::string& field_name) const;
43 
45  const Variant& getField(const std::string& field_name) const;
46 
48  const std::map<std::string, Variant>& getFields() const;
49  };
50 }
51 
52 #endif