1 /***************************************************************************
2 * Copyright (C) 2008 by Sverre Rabbelier *
3 * sverre@rabbelier.nl *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
23 #include "FieldImpls.h"
24 #include "TableImpls.h"
29 Echo::Echo(SavableManagerPtr echo
) :
40 const std::string
& Echo::getMessage() const
42 return m_echo
->getValue(db::TableImpls::Get()->ECHOS
->MESSAGE
)->getStringValue();
45 value_type
Echo::getAudibility() const
47 return m_echo
->getValue(db::TableImpls::Get()->ECHOS
->AUDIBILITY
)->getIntegerValue();
50 value_type
Echo::getVisibility() const
52 return m_echo
->getValue(db::TableImpls::Get()->ECHOS
->VISIBILITY
)->getIntegerValue();
55 void Echo::setMessage(const std::string
& message
)
58 ValuePtr
value(new FieldValue(db::TableImpls::Get()->ECHOS
->MESSAGE
, message
));
59 m_echo
->setValue(value
);
62 void Echo::setAudibility(value_type audibility
)
65 ValuePtr
value(new FieldValue(db::TableImpls::Get()->ECHOS
->AUDIBILITY
, audibility
));
66 m_echo
->setValue(value
);
69 void Echo::setVisibility(value_type visibility
)
72 ValuePtr
value(new FieldValue(db::TableImpls::Get()->ECHOS
->VISIBILITY
, visibility
));
73 m_echo
->setValue(value
);
96 return m_echo
->exists();
99 SavableManagerPtr
Echo::getManager() const
104 TableImplPtr
Echo::getTable() const
106 return m_echo
->getTable();