Passwordfile library  3.2.0
C++ library to read/write passwords from/to encrypted files
Public Member Functions | List of all members
Io::AccountEntry Class Reference

The exception that is thrown when a parsing error occurs. More...

#include <entry.h>

Inheritance diagram for Io::AccountEntry:
[legend]
Collaboration diagram for Io::AccountEntry:
[legend]

Public Member Functions

 AccountEntry ()
 
 AccountEntry (const std::string &label, NodeEntry *parent=nullptr)
 Constructs a new account entry with the specified label and parent. More...
 
 AccountEntry (std::istream &stream)
 Constructs a new account entry which is deserialized from the specified stream. More...
 
 AccountEntry (const AccountEntry &other)
 Constructs a copy of the another entry. More...
 
 ~AccountEntry ()
 Destroys the entry. More...
 
virtual EntryType type () const
 Returns the type of the entry. More...
 
const std::vector< Field > & fields () const
 
std::vector< Field > & fields ()
 
virtual void make (std::ostream &stream) const
 Serializes the entry to the specified stream. More...
 
virtual AccountEntryclone () const
 Clones the entry. More...
 
- Public Member Functions inherited from Io::Entry
virtual ~Entry ()
 Destroys the entry. More...
 
Entryoperator= (const Entry &other)=delete
 
const std::string & label () const
 Returns the label. More...
 
void setLabel (const std::string &label)
 Sets the label. More...
 
void makeLabelUnique ()
 Internally called to make the entry's label unique within the parent. More...
 
NodeEntryparent () const
 Returns the parent entry. More...
 
void setParent (NodeEntry *parent, int index=-1)
 Sets the parent for the entry. More...
 
int index () const
 Returns the index of the entry within its parent. More...
 
bool isIndirectChildOf (NodeEntry *entry) const
 Returns an indication whether the instance is an indirect child of the specified entry. More...
 
std::list< std::string > path () const
 Returns the path of the entry. More...
 
void path (std::list< std::string > &res) const
 Stores to path of the entry in the specified list of string. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Io::Entry
static Entryparse (std::istream &stream)
 Parses an entry from the specified stream. More...
 
static bool denotesNodeEntry (byte version)
 
static constexpr EntryType denotedEntryType (byte version)
 
- Protected Member Functions inherited from Io::Entry
 Entry (const std::string &label=std::string(), NodeEntry *parent=nullptr)
 Constructs a new entry with the specified label and parent. More...
 
 Entry (const Entry &other)
 Constructs a copy of another entry. More...
 
- Protected Attributes inherited from Io::Entry
std::string m_extendedData
 

Detailed Description

The exception that is thrown when a parsing error occurs.

Definition at line 151 of file entry.h.

Constructor & Destructor Documentation

◆ AccountEntry() [1/4]

Io::AccountEntry::AccountEntry ( )

Definition at line 428 of file entry.cpp.

◆ AccountEntry() [2/4]

Io::AccountEntry::AccountEntry ( const std::string &  label,
NodeEntry parent = nullptr 
)

Constructs a new account entry with the specified label and parent.

Definition at line 435 of file entry.cpp.

◆ AccountEntry() [3/4]

Io::AccountEntry::AccountEntry ( std::istream &  stream)

Constructs a new account entry which is deserialized from the specified stream.

Definition at line 443 of file entry.cpp.

◆ AccountEntry() [4/4]

Io::AccountEntry::AccountEntry ( const AccountEntry other)

Constructs a copy of the another entry.

Remarks
The copy will be parentless and thus not be embedded in the hierarchy of other. Child entries will be copied as well.

Definition at line 472 of file entry.cpp.

◆ ~AccountEntry()

Io::AccountEntry::~AccountEntry ( )

Destroys the entry.

Definition at line 481 of file entry.cpp.

Member Function Documentation

◆ clone()

AccountEntry * Io::AccountEntry::clone ( ) const
virtual

Clones the entry.

Remarks
The copy will be parentless and thus not be embedded in the hierarchy of other. Child entries will be copied as well.

Implements Io::Entry.

Definition at line 500 of file entry.cpp.

◆ fields() [1/2]

const std::vector< Field > & Io::AccountEntry::fields ( ) const
inline

Definition at line 174 of file entry.h.

◆ fields() [2/2]

std::vector< Field > & Io::AccountEntry::fields ( )
inline

Definition at line 179 of file entry.h.

◆ make()

void Io::AccountEntry::make ( std::ostream &  stream) const
virtual

Serializes the entry to the specified stream.

Implements Io::Entry.

Definition at line 485 of file entry.cpp.

◆ type()

EntryType Io::AccountEntry::type ( ) const
inlinevirtual

Returns the type of the entry.

Implements Io::Entry.

Definition at line 169 of file entry.h.


The documentation for this class was generated from the following files: