This class defines an interface for classes that can read their contents from an istream, file descriptor or FILE pointer. More...
#include <DwmReadable.hh>

Public Member Functions | |
| virtual | ~Readable () |
| destructor | |
| virtual std::istream & | Read (std::istream &is)=0 |
| Read from an istream. Return the istream. | |
| virtual ssize_t | Read (int fd)=0 |
| Read from a file descriptor. More... | |
| virtual size_t | Read (FILE *f)=0 |
| Read from a FILE pointer. More... | |
This class defines an interface for classes that can read their contents from an istream, file descriptor or FILE pointer.
|
pure virtual |
Read from a file descriptor.
Returns the number of bytes read on success, -1 on failure.
Implemented in Dwm::Patricia< KeyType, ValueType, KeyEqual >, Dwm::Ipv4Routes< _valueT >, Dwm::Ipv4Address, Dwm::Ipv4Prefix, Dwm::Ipv4PacketHeader, Dwm::Ipv4TcpHeader, Dwm::ProcessInfo, Dwm::Rusage, Dwm::TimeInterval, Dwm::Ipv4UdpHeader, Dwm::TimeValue, Dwm::TimeValue64, Dwm::Ipv6Address, Dwm::Ipv4TcpPacket, Dwm::Ipv4UdpPacket, Dwm::Ipv6Prefix, Dwm::MplsLabel, Dwm::MacAddress, and Dwm::MplsLabelStack.
|
pure virtual |
Read from a FILE pointer.
Returns 1 on success, 0 on failure (fread() semantics).
Implemented in Dwm::Patricia< KeyType, ValueType, KeyEqual >, Dwm::Ipv4Routes< _valueT >, Dwm::Ipv4Address, Dwm::Ipv4Prefix, Dwm::Ipv4PacketHeader, Dwm::Ipv4TcpHeader, Dwm::ProcessInfo, Dwm::Rusage, Dwm::Ipv4UdpHeader, Dwm::TimeInterval, Dwm::TimeValue, Dwm::TimeValue64, Dwm::Ipv4TcpPacket, Dwm::Ipv6Address, Dwm::Ipv4UdpPacket, Dwm::Ipv6Prefix, Dwm::MplsLabel, Dwm::MacAddress, and Dwm::MplsLabelStack.