Mcalc  0.1
a machinist's calculator
Public Member Functions | List of all members
mc::DummyInterface Class Reference

#include <interface.hpp>

Inheritance diagram for mc::DummyInterface:
Inheritance graph
[legend]
Collaboration diagram for mc::DummyInterface:
Collaboration graph
[legend]

Public Member Functions

 DummyInterface (std::string s)
 
std::string get_value ()
 
void set_value (std::string s)
 
void set_column (std::string n)
 
std::string get_column ()
 
void notify (Event *e)
 
void broadcast ()
 
- Public Member Functions inherited from mc::Interface
 Interface ()
 
virtual ~Interface ()
 
void set_column (std::string n)
 
std::string get_column ()
 
- Public Member Functions inherited from mc::Subscriber
 Subscriber ()
 
virtual ~Subscriber ()
 

Additional Inherited Members

- Protected Attributes inherited from mc::Interface
Broadcasterbroadcaster
 
DataStoredata
 
std::string column_name
 

Detailed Description

An empty implementation of Interface that wraps a constant string value. Used for plugging gaps in a path in the datastore when there isn't a UI element for the value.

Constructor & Destructor Documentation

mc::DummyInterface::DummyInterface ( std::string  s)

Constructor sets the value of the Interface.

Parameters
sThe constant value to use.

Member Function Documentation

void mc::DummyInterface::broadcast ( )

Generates a change event and sends it to Broadcaster.

std::string mc::DummyInterface::get_column ( )

Get the column value.

std::string mc::DummyInterface::get_value ( )
virtual

Returns a string representation of the current value of the Interface.

Implements mc::Interface.

void mc::DummyInterface::notify ( Event e)
virtual

Update the Interface about change events. Used by broadcaster.

Parameters
eThe event object

Implements mc::Subscriber.

void mc::DummyInterface::set_column ( std::string  n)

Set the column name that this input maps to.

Parameters
nThe name of the column
void mc::DummyInterface::set_value ( std::string  s)
virtual

Sets the current value of the interface.

Implements mc::Interface.


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