Mcalc  0.1
a machinist's calculator
Public Member Functions | Protected Attributes | List of all members
mc::Interface Class Referenceabstract

#include <interface.hpp>

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

Public Member Functions

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

Protected Attributes

Broadcasterbroadcaster
 
DataStoredata
 
std::string column_name
 

Detailed Description

The abstract base class for Sliders, ComboBoxText etc.

Constructor & Destructor Documentation

mc::Interface::Interface ( )

Constructor

mc::Interface::~Interface ( )
virtual

Virtual destructor

Member Function Documentation

std::string mc::Interface::get_column ( )

Get the name of the column that this Interface refers to, if none is set, get empty string.

virtual std::string mc::Interface::get_value ( )
pure virtual

Returns a string representation of the current value of the Interface. Subclass must implement.

Implemented in mc::Slider, mc::DummyInterface, mc::Output, mc::ComboBoxText, mc::Spinner, and mc::FileChooserButton.

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

Set the column that this Interface refers to, if the input value of the Interface directly maps to the database.

Parameters
nThe column name..
virtual void mc::Interface::set_value ( std::string  s)
pure virtual

Member Data Documentation

Broadcaster* mc::Interface::broadcaster
protected

Pointer to the broadcaster instance

std::string mc::Interface::column_name
protected

Name of column in database if this Interface refers to one

DataStore* mc::Interface::data
protected

Pointer to the datastore


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