INET Framework for OMNeT++/OMNEST
inet::IPrintableObject Class Reference

This purely virtual interface provides an abstraction for printable objects. More...

#include <IPrintableObject.h>

Inheritance diagram for inet::IPrintableObject:
inet::Chunk inet::Message inet::Packet inet::physicallayer::DimensionalTransmitterBase inet::physicallayer::IAnalogDigitalConverter inet::physicallayer::IAnalogModel inet::physicallayer::IAntenna inet::physicallayer::IAntennaGain inet::physicallayer::IArrival inet::physicallayer::IBackgroundNoise inet::physicallayer::ICode inet::physicallayer::ICommunicationCache inet::physicallayer::IDecoder inet::physicallayer::IDemodulator inet::physicallayer::IDigitalAnalogConverter inet::physicallayer::Ieee80211Channel inet::physicallayer::Ieee80211ModeSet inet::physicallayer::Ieee80211TransmissionBase inet::physicallayer::IEncoder inet::physicallayer::IErrorModel inet::physicallayer::IFecCoder inet::physicallayer::IForwardErrorCorrection inet::physicallayer::IIeee80211Band inet::physicallayer::IIeee80211DataMode inet::physicallayer::IIeee80211HeaderMode inet::physicallayer::IIeee80211Mode inet::physicallayer::IIeee80211PreambleMode inet::physicallayer::IInterference inet::physicallayer::IInterleaver inet::physicallayer::IInterleaving inet::physicallayer::ILayeredErrorModel inet::physicallayer::IListening inet::physicallayer::IListeningDecision inet::physicallayer::IMediumLimitCache inet::physicallayer::IModulation inet::physicallayer::IModulator inet::physicallayer::INeighborCache inet::physicallayer::INoise inet::physicallayer::IObstacleLoss inet::physicallayer::IPathLoss inet::physicallayer::IPropagation inet::physicallayer::IPulseFilter inet::physicallayer::IPulseShaper inet::physicallayer::IRadio inet::physicallayer::IRadioMedium inet::physicallayer::IReceiver inet::physicallayer::IReception inet::physicallayer::IReceptionDecision inet::physicallayer::IReceptionResult inet::physicallayer::IScrambler inet::physicallayer::IScrambling inet::physicallayer::ISignalAnalogModel inet::physicallayer::ISignalBitModel inet::physicallayer::ISignalPacketModel inet::physicallayer::ISignalSampleModel inet::physicallayer::ISignalSymbolModel inet::physicallayer::ISnir inet::physicallayer::ITransmission inet::physicallayer::ITransmitter inet::physicallayer::IWirelessSignal inet::physicallayer::Signal inet::TagBase

Public Types

enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 

Public Member Functions

virtual ~IPrintableObject ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const
 Prints this object to the provided output stream. More...
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Detailed Description

This purely virtual interface provides an abstraction for printable objects.

Member Enumeration Documentation

◆ PrintFlag

Enumerator
PRINT_FLAG_FORMATTED 
PRINT_FLAG_MULTILINE 
29  {
30  PRINT_FLAG_FORMATTED = (1 << 0),
31  PRINT_FLAG_MULTILINE = (1 << 1),
32  };

◆ PrintLevel

Enumerator
PRINT_LEVEL_TRACE 
PRINT_LEVEL_DEBUG 
PRINT_LEVEL_DETAIL 
PRINT_LEVEL_INFO 
PRINT_LEVEL_COMPLETE 
21  {
26  PRINT_LEVEL_COMPLETE = INT_MIN
27  };

Constructor & Destructor Documentation

◆ ~IPrintableObject()

virtual inet::IPrintableObject::~IPrintableObject ( )
inlinevirtual
35 {}

Member Function Documentation

◆ getCompleteStringRepresentation()

virtual std::string inet::IPrintableObject::getCompleteStringRepresentation ( int  evFlags = 0) const
inlinevirtual
78  {
79  std::stringstream s;
81  return s.str();
82  }

Referenced by inet::physicallayer::Radio::initialize(), and inet::physicallayer::RadioMedium::initialize().

◆ getDebugStringRepresentation()

virtual std::string inet::IPrintableObject::getDebugStringRepresentation ( int  evFlags = 0) const
inlinevirtual
66  {
67  std::stringstream s;
69  return s.str();
70  }

◆ getDetailStringRepresentation()

virtual std::string inet::IPrintableObject::getDetailStringRepresentation ( int  evFlags = 0) const
inlinevirtual
60  {
61  std::stringstream s;
63  return s.str();
64  }

◆ getInfoStringRepresentation()

virtual std::string inet::IPrintableObject::getInfoStringRepresentation ( int  evFlags = 0) const
inlinevirtual
54  {
55  std::stringstream s;
57  return s.str();
58  }

◆ getTraceStringRepresentation()

virtual std::string inet::IPrintableObject::getTraceStringRepresentation ( int  evFlags = 0) const
inlinevirtual
72  {
73  std::stringstream s;
75  return s.str();
76  }

◆ printToStream()

virtual std::ostream& inet::IPrintableObject::printToStream ( std::ostream &  stream,
int  level,
int  evFlags = 0 
) const
inlinevirtual

Prints this object to the provided output stream.

Reimplemented in inet::Packet, inet::Chunk, inet::physicallayer::RadioMedium, inet::physicallayer::Radio, inet::physicallayer::ConvolutionalCoder, inet::physicallayer::Ieee80211OfdmMode, inet::Message, inet::SequenceChunk, inet::physicallayer::MediumLimitCache, inet::physicallayer::Ieee80211OfdmDataMode, inet::physicallayer::Ieee80211HrDsssMode, inet::physicallayer::Ieee80211IrMode, inet::physicallayer::Ieee80211LayeredOfdmReceiver, inet::physicallayer::Ieee80211DsssMode, inet::physicallayer::Ieee80211LayeredOfdmTransmitter, inet::physicallayer::Ieee80211FhssMode, inet::physicallayer::DielectricObstacleLoss, inet::physicallayer::Ieee80211OfdmSignalMode, inet::physicallayer::UwbIrStochasticPathLoss, inet::physicallayer::SuiPathLoss, inet::physicallayer::Ieee80211OfdmPreambleMode, inet::physicallayer::Ieee80211YansErrorModel, inet::physicallayer::Ieee802154UwbIrTransmitter, inet::physicallayer::DimensionalTransmitterBase, inet::physicallayer::FreeSpacePathLoss, inet::physicallayer::VectorCommunicationCache, inet::physicallayer::ApskLayeredReceiver, inet::physicallayer::RicianFading, inet::physicallayer::NakagamiFading, inet::physicallayer::TwoRayGroundReflection, inet::physicallayer::NeighborListNeighborCache, inet::physicallayer::QuadTreeNeighborCache, inet::physicallayer::IdealObstacleLoss, inet::physicallayer::RayleighFading, inet::physicallayer::ApskLayeredTransmitter, inet::physicallayer::GridNeighborCache, inet::physicallayer::InterpolatingAntenna, inet::physicallayer::MapCommunicationCache, inet::physicallayer::Ieee80211NistErrorModel, inet::physicallayer::ReferenceCommunicationCache, inet::physicallayer::TransmissionBase, inet::physicallayer::Ieee80211OfdmDecoder, inet::physicallayer::Ieee80211ModeSet, inet::physicallayer::AxiallySymmetricAntenna, inet::physicallayer::ParabolicAntenna, inet::physicallayer::Ieee80211OfdmModulator, inet::physicallayer::ApskEncoder, inet::physicallayer::NarrowbandSignalAnalogModel, inet::physicallayer::CosineAntenna, inet::physicallayer::DipoleAntenna, inet::physicallayer::Ieee80211OfdmErrorModel, inet::physicallayer::Ieee80211DsssOfdmMode, inet::physicallayer::ConstantGainAntenna, inet::physicallayer::Ieee80211OfdmDecoderModule, inet::physicallayer::Ieee80211OfdmDemodulator, inet::physicallayer::UnitDiskReception, inet::physicallayer::FlatReceiverBase, inet::physicallayer::ReceptionBase, inet::physicallayer::LogNormalShadowing, inet::physicallayer::AdditiveScrambler, inet::physicallayer::WirelessSignal, inet::physicallayer::FlatTransmitterBase, inet::physicallayer::ConvolutionalCode, inet::physicallayer::Ieee80211OfdmEncoder, inet::physicallayer::Ieee80211TransmitterBase, inet::physicallayer::UnitDiskTransmitter, inet::physicallayer::LayeredReception, inet::physicallayer::LayeredReceptionResult, inet::physicallayer::Ieee80211OfdmInterleaver, inet::physicallayer::Ieee80211ReceiverBase, inet::physicallayer::Ieee802154UwbIrReceiver, inet::physicallayer::ApskDecoder, inet::physicallayer::LayeredTransmission, inet::physicallayer::DimensionalSnir, inet::physicallayer::NarrowbandTransmitterBase, inet::physicallayer::SnirReceiverBase, inet::physicallayer::Qam1024Modulation, inet::physicallayer::Qam16Modulation, inet::physicallayer::Qam256Modulation, inet::physicallayer::Qam64Modulation, inet::physicallayer::Arrival, inet::physicallayer::Ieee80211OfdmEncoderModule, inet::physicallayer::ApskDemodulator, inet::physicallayer::ApskModulator, inet::physicallayer::StochasticErrorModel, inet::physicallayer::BpskModulation, inet::physicallayer::QpskModulation, inet::physicallayer::ScalarSnir, inet::physicallayer::IsotropicAntenna, inet::physicallayer::ApskModulationBase, inet::physicallayer::NarrowbandReceiverBase, inet::physicallayer::BreakpointPathLoss, inet::physicallayer::SignalBitModel, inet::physicallayer::ApskCode, inet::physicallayer::ConstantSpeedPropagation, inet::physicallayer::Ieee80211OfdmDemodulatorModule, inet::physicallayer::Ieee80211BerTableErrorModel, inet::physicallayer::Ieee80211UnitDiskTransmitter, inet::physicallayer::NoiseDimensionalTransmitter, inet::physicallayer::UnitDiskReceiver, inet::physicallayer::UnitDiskTransmission, inet::physicallayer::DimensionalBackgroundNoise, inet::physicallayer::PropagationBase, inet::physicallayer::StochasticLayeredErrorModel, inet::physicallayer::MfskModulation, inet::physicallayer::AdditiveScramblerModule, inet::physicallayer::SignalSymbolModel, inet::physicallayer::Ieee80211OfdmInterleaverModule, inet::physicallayer::Ieee80211OfdmModulatorModule, inet::physicallayer::AntennaBase, inet::physicallayer::ListeningBase, inet::physicallayer::NarrowbandNoiseBase, inet::physicallayer::NarrowbandTransmissionBase, inet::physicallayer::MaskModulation, inet::physicallayer::MpskModulation, inet::physicallayer::MqamModulation, inet::physicallayer::ConvolutionalCoderModule, inet::physicallayer::Ieee80211OfdmCode, inet::physicallayer::Ieee80211UnitDiskReceiver, inet::physicallayer::DimensionalSignalAnalogModel, inet::physicallayer::DimensionalNoise, inet::physicallayer::DimensionalTransmission, inet::physicallayer::IsotropicDimensionalBackgroundNoise, inet::physicallayer::SnirBase, inet::physicallayer::ConstantTimePropagation, inet::physicallayer::BandListening, inet::physicallayer::ReceptionDecision, inet::physicallayer::ReceptionResult, inet::physicallayer::Ieee80211OfdmModulation, inet::physicallayer::Ieee80211DimensionalTransmitter, inet::physicallayer::ApskDimensionalReceiver, inet::physicallayer::ApskScalarReceiver, inet::physicallayer::IsotropicScalarBackgroundNoise, inet::physicallayer::FlatTransmissionBase, inet::physicallayer::NarrowbandReceptionBase, inet::physicallayer::SignalSampleModel, inet::physicallayer::Ieee80211DimensionalReceiver, inet::physicallayer::Ieee80211ScalarReceiver, inet::physicallayer::Ieee80211TransmissionBase, inet::physicallayer::Ieee802154NarrowbandDimensionalReceiver, inet::physicallayer::Ieee802154NarrowbandScalarReceiver, inet::physicallayer::Signal, inet::physicallayer::ApskDimensionalTransmitter, inet::physicallayer::SignalAnalogModel, inet::physicallayer::ScalarNoise, inet::physicallayer::ScalarReception, inet::physicallayer::NoiseBase, inet::physicallayer::AdditiveScrambling, inet::physicallayer::Interference, inet::physicallayer::Ieee80211OfdmInterleaving, inet::physicallayer::Ieee80211Channel, inet::physicallayer::ScalarSignalAnalogModel, inet::physicallayer::ScalarTransmission, inet::physicallayer::_16PpmModulation, inet::physicallayer::_2GfskModulation, inet::physicallayer::_4GfskModulation, inet::physicallayer::_4PpmModulation, inet::physicallayer::DbpskModulation, inet::physicallayer::DqpskModulation, inet::physicallayer::SignalPacketModel, inet::physicallayer::ListeningDecision, inet::physicallayer::Ieee80211ErpOfdmMode, inet::physicallayer::Ieee802154NarrowbandDimensionalTransmitter, inet::physicallayer::UnitDiskListening, inet::physicallayer::UnitDiskNoise, inet::physicallayer::Ieee80211UnitDiskTransmission, inet::physicallayer::ApskErrorModel, inet::physicallayer::Ieee80211LayeredTransmission, inet::physicallayer::IIeee80211Band, inet::physicallayer::Ieee80211DimensionalTransmission, inet::physicallayer::Ieee80211ScalarTransmission, inet::physicallayer::UnitDiskAnalogModel, inet::physicallayer::ApskLayeredErrorModel, inet::physicallayer::ApskDimensionalTransmission, inet::physicallayer::ApskScalarTransmission, inet::physicallayer::ApskScalarTransmitter, inet::physicallayer::LayeredDimensionalAnalogModel, inet::physicallayer::LayeredScalarAnalogModel, inet::physicallayer::Ieee80211ScalarTransmitter, inet::physicallayer::Ieee802154NarrowbandScalarTransmitter, inet::physicallayer::UnitDiskSnir, inet::physicallayer::DimensionalAnalogModel, inet::physicallayer::ScalarAnalogModel, inet::TagBase, and inet::physicallayer::TwoRayInterference.

40  {
41  return stream << EV_FAINT << "<object@" << static_cast<const void *>(this) << ">" << EV_NORMAL;
42  }

Referenced by inet::physicallayer::DimensionalAnalogModel::printToStream(), inet::physicallayer::LayeredDimensionalAnalogModel::printToStream(), and inet::physicallayer::NoiseDimensionalTransmitter::printToStream().

◆ printToString() [1/2]

virtual std::string inet::IPrintableObject::printToString ( ) const
inlinevirtual
44  {
45  return "";
46  }

◆ printToString() [2/2]

virtual std::string inet::IPrintableObject::printToString ( int  level,
int  evFlags = 0 
) const
inlinevirtual
48  {
49  std::stringstream s;
50  printToStream(s, level, evFlags);
51  return s.str();
52  }

The documentation for this class was generated from the following file:
inet::IPrintableObject::PRINT_LEVEL_DETAIL
@ PRINT_LEVEL_DETAIL
Definition: IPrintableObject.h:24
inet::IPrintableObject::PRINT_FLAG_MULTILINE
@ PRINT_FLAG_MULTILINE
Definition: IPrintableObject.h:31
inet::IPrintableObject::PRINT_LEVEL_INFO
@ PRINT_LEVEL_INFO
Definition: IPrintableObject.h:25
EV_FAINT
#define EV_FAINT
Definition: INETDefs.h:104
inet::IPrintableObject::PRINT_LEVEL_COMPLETE
@ PRINT_LEVEL_COMPLETE
Definition: IPrintableObject.h:26
inet::units::values::s
value< double, units::s > s
Definition: Units.h:1235
inet::IPrintableObject::PRINT_LEVEL_TRACE
@ PRINT_LEVEL_TRACE
Definition: IPrintableObject.h:22
EV_NORMAL
#define EV_NORMAL
Definition: INETDefs.h:102
inet::IPrintableObject::PRINT_FLAG_FORMATTED
@ PRINT_FLAG_FORMATTED
Definition: IPrintableObject.h:30
inet::evFlags
int evFlags
Definition: INETDefs.cc:12
inet::IPrintableObject::printToStream
virtual std::ostream & printToStream(std::ostream &stream, int level, int evFlags=0) const
Prints this object to the provided output stream.
Definition: IPrintableObject.h:40
inet::IPrintableObject::PRINT_LEVEL_DEBUG
@ PRINT_LEVEL_DEBUG
Definition: IPrintableObject.h:23