tagging release
[dasher.git] / trunk / Src / DasherCore / DasherComponent.cpp
blob09e790f51be78460e7ee33397b0eae575d2363bb
2 #include "../Common/Common.h"
4 #include "DasherComponent.h"
5 #include "Event.h"
6 #include "EventHandler.h"
8 using namespace Dasher;
10 CDasherComponent::CDasherComponent(Dasher::CEventHandler * pEventHandler, CSettingsStore * pSettingsStore)
11 :m_pEventHandler(pEventHandler), m_pSettingsStore(pSettingsStore) {
13 if (m_pEventHandler != NULL)
14 m_pEventHandler->RegisterListener(this);
17 CDasherComponent::~CDasherComponent() {
18 if (m_pEventHandler != NULL)
19 m_pEventHandler->UnregisterListener(this);
22 void CDasherComponent::InsertEvent(Dasher::CEvent * pEvent) {
23 m_pEventHandler->InsertEvent(pEvent);
26 bool CDasherComponent::GetBoolParameter(int iParameter) const {
27 return m_pSettingsStore->GetBoolParameter(iParameter);
29 long CDasherComponent::GetLongParameter(int iParameter) const {
30 return m_pSettingsStore->GetLongParameter(iParameter);
32 std::string CDasherComponent::GetStringParameter(int iParameter)const {
33 return m_pSettingsStore->GetStringParameter(iParameter);
35 void CDasherComponent::SetBoolParameter(int iParameter, bool bValue) const {
36 m_pSettingsStore->SetBoolParameter(iParameter, bValue);
38 void CDasherComponent::SetLongParameter(int iParameter, long lValue) const {
39 m_pSettingsStore->SetLongParameter(iParameter, lValue);
41 void CDasherComponent::SetStringParameter(int iParameter, std::string & sValue) const {
42 m_pSettingsStore->SetStringParameter(iParameter, sValue);
45 ParameterType CDasherComponent::GetParameterType(int iParameter) const {
46 if (m_pSettingsStore != NULL)
47 return m_pSettingsStore->GetParameterType(iParameter);
48 return ParamInvalid;
50 std::string CDasherComponent::GetParameterName(int iParameter) const {
51 if (m_pSettingsStore != NULL)
52 return m_pSettingsStore->GetParameterName(iParameter);
53 return "";