Passwordfile library 5.0.12
C++ library to read/write passwords from/to encrypted files
Loading...
Searching...
No Matches
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.
 
 AccountEntry (std::istream &stream)
 Constructs a new account entry which is deserialized from the specified stream.
 
 AccountEntry (const AccountEntry &other)
 Constructs a copy of the another entry.
 
 ~AccountEntry () override
 Destroys the entry.
 
EntryType type () const override
 Returns the type of the entry.
 
const std::vector< Field > & fields () const
 
std::vector< Field > & fields ()
 
void make (std::ostream &stream) const override
 Serializes the entry to the specified stream.
 
AccountEntryclone () const override
 Clones the entry.
 
void accumulateStatistics (EntryStatistics &stats) const override
 Accumulates the statistics for this account entry and its fields.
 
- Public Member Functions inherited from Io::Entry
virtual ~Entry ()
 Destroys the entry.
 
Entryoperator= (const Entry &other)=delete
 
const std::string & label () const
 Returns the label.
 
void setLabel (const std::string &label)
 Sets the label.
 
void makeLabelUnique ()
 Internally called to make the entry's label unique within the parent.
 
NodeEntryparent () const
 Returns the parent entry.
 
void setParent (NodeEntry *parent, int index=-1)
 Sets the parent for the entry.
 
int index () const
 Returns the index of the entry within its parent.
 
bool isIndirectChildOf (const NodeEntry *entry) const
 Returns an indication whether the instance is an indirect child of the specified entry.
 
std::list< std::string > path () const
 Returns the path of the entry.
 
void path (std::list< std::string > &res) const
 Stores to path of the entry in the specified list of string.
 
EntryStatistics computeStatistics () const
 Computes statistics for this entry.
 

Additional Inherited Members

- Static Public Member Functions inherited from Io::Entry
static Entryparse (std::istream &stream)
 Parses an entry from the specified stream.
 
static bool denotesNodeEntry (std::uint8_t version)
 
static constexpr EntryType denotedEntryType (std::uint8_t 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.
 
 Entry (const Entry &other)
 Constructs a copy of another entry.
 
- 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 170 of file entry.h.

Constructor & Destructor Documentation

◆ AccountEntry() [1/4]

Io::AccountEntry::AccountEntry ( )

Definition at line 436 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 443 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 451 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 480 of file entry.cpp.

◆ ~AccountEntry()

Io::AccountEntry::~AccountEntry ( )
override

Destroys the entry.

Definition at line 489 of file entry.cpp.

Member Function Documentation

◆ accumulateStatistics()

void Io::AccountEntry::accumulateStatistics ( EntryStatistics & stats) const
overridevirtual

Accumulates the statistics for this account entry and its fields.

Implements Io::Entry.

Definition at line 516 of file entry.cpp.

◆ clone()

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

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 508 of file entry.cpp.

◆ fields() [1/2]

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

Definition at line 199 of file entry.h.

◆ fields() [2/2]

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

Definition at line 194 of file entry.h.

◆ make()

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

Serializes the entry to the specified stream.

Implements Io::Entry.

Definition at line 493 of file entry.cpp.

◆ type()

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

Returns the type of the entry.

Implements Io::Entry.

Definition at line 189 of file entry.h.


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