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

#include <SimTimeTextFigure.h>

Inheritance diagram for inet::SimTimeTextFigure:

Public Member Functions

void refreshDisplay () override
 
void parse (cProperty *property) override
 
const char ** getAllowedPropertyKeys () const override
 

Protected Attributes

std::string prefix
 

Member Function Documentation

◆ getAllowedPropertyKeys()

const char ** inet::SimTimeTextFigure::getAllowedPropertyKeys ( ) const
override
31 {
32  static const char *keys[32];
33  if (!keys[0]) {
34  const char *localKeys[] = {
35  PKEY_PREFIX, nullptr
36  };
37  concatArrays(keys, cTextFigure::getAllowedPropertyKeys(), localKeys);
38  }
39  return keys;
40 }

◆ parse()

void inet::SimTimeTextFigure::parse ( cProperty *  property)
override
21 {
22  cTextFigure::parse(property);
23 
24  const char *s;
25 
26  if ((s = property->getValue(PKEY_PREFIX)) != nullptr)
27  prefix = s;
28 }

◆ refreshDisplay()

void inet::SimTimeTextFigure::refreshDisplay ( )
override
16  {
17  setText((prefix + simTime().format(SimTime::getScaleExp(), ".", "'", true, "", " ")).c_str());
18 }

Member Data Documentation

◆ prefix

std::string inet::SimTimeTextFigure::prefix
protected

Referenced by parse(), and refreshDisplay().


The documentation for this class was generated from the following files:
inet::SimTimeTextFigure::prefix
std::string prefix
Definition: SimTimeTextFigure.h:18
inet::units::values::s
value< double, units::s > s
Definition: Units.h:1235
inet::keys
std::vector< K > keys(const std::map< K, V > &m)
Definition: stlutils.h:113