Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
opentxs::OTTrackable Class Reference

#include <OTTrackable.hpp>

Inheritance diagram for opentxs::OTTrackable:
Collaboration diagram for opentxs::OTTrackable:

Public Member Functions

 OTTrackable ()
 
 OTTrackable (const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID)
 
 OTTrackable (const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID, const OTIdentifier &ACCT_ID, const OTIdentifier &USER_ID)
 
virtual ~OTTrackable ()
 
void InitTrackable ()
 
void Release_Trackable ()
 
virtual void Release ()
 
virtual void UpdateContents ()
 
virtual bool HasTransactionNum (const int64_t &lInput) const
 
virtual void GetAllTransactionNumbers (OTNumList &numlistOutput) const
 
int64_t GetTransactionNum () const
 
void SetTransactionNum (int64_t lTransactionNum)
 
const OTIdentifierGetSenderAcctID () const
 
const OTIdentifierGetSenderUserID () const
 
- Public Member Functions inherited from opentxs::OTInstrument
EXPORT OTInstrument ()
 
EXPORT OTInstrument (const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID)
 
virtual EXPORT ~OTInstrument ()
 
virtual bool SaveContractWallet (std::ofstream &ofs) const
 
void Release_Instrument ()
 
EXPORT bool VerifyCurrentDate ()
 
EXPORT bool IsExpired ()
 
time64_t GetValidFrom () const
 
time64_t GetValidTo () const
 
const OTIdentifierGetAssetID () const
 
const OTIdentifierGetServerID () const
 
void InitInstrument ()
 
- Public Member Functions inherited from opentxs::OTScriptable
virtual EXPORT void SetDisplayLabel (const std::string *pstrLabel=nullptr)
 
int32_t GetPartyCount () const
 
int32_t GetBylawCount () const
 
virtual EXPORT bool AddParty (OTParty &theParty)
 
virtual EXPORT bool AddBylaw (OTBylaw &theBylaw)
 
virtual EXPORT bool ConfirmParty (OTParty &theParty)
 
EXPORT OTPartyGetParty (std::string str_party_name) const
 
EXPORT OTBylawGetBylaw (std::string str_bylaw_name) const
 
EXPORT OTClauseGetClause (std::string str_clause_name) const
 
EXPORT OTPartyGetPartyByIndex (int32_t nIndex) const
 
EXPORT OTBylawGetBylawByIndex (int32_t nIndex) const
 
EXPORT OTPartyFindPartyBasedOnNymAsAgent (OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
 
EXPORT OTPartyFindPartyBasedOnNymAsAuthAgent (OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
 
OTPartyFindPartyBasedOnAccount (OTAccount &theAccount, OTPartyAccount **ppPartyAccount=nullptr) const
 
OTPartyFindPartyBasedOnNymIDAsAgent (const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
 
OTPartyFindPartyBasedOnNymIDAsAuthAgent (const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
 
OTPartyFindPartyBasedOnAccountID (const OTIdentifier &theAcctID, OTPartyAccount **ppPartyAccount=nullptr) const
 
OTAgentGetAgent (std::string str_agent_name) const
 
OTPartyAccountGetPartyAccount (std::string str_acct_name) const
 
OTPartyAccountGetPartyAccountByID (const OTIdentifier &theAcctID) const
 
EXPORT int32_t GetCountTransNumsNeededForAgent (std::string str_agent_name) const
 
virtual EXPORT bool VerifyNymAsAgent (OTPseudonym &theNym, OTPseudonym &theSignerNym, mapOfNyms *pmap_ALREADY_LOADED=nullptr) const
 
virtual EXPORT bool VerifyNymAsAgentForAccount (OTPseudonym &theNym, OTAccount &theAccount) const
 
bool VerifyPartyAuthorization (OTParty &theParty, OTPseudonym &theSignerNym, const OTString &strServerID, mapOfNyms *pmap_ALREADY_LOADED=nullptr, mapOfNyms *pmap_NEWLY_LOADED=nullptr, bool bBurnTransNo=false)
 
bool VerifyPartyAcctAuthorization (OTPartyAccount &thePartyAcct, OTPseudonym &theSignerNym, const OTString &strServerID, bool bBurnTransNo=false)
 
EXPORT bool VerifyThisAgainstAllPartiesSignedCopies ()
 
EXPORT bool AllPartiesHaveSupposedlyConfirmed ()
 
void RetrieveNymPointers (mapOfNyms &map_Nyms_Already_Loaded)
 
void ClearTemporaryPointers ()
 
bool GetHooks (std::string str_HookName, mapOfClauses &theResults)
 
OTClauseGetCallback (std::string str_CallbackName)
 
OTVariableGetVariable (std::string str_VarName)
 
bool IsDirty () const
 
bool IsDirtyImportant () const
 
void SetAsClean ()
 
EXPORT bool SendNoticeToAllParties (bool bSuccessMsg, OTPseudonym &theServerNym, const OTIdentifier &theServerID, const int64_t &lNewTransactionNumber, const OTString &strReference, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr) const
 
EXPORT bool CanExecuteClause (std::string str_party_name, std::string str_clause_name)
 
bool ExecuteCallback (OTClause &theCallbackClause, mapOfVariables &theParameters, OTVariable &varReturnVal)
 
virtual EXPORT void RegisterOTNativeCallsWithScript (OTScript &theScript)
 
virtual EXPORT bool Compare (OTScriptable &rhs) const
 
 OTScriptable ()
 
virtual ~OTScriptable ()
 
void UpdateContentsToString (OTString &strAppend, bool bCalculatingID) const
 
virtual EXPORT void CalculateContractID (OTIdentifier &newID) const
 
void Release_Scriptable ()
 
- Public Member Functions inherited from opentxs::OTContract
const char * GetHashType () const
 
void SetIdentifier (const OTIdentifier &theID)
 
EXPORT OTContract ()
 
EXPORT OTContract (const OTString &name, const OTString &foldername, const OTString &filename, const OTString &strID)
 
EXPORT OTContract (const OTString &strID)
 
EXPORT OTContract (const OTIdentifier &theID)
 
void Initialize ()
 
virtual EXPORT ~OTContract ()
 
EXPORT void Release_Contract ()
 
EXPORT void ReleaseSignatures ()
 
virtual EXPORT bool CreateContract (const OTString &strContract, const OTPseudonym &theSigner)
 
EXPORT bool InsertNym (const OTString &strKeyName, const OTString &strKeyValue)
 
EXPORT void GetName (OTString &strName) const
 
EXPORT void SetName (const OTString &strName)
 
virtual EXPORT bool VerifyContract ()
 
virtual EXPORT void GetIdentifier (OTIdentifier &theIdentifier) const
 
virtual EXPORT void GetIdentifier (OTString &theIdentifier) const
 
EXPORT void GetFilename (OTString &strFilename) const
 
EXPORT void GetFoldername (OTString &strFoldername) const
 
virtual EXPORT bool LoadContract ()
 
EXPORT bool LoadContract (const char *szFoldername, const char *szFilename)
 
EXPORT bool LoadContractFromString (const OTString &theStr)
 
bool LoadContractRawFile ()
 
EXPORT bool ParseRawFile ()
 
EXPORT bool SaveToContractFolder ()
 
EXPORT bool SaveContractRaw (OTString &strOutput) const
 
EXPORT bool RewriteContract (OTString &strOutput) const
 
EXPORT bool SaveContract ()
 
EXPORT bool SaveContract (const char *szFoldername, const char *szFilename)
 
virtual EXPORT void CreateContents ()
 
EXPORT void CreateInnerContents ()
 
virtual EXPORT bool SaveContents (std::ofstream &ofs) const
 
virtual EXPORT bool SaveContractWallet (OTString &strContents) const
 
virtual EXPORT bool DisplayStatistics (OTString &strContents) const
 
virtual EXPORT bool SaveContents (OTString &strContents) const
 
virtual EXPORT bool SignContract (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContractAuthent (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignWithKey (const OTAsymmetricKey &theKey, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContract (const OTPseudonym &theNym, OTSignature &theSignature, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContractAuthent (const OTPseudonym &theNym, OTSignature &theSignature, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContract (const OTAsymmetricKey &theKey, OTSignature &theSignature, const OTString &strHashType, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContract (const char *szFoldername, const char *szFilename, OTSignature &theSignature, const OTPasswordData *pPWData=nullptr)
 
virtual EXPORT bool VerifyContractID () const
 
virtual EXPORT bool VerifySignature (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr) const
 
virtual EXPORT bool VerifySigAuthent (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifyWithKey (const OTAsymmetricKey &theKey, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySignature (const OTPseudonym &theNym, const OTSignature &theSignature, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySigAuthent (const OTPseudonym &theNym, const OTSignature &theSignature, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySignature (const OTAsymmetricKey &theKey, const OTSignature &theSignature, const OTString &strHashType, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySignature (const char *szFoldername, const char *szFilename, const OTSignature &theSignature, const OTPasswordData *pPWData=nullptr) const
 
EXPORT const OTAsymmetricKeyGetContractPublicKey () const
 
EXPORT const OTPseudonymGetContractPublicNym () const
 

Protected Member Functions

void SetSenderAcctID (const OTIdentifier &ACCT_ID)
 
void SetSenderUserID (const OTIdentifier &USER_ID)
 
- Protected Member Functions inherited from opentxs::OTInstrument
virtual int32_t ProcessXMLNode (irr::io::IrrXMLReader *&xml)
 
void SetValidFrom (time64_t TIME_FROM)
 
void SetValidTo (time64_t TIME_TO)
 
void SetAssetID (const OTIdentifier &ASSET_ID)
 
void SetServerID (const OTIdentifier &SERVER_ID)
 
- Protected Member Functions inherited from opentxs::OTContract
bool LoadContractXML ()
 

Protected Attributes

int64_t m_lTransactionNum
 
OTIdentifier m_SENDER_ACCT_ID
 
OTIdentifier m_SENDER_USER_ID
 
- Protected Attributes inherited from opentxs::OTInstrument
OTIdentifier m_AssetTypeID
 
OTIdentifier m_ServerID
 
time64_t m_VALID_FROM
 
time64_t m_VALID_TO
 
- Protected Attributes inherited from opentxs::OTScriptable
mapOfParties m_mapParties
 
mapOfBylaws m_mapBylaws
 
bool m_bCalculatingID
 
bool m_bSpecifyAssetID
 
bool m_bSpecifyParties
 
OTString m_strLabel
 
- Protected Attributes inherited from opentxs::OTContract
OTString m_strName
 
OTString m_strFoldername
 
OTString m_strFilename
 
OTIdentifier m_ID
 
OTStringXML m_xmlUnsigned
 
OTString m_strRawFile
 
OTString m_strSigHashType
 
OTString m_strContractType
 
mapOfNyms m_mapNyms
 
listOfSignatures m_listSignatures
 
OTString m_strVersion
 
OTString m_strEntityShortName
 
OTString m_strEntityLongName
 
OTString m_strEntityEmail
 
OTString::Map m_mapConditions
 

Additional Inherited Members

- Static Public Member Functions inherited from opentxs::OTScriptable
static EXPORT OTScriptableInstantiateScriptable (const OTString &strInput)
 
static bool ValidateName (std::string str_name)
 
static std::string GetTime ()
 
- Static Public Member Functions inherited from opentxs::OTContract
static EXPORT bool DearmorAndTrim (const OTString &strInput, OTString &strOutput, OTString &strFirstLine)
 
static bool AddBookendsAroundContent (OTString &strOutput, const OTString &strContents, const OTString &strContractType, const OTString &strHashType, const listOfSignatures &listSignatures)
 
static EXPORT bool LoadEncodedTextField (irr::io::IrrXMLReader *&xml, OTASCIIArmor &ascOutput)
 
static EXPORT bool LoadEncodedTextField (irr::io::IrrXMLReader *&xml, OTString &strOutput)
 
static bool LoadEncodedTextFieldByName (irr::io::IrrXMLReader *&xml, OTASCIIArmor &ascOutput, const char *&szName, OTString::Map *pmapExtraVars=nullptr)
 
static bool LoadEncodedTextFieldByName (irr::io::IrrXMLReader *&xml, OTString &strOutput, const char *&szName, OTString::Map *pmapExtraVars=nullptr)
 
static bool SkipToElement (irr::io::IrrXMLReader *&xml)
 
static bool SkipToTextField (irr::io::IrrXMLReader *&xml)
 
static bool SkipAfterLoadingField (irr::io::IrrXMLReader *&xml)
 
static EXPORT bool SignFlatText (OTString &strFlatText, const OTString &strContractType, const OTPseudonym &theSigner, OTString &strOutput)
 

Detailed Description

Definition at line 147 of file OTTrackable.hpp.

Constructor & Destructor Documentation

opentxs::OTTrackable::OTTrackable ( )

Definition at line 140 of file OTTrackable.cpp.

141  : OTInstrument()
142  , m_lTransactionNum(0)
143 {
144  InitTrackable();
145 }
opentxs::OTTrackable::OTTrackable ( const OTIdentifier SERVER_ID,
const OTIdentifier ASSET_ID 
)

Definition at line 147 of file OTTrackable.cpp.

149  : OTInstrument(SERVER_ID, ASSET_ID)
150  , m_lTransactionNum(0)
151 {
152  InitTrackable();
153 }
opentxs::OTTrackable::OTTrackable ( const OTIdentifier SERVER_ID,
const OTIdentifier ASSET_ID,
const OTIdentifier ACCT_ID,
const OTIdentifier USER_ID 
)

Definition at line 155 of file OTTrackable.cpp.

159  : OTInstrument(SERVER_ID, ASSET_ID)
160  , m_lTransactionNum(0)
161 {
162  InitTrackable();
163 
164  SetSenderAcctID(ACCT_ID);
165  SetSenderUserID(USER_ID);
166 }
void SetSenderAcctID(const OTIdentifier &ACCT_ID)
void SetSenderUserID(const OTIdentifier &USER_ID)
opentxs::OTTrackable::~OTTrackable ( )
virtual

Definition at line 168 of file OTTrackable.cpp.

169 {
171 }

Member Function Documentation

void opentxs::OTTrackable::GetAllTransactionNumbers ( OTNumList numlistOutput) const
virtual

Reimplemented in opentxs::OTAgreement, and opentxs::OTSmartContract.

Definition at line 185 of file OTTrackable.cpp.

186 {
187  if (m_lTransactionNum > 0) numlistOutput.Add(m_lTransactionNum);
188 }
const OTIdentifier& opentxs::OTTrackable::GetSenderAcctID ( ) const
inline

Definition at line 176 of file OTTrackable.hpp.

177  {
178  return m_SENDER_ACCT_ID;
179  }
OTIdentifier m_SENDER_ACCT_ID
const OTIdentifier& opentxs::OTTrackable::GetSenderUserID ( ) const
inline

Definition at line 181 of file OTTrackable.hpp.

182  {
183  return m_SENDER_USER_ID;
184  }
OTIdentifier m_SENDER_USER_ID
int64_t opentxs::OTTrackable::GetTransactionNum ( ) const
inline

Definition at line 166 of file OTTrackable.hpp.

167  {
168  return m_lTransactionNum;
169  }
bool opentxs::OTTrackable::HasTransactionNum ( const int64_t &  lInput) const
virtual

Reimplemented in opentxs::OTAgreement, and opentxs::OTSmartContract.

Definition at line 180 of file OTTrackable.cpp.

181 {
182  return lInput == m_lTransactionNum;
183 }
void opentxs::OTTrackable::InitTrackable ( )

Definition at line 173 of file OTTrackable.cpp.

174 {
175  // Should never happen in practice. A child class will override it.
176  m_strContractType.Set("TRACKABLE");
177  m_lTransactionNum = 0;
178 }
EXPORT void Set(const char *data, uint32_t enforcedMaxLength=0)
Definition: OTString.cpp:1055
OTString m_strContractType
Definition: OTContract.hpp:178
void opentxs::OTTrackable::Release ( void  )
virtual

Reimplemented from opentxs::OTInstrument.

Reimplemented in opentxs::OTPaymentPlan, opentxs::OTAgreement, opentxs::OTSmartContract, opentxs::OTCronItem, opentxs::OTTrade, and opentxs::OTCheque.

Definition at line 196 of file OTTrackable.cpp.

197 {
200 
201  // Then I call this to re-initialize everything for myself.
202  InitTrackable();
203 }
virtual EXPORT void Release()
void opentxs::OTTrackable::Release_Trackable ( )

Definition at line 190 of file OTTrackable.cpp.

191 {
194 }
OTIdentifier m_SENDER_USER_ID
OTIdentifier m_SENDER_ACCT_ID
virtual EXPORT void Release()
Definition: OTData.cpp:257
void opentxs::OTTrackable::SetSenderAcctID ( const OTIdentifier ACCT_ID)
inlineprotected

Definition at line 187 of file OTTrackable.hpp.

188  {
189  m_SENDER_ACCT_ID = ACCT_ID;
190  }
OTIdentifier m_SENDER_ACCT_ID
void opentxs::OTTrackable::SetSenderUserID ( const OTIdentifier USER_ID)
inlineprotected

Definition at line 192 of file OTTrackable.hpp.

193  {
194  m_SENDER_USER_ID = USER_ID;
195  }
OTIdentifier m_SENDER_USER_ID
void opentxs::OTTrackable::SetTransactionNum ( int64_t  lTransactionNum)
inline

Definition at line 171 of file OTTrackable.hpp.

172  {
173  m_lTransactionNum = lTransactionNum;
174  }
void opentxs::OTTrackable::UpdateContents ( )
virtual

Reimplemented from opentxs::OTScriptable.

Reimplemented in opentxs::OTPaymentPlan, opentxs::OTAgreement, opentxs::OTSmartContract, opentxs::OTTrade, and opentxs::OTCheque.

Definition at line 205 of file OTTrackable.cpp.

206 {
207 }

Member Data Documentation

int64_t opentxs::OTTrackable::m_lTransactionNum
protected

Definition at line 198 of file OTTrackable.hpp.

OTIdentifier opentxs::OTTrackable::m_SENDER_ACCT_ID
protected

Definition at line 200 of file OTTrackable.hpp.

OTIdentifier opentxs::OTTrackable::m_SENDER_USER_ID
protected

Definition at line 203 of file OTTrackable.hpp.


The documentation for this class was generated from the following files: