mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
* 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
83 lines
2.2 KiB
C++
83 lines
2.2 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of rippled: https://github.com/ripple/rippled
|
|
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
namespace ripple {
|
|
namespace Validators {
|
|
|
|
class SourceStringsImp
|
|
: public SourceStrings
|
|
, public LeakChecked <SourceStringsImp>
|
|
{
|
|
public:
|
|
SourceStringsImp (
|
|
String name, StringArray const& strings)
|
|
: m_name (name)
|
|
, m_strings (strings)
|
|
{
|
|
}
|
|
|
|
~SourceStringsImp ()
|
|
{
|
|
}
|
|
|
|
String name ()
|
|
{
|
|
return m_name;
|
|
}
|
|
|
|
String uniqueID ()
|
|
{
|
|
return String::empty;
|
|
}
|
|
|
|
String createParam ()
|
|
{
|
|
return String::empty;
|
|
}
|
|
|
|
void fetch (Results& results, Journal journal)
|
|
{
|
|
results.list.reserve (m_strings.size ());
|
|
|
|
for (int i = 0; i < m_strings.size (); ++i)
|
|
{
|
|
std::string const s (m_strings [i].toStdString ());
|
|
Utilities::parseResultLine (results, s);
|
|
}
|
|
|
|
results.success = results.list.size () > 0;
|
|
results.expirationTime = Time::getCurrentTime () + RelativeTime::hours (24);
|
|
}
|
|
|
|
private:
|
|
String m_name;
|
|
StringArray m_strings;
|
|
};
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
SourceStrings* SourceStrings::New (
|
|
String name, StringArray const& strings)
|
|
{
|
|
return new SourceStringsImp (name, strings);
|
|
}
|
|
|
|
}
|
|
}
|