133 #ifndef OPENTXS_CORE_SCRIPT_OTBYLAW_HPP
134 #define OPENTXS_CORE_SCRIPT_OTBYLAW_HPP
184 std::string str_Name, std::string str_Value,
187 std::string str_Name, int32_t nValue,
190 std::string str_Name,
bool bValue,
193 EXPORT
bool AddClause(
const char* szName,
const char* szCode);
194 EXPORT
bool AddHook(std::string str_HookName,
195 std::string str_ClauseName);
204 EXPORT
bool AddCallback(std::string str_CallbackName,
205 std::string str_ClauseName);
223 EXPORT
bool GetHooks(std::string str_HookName,
228 return static_cast<int32_t
>(m_mapVariables.size());
232 return static_cast<int32_t
>(m_mapClauses.size());
236 return static_cast<int32_t
>(m_mapCallbacks.size());
240 return static_cast<int32_t
>(m_mapHooks.size());
262 return m_pOwnerAgreement;
266 m_pOwnerAgreement = &theOwner;
269 EXPORT
OTBylaw(
const char* szName,
const char* szLanguage);
275 bool bCalculatingID =
false)
const;
280 #endif // OPENTXS_CORE_SCRIPT_OTBYLAW_HPP
EXPORT int32_t GetHookCount() const
EXPORT bool AddClause(OTClause &theClause)
EXPORT OTScriptable * GetOwnerAgreement()
EXPORT OTClause * GetClauseByIndex(int32_t nIndex)
std::multimap< std::string, std::string > mapOfHooks
EXPORT void RegisterVariablesForExecution(OTScript &theScript)
EXPORT OTClause * GetCallback(std::string str_CallbackName)
std::map< std::string, OTVariable * > mapOfVariables
EXPORT OTClause * GetCallbackByIndex(int32_t nIndex)
EXPORT bool Compare(OTBylaw &rhs)
EXPORT bool GetHooks(std::string str_HookName, mapOfClauses &theResults)
EXPORT int32_t GetClauseCount() const
std::map< std::string, OTClause * > mapOfClauses
EXPORT bool IsDirty() const
EXPORT int32_t GetCallbackCount() const
EXPORT const std::string GetHookNameByIndex(int32_t nIndex)
EXPORT OTClause * GetClause(std::string str_Name) const
EXPORT const std::string GetCallbackNameByIndex(int32_t nIndex)
EXPORT bool AddVariable(OTVariable &theVariable)
EXPORT void SetOwnerAgreement(OTScriptable &theOwner)
EXPORT bool IsDirtyImportant() const
std::map< std::string, std::string > mapOfCallbacks
EXPORT void Serialize(OTString &strAppend, bool bCalculatingID=false) const
EXPORT OTVariable * GetVariable(std::string str_Name)
EXPORT bool AddCallback(std::string str_CallbackName, std::string str_ClauseName)
EXPORT const OTString & GetName() const
EXPORT const char * GetLanguage() const
EXPORT int32_t GetVariableCount() const
EXPORT bool AddHook(std::string str_HookName, std::string str_ClauseName)
EXPORT OTVariable * GetVariableByIndex(int32_t nIndex)
EXPORT OTClause * GetHookByIndex(int32_t nIndex)