Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::StringConfigEntry< SIZE > Class Template Reference

Implementation class for string configuration entries. More...

#include <ConfigEntry.hxx>

Inheritance diagram for openlcb::StringConfigEntry< SIZE >:
openlcb::ConfigEntryBase openlcb::ConfigReference

Public Member Functions

constexpr unsigned end_offset () const
 
string read (int fd) const
 
void write (int fd, string data) const
 
- Public Member Functions inherited from openlcb::ConfigReference
constexpr ConfigReference (unsigned offset)
 Initializes the config reference from a configuration space offset.
 
constexpr ConfigReference (const ConfigReference &ref)
 Initializes the config reference from an existing config reference.
 
constexpr unsigned offset () const
 

Static Public Member Functions

static constexpr unsigned size ()
 Storage bytes occupied by the instance in the config file.
 
static constexpr AtomConfigRenderer config_renderer ()
 
- Static Public Member Functions inherited from openlcb::ConfigEntryBase
template<typename... Args>
static constexpr GroupConfigOptions group_opts (Args... args)
 
static void handle_events (const EventOffsetCallback &fn)
 

Additional Inherited Members

- Protected Member Functions inherited from openlcb::ConfigEntryBase
template<class T >
raw_read (int fd) const
 Reads a given typed variable from the configuration file.
 
template<class T >
void raw_write (int fd, const T &value) const
 Writes a given typed variable to the configuration file.
 
void repeated_read (int fd, void *buf, size_t size) const
 Performs a reliable read from the given FD.
 
void repeated_write (int fd, const void *buf, size_t size) const
 Performs a reliable write to the given FD.
 
- Protected Attributes inherited from openlcb::ConfigReference
unsigned offset_
 zero-based offset from the beginning of the configuration file.
 

Detailed Description

template<unsigned SIZE>
class openlcb::StringConfigEntry< SIZE >

Implementation class for string configuration entries.

The template argument is the string size (total space in bytes used in the configuration space including the NULL character).

Definition at line 362 of file ConfigEntry.hxx.

Member Function Documentation

◆ config_renderer()

template<unsigned SIZE>
static constexpr AtomConfigRenderer openlcb::StringConfigEntry< SIZE >::config_renderer ( )
inlinestaticconstexpr

Definition at line 382 of file ConfigEntry.hxx.

◆ end_offset()

template<unsigned SIZE>
constexpr unsigned openlcb::StringConfigEntry< SIZE >::end_offset ( ) const
inlineconstexpr

Definition at line 377 of file ConfigEntry.hxx.

◆ read()

template<unsigned SIZE>
string openlcb::StringConfigEntry< SIZE >::read ( int  fd) const
inline

Definition at line 387 of file ConfigEntry.hxx.

◆ size()

template<unsigned SIZE>
static constexpr unsigned openlcb::StringConfigEntry< SIZE >::size ( )
inlinestaticconstexpr

Storage bytes occupied by the instance in the config file.

Returns
number of bytes that the config parser offset will be incremented by this entry.

Definition at line 372 of file ConfigEntry.hxx.

◆ write()

template<unsigned SIZE>
void openlcb::StringConfigEntry< SIZE >::write ( int  fd,
string  data 
) const
inline

Definition at line 396 of file ConfigEntry.hxx.


The documentation for this class was generated from the following file: