|
PoDoFo 1.1.0
|
This class represents a PdfName. More...
#include <PdfName.h>
Public Member Functions | |
| PdfName () | |
| Constructor to create null name (corresponds to "/") use PdfName::Null instead of this constructor. | |
| template<std::size_t N> | |
| PdfName (const char(&str)[N]) | |
| template<typename T , typename = std::enable_if_t<std::is_same_v<T, const char*>>> | |
| PdfName (T str) | |
| PdfName (const std::string_view &str) | |
| Create a new PdfName object. | |
| PdfName (const std::string &str) | |
| PdfName (charbuff &&buff) | |
| PdfName (const char &str, size_t length) | |
| This constructor is reserved for read-only string literals, use with caution. | |
| PdfName (const PdfName &rhs) | |
| Create a copy of an existing PdfName object. | |
| PdfName (PdfName &&rhs) noexcept | |
| std::string | GetEscapedName () const |
| void | Write (OutputStream &stream, PdfWriteFlags writeMode, const PdfStatefulEncrypt *encrypt, charbuff &buffer) const |
| std::string_view | GetString () const |
| bool | IsNull () const |
| std::string_view | GetRawData () const |
| PdfName & | operator= (const PdfName &rhs) |
| Assign another name to this object. | |
| PdfName & | operator= (PdfName &&rhs) noexcept |
| bool | operator== (const PdfName &rhs) const |
| compare to PdfName objects. | |
| bool | operator== (const char *str) const |
| bool | operator== (const std::string &str) const |
| bool | operator== (const std::string_view &view) const |
| bool | operator!= (const PdfName &rhs) const |
| compare two PdfName objects. | |
| bool | operator!= (const char *str) const |
| bool | operator!= (const std::string &str) const |
| bool | operator!= (const std::string_view &view) const |
| operator std::string_view () const | |
| Default cast to raw data string view. | |
Public Member Functions inherited from PoDoFo::PdfDataProvider< PdfName > | |
| std::string | ToString (PdfWriteFlags flags=PdfWriteFlags::None) const |
| Converts the current object into a string representation which can be written directly to a PDF file on disc. | |
| void | ToString (std::string &str, PdfWriteFlags flags=PdfWriteFlags::None) const |
Static Public Member Functions | |
| static PdfName | FromRaw (const bufferview &rawcontent) |
| static PdfName | FromEscaped (const std::string_view &name) |
| Create a new PdfName object from a string containing an escaped name string without the leading / . | |
Static Public Attributes | |
| static const PdfName | Null = PdfName() |
| Null name, corresponds to "/". | |
This class represents a PdfName.
Whenever a key is required you have to use a PdfName object.
PdfName are required as keys in PdfObject and PdfVariant objects.
PdfName may have a maximum length of 127 characters.
| PoDoFo::PdfName::PdfName | ( | const std::string_view & | str | ) |
Create a new PdfName object.
| str | the unescaped value of this name. Please specify the name without the leading '/'. Has to be a zero terminated string. |
| string PdfName::GetEscapedName | ( | ) | const |
There is no corresponding GetEscapedLength(), since generating the return value is somewhat expensive.
| string_view PdfName::GetRawData | ( | ) | const |
| string_view PdfName::GetString | ( | ) | const |
| bool PdfName::IsNull | ( | ) | const |
| PoDoFo::PdfName::operator std::string_view | ( | ) | const |
Default cast to raw data string view.
It's used in PdfDictionary lookup
Assign another name to this object.
| rhs | another PdfName object |