1#ifndef PASSWORD_FILE_IO_FIELD_H
2#define PASSWORD_FILE_IO_FIELD_H
18 Field(
AccountEntry *tiedAccount,
const std::string &name = std::string(),
const std::string &value = std::string());
22 const std::string &name()
const;
23 void setName(
const std::string &name);
24 const std::string &value()
const;
25 void setValue(
const std::string &value);
29 void make(std::ostream &stream)
const;
30 static bool isValidType(
int number);
44 , m_tiedAccount(nullptr)
53 return m_name.empty() && m_value.empty();
109 return m_tiedAccount;
117 return number >= 0 && number <= 1;
The exception that is thrown when a parsing error occurs.
The Field class holds field information which consists of a name and a value and is able to serialize...
void setName(const std::string &name)
Sets the name.
void setValue(const std::string &value)
Sets the value.
const std::string & name() const
Returns the name.
static bool isValidType(int number)
Returns whether the specified number is a valid field type.
const std::string & value() const
Returns the value.
void setType(FieldType type)
Sets the type.
bool isEmpty() const
Returns an indication whether the entry is empty.
FieldType type() const
Returns the type.
AccountEntry * tiedAccount() const
Returns the tied account.
std::string m_extendedData
#define PASSWORD_FILE_EXPORT
Marks the symbol to be exported by the passwordfile library.
Contains all IO related classes.