Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
interfacebase.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
15
#include "
messaging/asyncport.h
"
16
#include "
util/stringatom.h
"
17
18
//------------------------------------------------------------------------------
19
namespace
Interface
20
{
21
class
InterfaceBase
:
public
Messaging::AsyncPort
22
{
23
__DeclareClass
(
InterfaceBase
);
24
public
:
26
InterfaceBase
();
28
virtual
~InterfaceBase
();
29
31
virtual
void
AttachHandler
(
const
Ptr<Messaging::Handler>
& h);
33
virtual
void
Open
();
35
virtual
void
Close
();
36
38
const
Util::StringAtom
&
GetCompanyName
()
const
;
40
const
Util::StringAtom
&
GetAppName
()
const
;
42
const
Util::StringAtom
&
GetRootDirectory
()
const
;
43
44
private
:
46
void
SetCompanyName
(
const
Util::StringAtom
&
companyName
);
48
void
SetAppName
(
const
Util::StringAtom
&
appName
);
50
void
SetRootDirectory
(
const
Util::StringAtom
& dir);
51
52
Util::StringAtom
rootDirectory
;
53
Util::StringAtom
companyName
;
54
Util::StringAtom
appName
;
55
};
56
57
//------------------------------------------------------------------------------
60
inline
void
61
InterfaceBase::SetCompanyName
(
const
Util::StringAtom
& n)
62
{
63
this->
companyName
= n;
64
}
65
66
//------------------------------------------------------------------------------
69
inline
const
Util::StringAtom
&
70
InterfaceBase::GetCompanyName
()
const
71
{
72
return
this->
companyName
;
73
}
74
75
//------------------------------------------------------------------------------
78
inline
void
79
InterfaceBase::SetAppName
(
const
Util::StringAtom
& n)
80
{
81
this->
appName
= n;
82
}
83
84
//------------------------------------------------------------------------------
87
inline
const
Util::StringAtom
&
88
InterfaceBase::GetAppName
()
const
89
{
90
return
this->
appName
;
91
}
92
93
//------------------------------------------------------------------------------
96
inline
void
97
InterfaceBase::SetRootDirectory
(
const
Util::StringAtom
& d)
98
{
99
this->
rootDirectory
= d;
100
}
101
102
//------------------------------------------------------------------------------
105
inline
const
Util::StringAtom
&
106
InterfaceBase::GetRootDirectory
()
const
107
{
108
return
this->
rootDirectory
;
109
}
110
111
}
// namespace Interface
112
//------------------------------------------------------------------------------
asyncport.h
Interface::InterfaceBase::SetRootDirectory
void SetRootDirectory(const Util::StringAtom &dir)
set the root directory (default is home:)
Definition
interfacebase.h:97
Interface::InterfaceBase::~InterfaceBase
virtual ~InterfaceBase()
destructor
Definition
interfacebase.cc:29
Interface::InterfaceBase::AttachHandler
virtual void AttachHandler(const Ptr< Messaging::Handler > &h)
attach a handler to the port (call before open!)
Definition
interfacebase.cc:65
Interface::InterfaceBase::appName
Util::StringAtom appName
Definition
interfacebase.h:54
Interface::InterfaceBase::Open
virtual void Open()
open the async port
Definition
interfacebase.cc:38
Interface::InterfaceBase::GetCompanyName
const Util::StringAtom & GetCompanyName() const
get the company name
Definition
interfacebase.h:70
Interface::InterfaceBase::__DeclareClass
__DeclareClass(InterfaceBase)
Interface::InterfaceBase::GetAppName
const Util::StringAtom & GetAppName() const
get the application name
Definition
interfacebase.h:88
Interface::InterfaceBase::SetAppName
void SetAppName(const Util::StringAtom &appName)
set the application name
Definition
interfacebase.h:79
Interface::InterfaceBase::SetCompanyName
void SetCompanyName(const Util::StringAtom &companyName)
set the company name
Definition
interfacebase.h:61
Interface::InterfaceBase::Close
virtual void Close()
close the async port
Definition
interfacebase.cc:54
Interface::InterfaceBase::InterfaceBase
InterfaceBase()
constructor
Definition
interfacebase.cc:20
Interface::InterfaceBase::GetRootDirectory
const Util::StringAtom & GetRootDirectory() const
get the root directory
Definition
interfacebase.h:106
Interface::InterfaceBase::companyName
Util::StringAtom companyName
Definition
interfacebase.h:53
Interface::InterfaceBase::rootDirectory
Util::StringAtom rootDirectory
Definition
interfacebase.h:52
Messaging::AsyncPort
The AsyncPort class runs its handlers in a separate thread, so that message processing happens in a s...
Definition
asyncport.h:22
Ptr
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition
ptr.h:38
Util::StringAtom
A StringAtom.
Definition
stringatom.h:22
Interface
Definition
interfacebase.cc:12
stringatom.h
code
foundation
interface
interfacebase.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.