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

#include <OTStorage.hpp>

Public Member Functions

 InitOTDBDetails ()
 
 ~InitOTDBDetails ()
 

Detailed Description

Definition at line 297 of file OTStorage.hpp.

Constructor & Destructor Documentation

opentxs::OTDB::InitOTDBDetails::InitOTDBDetails ( )

Definition at line 350 of file OTStorage.cpp.

351 {
352 #if defined(OTDB_MESSAGE_PACK) || defined(OTDB_PROTOCOL_BUFFERS)
353  OT_ASSERT(nullptr == details::pFunctionMap);
355 
356  OT_ASSERT(nullptr != details::pFunctionMap);
358 #endif
359 
360 #if defined(OTDB_MESSAGE_PACK)
361  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_STRING)] =
362  &StringMsgpack::Instantiate;
363  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_BLOB)] =
364  &BlobMsgpack::Instantiate;
365  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_STRING_MAP)] =
366  &StringMapMsgpack::Instantiate;
367  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_WALLET_DATA)] =
368  &WalletDataMsgpack::Instantiate;
369  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_BITCOIN_ACCT)] =
370  &BitcoinAcctMsgpack::Instantiate;
371  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_BITCOIN_SERVER)] =
372  &BitcoinServerMsgpack::Instantiate;
373  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_RIPPLE_SERVER)] =
374  &RippleServerMsgpack::Instantiate;
375  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_LOOM_SERVER)] =
376  &LoomServerMsgpack::Instantiate;
377  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_SERVER_INFO)] =
378  &ServerInfoMsgpack::Instantiate;
379  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_CONTACT_ACCT)] =
380  &ContactAcctMsgpack::Instantiate;
381  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_CONTACT_NYM)] =
382  &ContactNymMsgpack::Instantiate;
383  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_CONTACT)] =
384  &ContactMsgpack::Instantiate;
385  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_ADDRESS_BOOK)] =
386  &AddressBookMsgpack::Instantiate;
387  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_MARKET_DATA)] =
388  &MarketDataMsgpack::Instantiate;
389  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_MARKET_LIST)] =
390  &MarketListMsgpack::Instantiate;
391  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_BID_DATA)] =
392  &BidDataMsgpack::Instantiate;
393  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_ASK_DATA)] =
394  &AskDataMsgpack::Instantiate;
395  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_OFFER_LIST_MARKET)] =
396  &OfferListMarketMsgpack::Instantiate;
397  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_TRADE_DATA_MARKET)] =
398  &TradeDataMarketMsgpack::Instantiate;
399  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_TRADE_LIST_MARKET)] =
400  &TradeListMarketMsgpack::Instantiate;
401  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_OFFER_DATA_NYM)] =
402  &OfferDataNymMsgpack::Instantiate;
403  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_OFFER_LIST_NYM)] =
404  &OfferListNymMsgpack::Instantiate;
405  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_TRADE_DATA_NYM)] =
406  &TradeDataNymMsgpack::Instantiate;
407  theMap[std::make_pair(PACK_MESSAGE_PACK, STORED_OBJ_TRADE_LIST_NYM)] =
408  &TradeListNymMsgpack::Instantiate;
409 #endif
410 
411 #if defined(OTDB_PROTOCOL_BUFFERS)
412  GOOGLE_PROTOBUF_VERIFY_VERSION;
413  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_STRING)] =
414  &StringPB::Instantiate;
415  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_BLOB)] =
416  &BlobPB::Instantiate;
417  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_STRING_MAP)] =
418  &StringMapPB::Instantiate;
419  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_WALLET_DATA)] =
420  &WalletDataPB::Instantiate;
421  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_BITCOIN_ACCT)] =
422  &BitcoinAcctPB::Instantiate;
423  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_BITCOIN_SERVER)] =
424  &BitcoinServerPB::Instantiate;
425  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_RIPPLE_SERVER)] =
426  &RippleServerPB::Instantiate;
427  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_LOOM_SERVER)] =
428  &LoomServerPB::Instantiate;
429  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_SERVER_INFO)] =
430  &ServerInfoPB::Instantiate;
431  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_CONTACT_ACCT)] =
432  &ContactAcctPB::Instantiate;
433  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_CONTACT_NYM)] =
434  &ContactNymPB::Instantiate;
435  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_CONTACT)] =
436  &ContactPB::Instantiate;
437  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_ADDRESS_BOOK)] =
438  &AddressBookPB::Instantiate;
439  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_MARKET_DATA)] =
440  &MarketDataPB::Instantiate;
441  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_MARKET_LIST)] =
442  &MarketListPB::Instantiate;
443  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_BID_DATA)] =
444  &BidDataPB::Instantiate;
445  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_ASK_DATA)] =
446  &AskDataPB::Instantiate;
447  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS,
449  &OfferListMarketPB::Instantiate;
450  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS,
452  &TradeDataMarketPB::Instantiate;
453  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS,
455  &TradeListMarketPB::Instantiate;
456  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_OFFER_DATA_NYM)] =
457  &OfferDataNymPB::Instantiate;
458  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_OFFER_LIST_NYM)] =
459  &OfferListNymPB::Instantiate;
460  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_TRADE_DATA_NYM)] =
461  &TradeDataNymPB::Instantiate;
462  theMap[std::make_pair(PACK_PROTOCOL_BUFFERS, STORED_OBJ_TRADE_LIST_NYM)] =
463  &TradeListNymPB::Instantiate;
464 #endif
465 }
std::map< InstantiateFuncKey, InstantiateFunc * > mapOfFunctions
Definition: OTStorage.hpp:340
#define OT_ASSERT(x)
Definition: Assert.hpp:150
OTDB::mapOfFunctions * pFunctionMap
Definition: OTStorage.cpp:295
opentxs::OTDB::InitOTDBDetails::~InitOTDBDetails ( )

Definition at line 467 of file OTStorage.cpp.

468 {
469  OT_ASSERT(nullptr != details::pFunctionMap);
470  delete details::pFunctionMap;
471  details::pFunctionMap = nullptr;
472 
473 #if defined(OTDB_PROTOCOL_BUFFERS)
474  google::protobuf::ShutdownProtobufLibrary();
475 #endif
476 }
#define OT_ASSERT(x)
Definition: Assert.hpp:150
OTDB::mapOfFunctions * pFunctionMap
Definition: OTStorage.cpp:295

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