#include <object.h>
Public Types | |
typedef ConexusPointer< Object > | pointer |
This typedef provides a common notation for smart pointers. | |
Public Member Functions | |
~Object () | |
Destructor does nothing. | |
const std::string & | name () |
Gets the object's name. | |
void | set_name (const std::string &n) |
Sets the object's name and emits signal_name_changed after the name has changed. | |
sigc::signal< void > | signal_name_changed () |
Accessor for the signal emitted when then name is changed. | |
Protected Member Functions | |
Object (const std::string &name=std::string()) | |
The only constructor accepts a name parameter and is protected to ensure that only children derived from Object will call the constructor directly. | |
Private Attributes | |
sigc::signal< void > | m_signal_name_changed |
Signal emitted when the name is changed. | |
std::string | m_name |
Internal storage for the object name. |
In addition to providing a common hierarchy this base class ensures that all descendants are also descendants of sigc::trackable allowing automatic signal disconnection on destruction.
This base class also provides a common mechanism for naming conexus objects.
typedef ConexusPointer<Object> Conexus::Object::pointer |
This typedef provides a common notation for smart pointers.
Reimplemented in Conexus::Address, Conexus::Endpoint, Conexus::EndpointServer, Conexus::File, Conexus::FileDescriptor, Conexus::IP, Conexus::IPv4::Address, Conexus::IPv4::IP, Conexus::IPv4::TCP, Conexus::IPv4::TCPServer, Conexus::IPv4::UDP, Conexus::IPv4::UDPPoset, Conexus::IPv6::IP, Conexus::IPv6::TCP, Conexus::IPv6::TCPServer, Conexus::IPv6::UDP, Conexus::IPv6::UDPPoset, Conexus::LL::Packet, Conexus::MessageQueue, Conexus::Pipe, Conexus::Serial, Conexus::Server, Conexus::Socket, Conexus::TTY, Conexus::NSPR::File, Conexus::NSPR::FileDescriptor, Conexus::NSPR::Socket, Conexus::NSPR::TCP, Conexus::NSPR::UDP, Conexus::NSS::SSLSocket, Conexus::SSL::IPv4::TCP, Conexus::SSL::IPv4::TCPServer, Conexus::SSL::IPv4::UDP, Conexus::SSL::IPv6::TCP, and Conexus::SSL::IPv6::TCPServer.
Conexus::Object::Object | ( | const std::string & | name = std::string() |
) | [inline, protected] |
The only constructor accepts a name parameter and is protected to ensure that only children derived from Object
will call the constructor directly.
Conexus::Object::~Object | ( | ) | [inline] |
Destructor does nothing.
const std::string& Conexus::Object::name | ( | ) | [inline] |
void Conexus::Object::set_name | ( | const std::string & | n | ) | [inline] |
Sets the object's name and emits signal_name_changed
after the name has changed.
Reimplemented in Conexus::MessageQueue.
References m_name, and m_signal_name_changed.
sigc::signal<void> Conexus::Object::signal_name_changed | ( | ) | [inline] |
std::string Conexus::Object::m_name [private] |
Internal storage for the object name.
Reimplemented in Conexus::MessageQueue.
Referenced by name(), and set_name().
sigc::signal<void> Conexus::Object::m_signal_name_changed [private] |