console/kabcclient
Handling of various input and output formats
In order to be useful address data input and output has to be possible in various formats, for example full VCards or just email addresses. More...
In order to be useful address data input and output has to be possible in various formats, for example full VCards or just email addresses.
The three main classes involved in the format handling are:
- FormatFactory: creating format implementation instances
- InputFormat: base interface for input format handlers
- OutputFormat: base interface for output format handlers
Implementations of the InputFormat interface read the text data from an C++ input stream and parse it for contact data according to the format they implement.
Implementations of the OutputFormat interface format the contact data into a pure text form according to the format they implement and then write this to a C++ output stream
Both kinds of implementations need to be added to the FormatFactory so they can be created by name.
KDE 4.4 API Reference