#include <OTClause.hpp>
Definition at line 143 of file OTClause.hpp.
opentxs::OTClause::OTClause |
( |
| ) |
|
opentxs::OTClause::OTClause |
( |
const char * |
szName, |
|
|
const char * |
szCode |
|
) |
| |
Definition at line 159 of file OTClause.cpp.
162 if (
nullptr != szName) m_strName.
Set(szName);
164 if (
nullptr != szCode) m_strCode = szCode;
EXPORT void Set(const char *data, uint32_t enforcedMaxLength=0)
opentxs::OTClause::~OTClause |
( |
| ) |
|
|
virtual |
bool opentxs::OTClause::Compare |
( |
const OTClause & |
rhs | ) |
const |
Definition at line 201 of file OTClause.cpp.
204 otOut <<
"OTClause::Compare: Names don't match: " <<
GetName() <<
" / "
205 << rhs.GetName() <<
" \n";
209 if (!(m_strCode.
Compare(rhs.GetCode()))) {
210 otOut <<
"OTClause::Compare: Source code for interpreted script fails "
211 "to match, on clause: " <<
GetName() <<
" \n";
OTLOG_IMPORT OTLogStream otOut
EXPORT const OTString & GetName() const
EXPORT bool Compare(const char *compare) const
bool Compare(const OTClause &rhs) const
OTBylaw* opentxs::OTClause::GetBylaw |
( |
| ) |
const |
|
inline |
const char * opentxs::OTClause::GetCode |
( |
| ) |
const |
Definition at line 177 of file OTClause.cpp.
179 if (m_strCode.
Exists())
return m_strCode.
Get();
181 return "print(\"(Empty script.)\")";
EXPORT bool Exists() const
EXPORT const char * Get() const
EXPORT const OTString& opentxs::OTClause::GetName |
( |
| ) |
const |
|
inline |
void opentxs::OTClause::Serialize |
( |
OTString & |
strAppend | ) |
const |
Definition at line 184 of file OTClause.cpp.
187 OTASCIIArmor ascCode;
188 ascCode.SetString(m_strCode);
190 strAppend.Concatenate(
"<clause\n name=\"%s\">\n%s</clause>\n\n",
191 m_strName.
Get(), ascCode.Get());
194 strAppend.Concatenate(
"<clause\n name=\"%s\">\n%s</clause>\n\n",
195 m_strName.
Get(),
"ERROR_CLAUSE_CODE_nullptr");
196 otErr <<
"Empty script code in OTClause::Serialize()\n";
EXPORT uint32_t GetLength() const
EXPORT const char * Get() const
OTLOG_IMPORT OTLogStream otErr
void opentxs::OTClause::SetBylaw |
( |
OTBylaw & |
theBylaw | ) |
|
|
inline |
The documentation for this class was generated from the following files: