133 #ifndef OPENTXS_EXT_INSTANTIATECONTRACT_HPP
134 #define OPENTXS_EXT_INSTANTIATECONTRACT_HPP
166 using namespace opentxs;
168 const bool bProcessed =
175 if (strFirstLine.Contains(
176 "-----BEGIN SIGNED SMARTCONTRACT-----"))
183 if (strFirstLine.Contains(
184 "-----BEGIN SIGNED PAYMENT PLAN-----"))
190 else if (strFirstLine.Contains(
191 "-----BEGIN SIGNED TRADE-----"))
197 else if (strFirstLine.Contains(
"-----BEGIN SIGNED OFFER-----")) {
201 else if (strFirstLine.Contains(
"-----BEGIN SIGNED INVOICE-----")) {
205 else if (strFirstLine.Contains(
"-----BEGIN SIGNED VOUCHER-----")) {
209 else if (strFirstLine.Contains(
"-----BEGIN SIGNED CHEQUE-----")) {
213 else if (strFirstLine.Contains(
"-----BEGIN SIGNED MESSAGE-----")) {
217 else if (strFirstLine.Contains(
"-----BEGIN SIGNED MINT-----")) {
221 else if (strFirstLine.Contains(
"-----BEGIN SIGNED FILE-----")) {
225 else if (strFirstLine.Contains(
"-----BEGIN SIGNED CASH-----")) {
229 else if (strFirstLine.Contains(
"-----BEGIN SIGNED CASH TOKEN-----")) {
233 else if (strFirstLine.Contains(
234 "-----BEGIN SIGNED LUCRE CASH TOKEN-----")) {
242 else if (strFirstLine.Contains(
"-----BEGIN SIGNED CONTRACT-----")) {
243 if (strContract.Contains(
244 "<notaryProviderContract version=\"1.0\">")) {
248 else if (strContract.Contains(
249 "<digitalAssetContract version=\"1.0\">")) {
257 if (
nullptr == pContract)
258 otOut << __FUNCTION__
259 <<
": Object type not yet supported by class factory: "
260 << strFirstLine <<
"\n";
263 otOut << __FUNCTION__
264 <<
": Failed loading contract from string (first line): "
265 << strFirstLine <<
"\n";
277 #endif // OPENTXS_EXT_INSTANTIATECONTRACT_HPP
static EXPORT Mint * MintFactory()
static EXPORT bool DearmorAndTrim(const OTString &strInput, OTString &strOutput, OTString &strFirstLine)
OTLOG_IMPORT OTLogStream otOut
static EXPORT Token * LowLevelInstantiate(const Purse &thePurse)
EXPORT bool LoadContractFromString(const OTString &theStr)