162 if (
nullptr != szName) m_strName.
Set(szName);
164 if (
nullptr != szCode) m_strCode = szCode;
179 if (m_strCode.
Exists())
return m_strCode.
Get();
181 return "print(\"(Empty script.)\")";
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";
204 otOut <<
"OTClause::Compare: Names don't match: " <<
GetName() <<
" / "
210 otOut <<
"OTClause::Compare: Source code for interpreted script fails "
211 "to match, on clause: " <<
GetName() <<
" \n";
void Serialize(OTString &strAppend) const
OTLOG_IMPORT OTLogStream otOut
EXPORT uint32_t GetLength() const
EXPORT const OTString & GetName() const
EXPORT void Concatenate(const char *arg,...)
EXPORT bool Exists() const
EXPORT bool SetString(const OTString &theData, bool bLineBreaks=true)
EXPORT bool Compare(const char *compare) const
EXPORT void Set(const char *data, uint32_t enforcedMaxLength=0)
EXPORT const char * GetCode() const
EXPORT const char * Get() const
OTLOG_IMPORT OTLogStream otErr
bool Compare(const OTClause &rhs) const