General refactoring, using C++11

* Remove broken RecycledObjectPool

* Fix beast::ServiceQueue using List instead of LockFreeStack

* Add class semaphore, fixes broken Semaphore

* Move crytpo module files to new beast directory

* Use c++11 replacements for boost and beast types:
  - std::atomic instead of beast::Atomic
  - std::function instead of boost::function, beast::function
  - std::unique_ptr instead of beast::ScopedPointer
  - std::shared_ptr instead of boost::shared_ptr

* Remove modules:
  - beast_db
  - beast_crypto
  - beast_extras

* Remove unnecessary classes:
  - AbstractFifo
  - AddConst
  - AtomicCounter
  - AtomicFlag
  - AtomicPointer
  - AtomicState
  - CopyConst
  - Expression
  - ForwardList
  - IfCond
  - Interval
  - IntrusiveArray
  - KeyvaDB
  - PointerToOther
  - PointerTraits
  - RemoveConst
  - RemoveConstVolatile
  - RemoveReference
  - RemoveVolatile
  - SharedObjectArray
  - SingleThreadedSharedObject
  - SophiaDB factory
  - SortedSet
  - WeakReference
  - beast::unique_ptr
This commit is contained in:
Vinnie Falco
2013-12-31 08:28:12 -08:00
parent 52333b8bd4
commit 087301933a
164 changed files with 827 additions and 8812 deletions

View File

@@ -267,7 +267,7 @@ boost::weak_ptr<PeerSet> InboundLedger::pmDowncast ()
static void LADispatch (
Job& job,
InboundLedger::pointer la,
std::vector< FUNCTION_TYPE<void (InboundLedger::pointer)> > trig)
std::vector< std::function<void (InboundLedger::pointer)> > trig)
{
if (la->isComplete() && !la->isFailed())
{
@@ -290,7 +290,7 @@ void InboundLedger::done ()
assert (isComplete () || isFailed ());
std::vector< FUNCTION_TYPE<void (InboundLedger::pointer)> > triggers;
std::vector< std::function<void (InboundLedger::pointer)> > triggers;
{
ScopedLockType sl (mLock, __FILE__, __LINE__);
triggers.swap (mOnComplete);
@@ -310,7 +310,7 @@ void InboundLedger::done ()
BIND_TYPE (LADispatch, P_1, shared_from_this (), triggers));
}
bool InboundLedger::addOnComplete (FUNCTION_TYPE<void (InboundLedger::pointer)> triggerFunc)
bool InboundLedger::addOnComplete (std::function<void (InboundLedger::pointer)> triggerFunc)
{
ScopedLockType sl (mLock, __FILE__, __LINE__);