This class defines an interface for classes that can write their contents to an ostream, file descriptor or FILE pointer. More...
#include <DwmWritable.hh>

Public Member Functions | |
| virtual | ~Writable () |
| Destructor. | |
| virtual std::ostream & | Write (std::ostream &os) const =0 |
| Write to an ostream. Return the ostream. | |
| virtual ssize_t | Write (int fd) const =0 |
| Write to a file descriptor. More... | |
| virtual size_t | Write (FILE *f) const =0 |
| Write to a FILE pointer. More... | |
| virtual uint32_t | StreamedLength () const =0 |
| Returns the number of bytes that should be written if one of the Write() members is called. More... | |
This class defines an interface for classes that can write their contents to an ostream, file descriptor or FILE pointer.
|
pure virtual |
Returns the number of bytes that should be written if one of the Write() members is called.
Implemented in Dwm::Patricia< KeyType, ValueType, KeyEqual >, Dwm::Ipv4Routes< _valueT >, Dwm::Ipv4Prefix, Dwm::Ipv4TcpHeader, Dwm::Ipv4Address, Dwm::Ipv4PacketHeader, Dwm::ProcessInfo, Dwm::Rusage, Dwm::Ipv4TcpPayload, Dwm::Ipv4UdpPayload, Dwm::Ipv4UdpHeader, Dwm::Ipv4TcpPacket, Dwm::Ipv4UdpPacket, Dwm::Ipv6Prefix, Dwm::MplsLabel, Dwm::Ipv4IcmpMessage, Dwm::TimeInterval, Dwm::TimeValue, Dwm::TimeValue64, Dwm::MacAddress, Dwm::Ipv6Address, and Dwm::MplsLabelStack.
|
pure virtual |
Write to a file descriptor.
Return the number of bytes written 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::Ipv4TcpPayload, Dwm::Ipv4UdpPayload, Dwm::Ipv6Address, Dwm::Ipv4TcpPacket, Dwm::Ipv4UdpPacket, Dwm::Ipv6Prefix, Dwm::MplsLabel, Dwm::Ipv4IcmpMessage, Dwm::MacAddress, and Dwm::MplsLabelStack.
|
pure virtual |
Write to a FILE pointer.
Return 1 on success, 0 on failure (fwrite() 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::Ipv4TcpPayload, Dwm::Ipv4UdpPayload, Dwm::TimeInterval, Dwm::TimeValue, Dwm::TimeValue64, Dwm::Ipv4TcpPacket, Dwm::Ipv6Address, Dwm::Ipv4UdpPacket, Dwm::Ipv6Prefix, Dwm::MplsLabel, Dwm::Ipv4IcmpMessage, Dwm::MacAddress, and Dwm::MplsLabelStack.