clean-up: trifles
This commit is contained in:
parent
20392eee1c
commit
d888891d84
481 changed files with 1987 additions and 1992 deletions
|
|
@ -90,8 +90,7 @@ reconfiguration driven by user interactions:
|
|||
Conclusions for the Design
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Based on these observations, the following design would appear to be pretty much
|
||||
obvious:
|
||||
Based on these observations, the following design would appear to be pretty much obvious:
|
||||
|
||||
The overall player subsystem can be described as ``play/render-this''-service.
|
||||
Given a suitable (high-level) object, the player has the ability to ``perform''
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ To give a delineation to the other side, a constantly growing project might even
|
|||
reach the point where the actual coding of new functionality makes up less than 25%
|
||||
of the overall work required. More people might be involved than anyone can recall or
|
||||
overlook reasonably. A code size of 1 Million LoC seems to exceed any kind of sufficiently
|
||||
precise imagination. From that point on, a rigorosely formalsed organisation is vital
|
||||
precise imagination. From that point on, a rigorously formalised organisation is vital
|
||||
to keep such a *large scale project* from floundering.
|
||||
|
||||
////
|
||||
|
|
|
|||
|
|
@ -220,13 +220,13 @@ namespace advice {
|
|||
{
|
||||
Lock sync{this};
|
||||
|
||||
if (!previousProvision && newProvision)
|
||||
if (not previousProvision and newProvision)
|
||||
index_.addProvision (*newProvision);
|
||||
else
|
||||
if (previousProvision && newProvision)
|
||||
if (previousProvision and newProvision)
|
||||
index_.modifyProvision (*previousProvision, *newProvision);
|
||||
else
|
||||
if (previousProvision && !newProvision)
|
||||
if (previousProvision and not newProvision)
|
||||
index_.removeProvision (*previousProvision);
|
||||
|
||||
discardEntry (unConst(previousProvision));
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace advice {
|
|||
}
|
||||
|
||||
if ( end_of_last_match !=def.end()
|
||||
&& *end_of_last_match !='.'
|
||||
and *end_of_last_match !='.'
|
||||
) // if the match did *not stop at the end of the pattern definition list
|
||||
throw lumiera::error::Invalid ("Trailing garbage in binding pattern definition" ///////////////TICKET #197 should include the garbage, i.e. where the parsing stops
|
||||
, LUMIERA_ERROR_BINDING_PATTERN_SYNTAX);
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ namespace advice {
|
|||
identical (Atom const& oa) const
|
||||
{
|
||||
return ari_ == oa.ari_
|
||||
&& sym_ == oa.sym_
|
||||
&& arg_ == oa.arg_;
|
||||
and sym_ == oa.sym_
|
||||
and arg_ == oa.arg_;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ namespace advice {
|
|||
verify_Entry (e,hash);
|
||||
POA& request = *(e.second);
|
||||
const POA* solution (request.getSolution());
|
||||
if (solution && hasProvision(*solution))
|
||||
if (solution and hasProvision (*solution))
|
||||
{
|
||||
POA* currentSolution = provisionEntries_[hash].find_latest_solution (request);
|
||||
VERIFY (e.first.matches (solution->getMatcher()),"stored advice solution not supported by binding match");
|
||||
|
|
|
|||
|
|
@ -189,14 +189,14 @@ namespace lumiera {
|
|||
operator< (Goal::QueryID const& id1, Goal::QueryID const& id2)
|
||||
{
|
||||
return id1.kind < id2.kind
|
||||
||(id1.kind == id2.kind && id1.type < id2.type);
|
||||
or(id1.kind == id2.kind and id1.type < id2.type);
|
||||
}
|
||||
|
||||
inline bool
|
||||
operator== (Goal::QueryID const& id1, Goal::QueryID const& id2)
|
||||
{
|
||||
return id1.kind == id2.kind
|
||||
&& id1.type == id2.type;
|
||||
and id1.type == id2.type;
|
||||
}
|
||||
|
||||
inline bool
|
||||
|
|
@ -448,8 +448,8 @@ namespace lumiera {
|
|||
uint d1 = q1.degree();
|
||||
uint d2 = q2.degree();
|
||||
return d1 < d2
|
||||
||(d1 == d2 && ( q1.def_ < q2.def_
|
||||
||(q1.def_ == q2.def_ && q1.id_ < q2.id_)));
|
||||
or(d1 == d2 and ( q1.def_ < q2.def_
|
||||
or (q1.def_ == q2.def_ and q1.id_ < q2.id_)));
|
||||
}
|
||||
|
||||
friend bool
|
||||
|
|
@ -553,7 +553,6 @@ namespace lumiera {
|
|||
this->predicateForm_ = queryPredicates;
|
||||
return *this;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -611,7 +610,5 @@ namespace lumiera {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lumiera
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ namespace query {
|
|||
operator() (Record const& rec)
|
||||
{
|
||||
P<TAR> storedObj (rec.objRef.lock());
|
||||
return storedObj && (storedObj == obj_);
|
||||
return storedObj and (storedObj == obj_);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -140,12 +140,12 @@ namespace query {
|
|||
static Registry&
|
||||
access (Table& table)
|
||||
{
|
||||
if ( !index
|
||||
|| index > table.size()
|
||||
||!table[index-1])
|
||||
if ( not index
|
||||
or index > table.size()
|
||||
or not table[index-1])
|
||||
createSlot (table);
|
||||
|
||||
ASSERT (0 < index && index<=table.size() && table[index-1]);
|
||||
ASSERT (0 < index and index<=table.size() and table[index-1]);
|
||||
Slot* item = static_cast<Slot*> (table[index-1].get());
|
||||
return item->registry;
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ namespace query {
|
|||
|
||||
public:
|
||||
P<TAR> operator* () { return ptr; }
|
||||
bool hasNext () { return next || findNext(); }
|
||||
bool hasNext () { return next or findNext(); }
|
||||
Iter& operator++ ()
|
||||
{
|
||||
ptr=findNext();
|
||||
|
|
@ -282,8 +282,8 @@ namespace query {
|
|||
|
||||
Registry& registry = Slot<TAR>::access(table_);
|
||||
RIter pos = registry.lower_bound (entry);
|
||||
if ( pos!=registry.end()
|
||||
&& pos->queryKey == query)
|
||||
if (pos!=registry.end() and
|
||||
pos->queryKey == query)
|
||||
{
|
||||
P<TAR> storedObj (pos->objRef.lock());
|
||||
if (storedObj)
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
** values, references and pointers-to-const are supported as well.
|
||||
**
|
||||
** @see lib::InPlaceAnyHolder usage example to access a subclass in embedded storage
|
||||
** @warning to state the obvious — usage of such a facility raises questions...
|
||||
**
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ namespace diff{
|
|||
MATCH_STRING (bool)
|
||||
|
||||
virtual bool handle (string const& str) override { return str == txt_; }
|
||||
virtual bool handle (char const& c ) override { return 1 == txt_.length() && txt_.front() == c; }
|
||||
virtual bool handle (char const& c ) override { return 1 == txt_.length() and txt_.front() == c; }
|
||||
|
||||
public:
|
||||
MatchString(string const& text)
|
||||
|
|
@ -237,7 +237,7 @@ namespace diff{
|
|||
DataCap::matchBool (bool b) const
|
||||
{
|
||||
bool* val = unConst(this)->maybeGet<bool>();
|
||||
return val && (b == *val);
|
||||
return val and (b == *val);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ namespace diff{
|
|||
DataCap::matchLuid (LuidH hash) const
|
||||
{
|
||||
LuidH* val = unConst(this)->maybeGet<LuidH>();
|
||||
return val && (hash == *val);
|
||||
return val and (hash == *val);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ namespace diff{
|
|||
else
|
||||
{
|
||||
RecRef* val = unConst(this)->maybeGet<RecRef>();
|
||||
return val && val->empty();
|
||||
return val and val->empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ namespace diff{
|
|||
RecRef* r = unConst(this)->maybeGet<RecRef>();
|
||||
if (r) val = r->get();
|
||||
}
|
||||
return val && (rec == *val);
|
||||
return val and (rec == *val);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ namespace diff{
|
|||
operator== (GenNode const& n1, GenNode const& n2)
|
||||
{
|
||||
return n1.idi == n2.idi
|
||||
&& n1.data.matchData(n2.data);
|
||||
and n1.data.matchData(n2.data);
|
||||
}
|
||||
|
||||
friend bool
|
||||
|
|
@ -640,9 +640,9 @@ namespace diff{
|
|||
operator== (ScopeExplorer const& s1, ScopeExplorer const& s2)
|
||||
{
|
||||
return not s1.scopes_.empty()
|
||||
&& not s2.scopes_.empty()
|
||||
&& s1.scopes_.size() == s2.scopes_.size()
|
||||
&& s1.yield() == s2.yield();
|
||||
and not s2.scopes_.empty()
|
||||
and s1.scopes_.size() == s2.scopes_.size()
|
||||
and s1.yield() == s2.yield();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ namespace diff{
|
|||
{
|
||||
auto p = std::begin(con);
|
||||
auto e = std::end(con);
|
||||
for ( ; p!=e && isAttribute(*p); ++p)
|
||||
for ( ; p!=e and isAttribute(*p); ++p)
|
||||
if (isTypeID (*p))
|
||||
type_ = extractTypeID(*p);
|
||||
else
|
||||
|
|
@ -340,13 +340,13 @@ namespace diff{
|
|||
{
|
||||
REQUIRE (src);
|
||||
static const ElmIter END;
|
||||
if (pos != END && pos == src->attribs_.end() && !src->children_.empty())
|
||||
if (pos != END and pos == src->attribs_.end() and not src->children_.empty())
|
||||
{
|
||||
pos = src->children_.begin();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (pos != END && (pos != src->children_.end()))
|
||||
if (pos != END and (pos != src->children_.end()))
|
||||
return true;
|
||||
else
|
||||
{
|
||||
|
|
@ -756,7 +756,7 @@ namespace diff{
|
|||
Record<string>::isTypeID (string const& v)
|
||||
{
|
||||
return isAttribute(v)
|
||||
&& "type" == extractKey(v);
|
||||
and "type" == extractKey(v);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
|
|||
|
|
@ -351,8 +351,8 @@ namespace wrapper {
|
|||
inline bool
|
||||
operator== (ItemWrapper<TY> const& w1, ItemWrapper<TY> const& w2)
|
||||
{
|
||||
return (!w1 && !w2)
|
||||
|| ( w1 && w2 && (*w1)==(*w2));
|
||||
return (!w1 and !w2)
|
||||
or ( w1 and w2 and (*w1)==(*w2));
|
||||
}
|
||||
template<typename TY>
|
||||
inline bool
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ namespace lib {
|
|||
template<class IT>
|
||||
class AddressExposingIter
|
||||
{
|
||||
typedef typename IT::pointer _Ptr;
|
||||
using _Ptr = typename IT::pointer;
|
||||
|
||||
IT i_; ///< nested source iterator
|
||||
|
||||
|
|
@ -238,9 +238,9 @@ namespace lib {
|
|||
|
||||
|
||||
public:
|
||||
typedef typename IT::pointer const* pointer;
|
||||
typedef typename IT::pointer const& reference;
|
||||
typedef typename IT::pointer const value_type;
|
||||
using pointer = typename IT::pointer const*;
|
||||
using reference = typename IT::pointer const&;
|
||||
using value_type = typename IT::pointer const ;
|
||||
|
||||
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (AddressExposingIter);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace iter_stl {
|
|||
operator++()
|
||||
{
|
||||
do ++i_;
|
||||
while (i_ && prev_ && *prev_ == *i_ );
|
||||
while (i_ and prev_ and *prev_ == *i_ );
|
||||
memorise();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -96,9 +96,9 @@ namespace iter_stl {
|
|||
template<typename DEF>
|
||||
struct WrappedStlIter : DEF
|
||||
{
|
||||
typedef typename DEF::Iter Iter;
|
||||
typedef typename DEF::reference reference;
|
||||
typedef typename DEF::pointer pointer;
|
||||
using Iter = typename DEF::Iter;
|
||||
using reference = typename DEF::reference;
|
||||
using pointer = typename DEF::pointer;
|
||||
|
||||
|
||||
WrappedStlIter() : i_() { }
|
||||
|
|
@ -185,33 +185,33 @@ namespace iter_stl {
|
|||
template<class MAP>
|
||||
struct _MapTypeSelector
|
||||
{
|
||||
typedef typename MAP::value_type::first_type Key;
|
||||
typedef typename MAP::value_type::second_type Val;
|
||||
typedef typename MAP::iterator Itr;
|
||||
using Key = typename MAP::value_type::first_type;
|
||||
using Val = typename MAP::value_type::second_type;
|
||||
using Itr = typename MAP::iterator;
|
||||
};
|
||||
|
||||
template<class MAP>
|
||||
struct _MapTypeSelector<const MAP>
|
||||
{
|
||||
typedef typename MAP::value_type::first_type Key;
|
||||
typedef typename MAP::value_type::second_type const Val;
|
||||
typedef typename MAP::const_iterator Itr;
|
||||
using Key = typename MAP::value_type::first_type;
|
||||
using Val = typename MAP::value_type::second_type const;
|
||||
using Itr = typename MAP::const_iterator;
|
||||
};
|
||||
|
||||
/** helper to access the parts of the pair values correctly...*/
|
||||
template<class IT, typename SEL>
|
||||
struct _MapSubSelector
|
||||
{
|
||||
typedef WrappedStlIter< Wrapped_PickKey<IT>> PickKey;
|
||||
typedef WrappedStlIter< Wrapped_PickVal<IT>> PickVal;
|
||||
using PickKey = WrappedStlIter< Wrapped_PickKey<IT>>;
|
||||
using PickVal = WrappedStlIter< Wrapped_PickVal<IT>>;
|
||||
};
|
||||
|
||||
/** especially for const iterators we need to use \c const& and \c const* */
|
||||
template<class IT, typename SEL>
|
||||
struct _MapSubSelector<IT, SEL const&>
|
||||
{
|
||||
typedef WrappedStlIter< Wrapped_PickKey<IT>> PickKey; // Key is always const for maps
|
||||
typedef WrappedStlIter< Wrapped_PickConstVal<IT>> PickVal;
|
||||
using PickKey = WrappedStlIter< Wrapped_PickKey<IT>>; // Key is always const for maps
|
||||
using PickVal = WrappedStlIter< Wrapped_PickConstVal<IT>>;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -219,37 +219,37 @@ namespace iter_stl {
|
|||
template<class MAP>
|
||||
struct _MapT
|
||||
{
|
||||
typedef typename _MapTypeSelector<MAP>::Key KeyType;
|
||||
typedef typename _MapTypeSelector<MAP>::Val ValType;
|
||||
typedef typename _MapTypeSelector<MAP>::Itr EntryIter;
|
||||
using KeyType = typename _MapTypeSelector<MAP>::Key;
|
||||
using ValType = typename _MapTypeSelector<MAP>::Val;
|
||||
using EntryIter = typename _MapTypeSelector<MAP>::Itr;
|
||||
|
||||
typedef typename EntryIter::reference DetectConst;
|
||||
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickKey PickKeyIter;
|
||||
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickVal PickValIter;
|
||||
using DetectConst = typename EntryIter::reference;
|
||||
using PickKeyIter = typename _MapSubSelector<EntryIter,DetectConst>::PickKey;
|
||||
using PickValIter = typename _MapSubSelector<EntryIter,DetectConst>::PickVal;
|
||||
|
||||
typedef RangeIter<PickKeyIter> KeyIter;
|
||||
typedef RangeIter<PickValIter> ValIter;
|
||||
using KeyIter = RangeIter<PickKeyIter>;
|
||||
using ValIter = RangeIter<PickValIter>;
|
||||
|
||||
typedef DistinctIter<KeyIter> DistinctKeys;
|
||||
using DistinctKeys = DistinctIter<KeyIter>;
|
||||
};
|
||||
|
||||
|
||||
template<class IT>
|
||||
struct _MapIterT
|
||||
{
|
||||
typedef IT EntryIter;
|
||||
using EntryIter = IT;
|
||||
|
||||
typedef typename EntryIter::value_type::first_type KeyType;
|
||||
typedef typename EntryIter::value_type::second_type ValType;
|
||||
using KeyType = typename EntryIter::value_type::first_type;
|
||||
using ValType = typename EntryIter::value_type::second_type;
|
||||
|
||||
typedef typename EntryIter::reference DetectConst;
|
||||
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickKey PickKeyIter;
|
||||
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickVal PickValIter;
|
||||
using DetectConst = typename EntryIter::reference;
|
||||
using PickKeyIter = typename _MapSubSelector<EntryIter,DetectConst>::PickKey;
|
||||
using PickValIter = typename _MapSubSelector<EntryIter,DetectConst>::PickVal;
|
||||
|
||||
typedef RangeIter<PickKeyIter> KeyIter;
|
||||
typedef RangeIter<PickValIter> ValIter;
|
||||
using KeyIter = RangeIter<PickKeyIter>;
|
||||
using ValIter = RangeIter<PickValIter>;
|
||||
|
||||
typedef DistinctIter<KeyIter> DistinctKeys;
|
||||
using DistinctKeys = DistinctIter<KeyIter>;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -257,19 +257,19 @@ namespace iter_stl {
|
|||
template<class SEQ>
|
||||
struct _SeqT
|
||||
{
|
||||
typedef typename SEQ::iterator Iter;
|
||||
typedef RangeIter<Iter> Range;
|
||||
typedef DistinctIter<Range> DistinctVals;
|
||||
typedef AddressExposingIter<Range> Addrs;
|
||||
using Iter = typename SEQ::iterator;
|
||||
using Range = RangeIter<Iter>;
|
||||
using DistinctVals = DistinctIter<Range>;
|
||||
using Addrs = AddressExposingIter<Range>;
|
||||
};
|
||||
|
||||
template<class SEQ>
|
||||
struct _SeqT<const SEQ>
|
||||
{
|
||||
typedef typename SEQ::const_iterator Iter;
|
||||
typedef RangeIter<Iter> Range;
|
||||
typedef DistinctIter<Range> DistinctVals;
|
||||
typedef AddressExposingIter<Range> Addrs;
|
||||
using Iter = typename SEQ::const_iterator;
|
||||
using Range = RangeIter<Iter>;
|
||||
using DistinctVals = DistinctIter<Range>;
|
||||
using Addrs = AddressExposingIter<Range>;
|
||||
};
|
||||
|
||||
}//(End) traits/helpers
|
||||
|
|
@ -284,7 +284,7 @@ namespace iter_stl {
|
|||
inline typename _SeqT<CON>::Range
|
||||
eachElm (CON& coll)
|
||||
{
|
||||
typedef typename _SeqT<CON>::Range Range;
|
||||
using Range = typename _SeqT<CON>::Range;
|
||||
return Range (coll.begin(), coll.end());
|
||||
}
|
||||
|
||||
|
|
@ -296,7 +296,7 @@ namespace iter_stl {
|
|||
inline typename _SeqT<CON>::Addrs
|
||||
eachAddress (CON& coll)
|
||||
{
|
||||
typedef typename _SeqT<CON>::Addrs Addresses;
|
||||
using Addresses = typename _SeqT<CON>::Addrs;
|
||||
return Addresses (eachElm (coll));
|
||||
}
|
||||
|
||||
|
|
@ -308,8 +308,8 @@ namespace iter_stl {
|
|||
inline typename _MapT<MAP>::KeyIter
|
||||
eachKey (MAP& map)
|
||||
{
|
||||
typedef typename _MapT<MAP>::KeyIter Range;
|
||||
typedef typename _MapT<MAP>::PickKeyIter PickKey;
|
||||
using Range = typename _MapT<MAP>::KeyIter;
|
||||
using PickKey = typename _MapT<MAP>::PickKeyIter;
|
||||
|
||||
return Range (PickKey (map.begin()), PickKey (map.end()));
|
||||
}
|
||||
|
|
@ -322,8 +322,8 @@ namespace iter_stl {
|
|||
inline typename _MapIterT<IT>::KeyIter
|
||||
eachKey (IT const& begin, IT const& end)
|
||||
{
|
||||
typedef typename _MapIterT<IT>::KeyIter Range;
|
||||
typedef typename _MapIterT<IT>::PickKeyIter PickKey;
|
||||
using Range = typename _MapIterT<IT>::KeyIter;
|
||||
using PickKey = typename _MapIterT<IT>::PickKeyIter;
|
||||
|
||||
return Range (PickKey (begin), PickKey (end));
|
||||
}
|
||||
|
|
@ -336,8 +336,8 @@ namespace iter_stl {
|
|||
inline typename _MapT<MAP>::ValIter
|
||||
eachVal (MAP& map)
|
||||
{
|
||||
typedef typename _MapT<MAP>::ValIter Range;
|
||||
typedef typename _MapT<MAP>::PickValIter PickVal;
|
||||
using Range = typename _MapT<MAP>::ValIter;
|
||||
using PickVal = typename _MapT<MAP>::PickValIter;
|
||||
|
||||
return Range (PickVal (map.begin()), PickVal (map.end()));
|
||||
}
|
||||
|
|
@ -350,8 +350,8 @@ namespace iter_stl {
|
|||
inline typename _MapIterT<IT>::ValIter
|
||||
eachVal (IT const& begin, IT const& end)
|
||||
{
|
||||
typedef typename _MapIterT<IT>::ValIter Range;
|
||||
typedef typename _MapIterT<IT>::PickValIter PickVal;
|
||||
using Range = typename _MapIterT<IT>::ValIter;
|
||||
using PickVal = typename _MapIterT<IT>::PickValIter;
|
||||
|
||||
return Range (PickVal (begin), PickVal (end));
|
||||
}
|
||||
|
|
@ -364,8 +364,8 @@ namespace iter_stl {
|
|||
inline typename _SeqT<SEQ>::DistinctVals
|
||||
eachDistinct (SEQ& seq)
|
||||
{
|
||||
typedef typename _SeqT<SEQ>::Range Range;
|
||||
typedef typename _SeqT<SEQ>::DistinctVals DistinctValues;
|
||||
using Range = typename _SeqT<SEQ>::Range;
|
||||
using DistinctValues = typename _SeqT<SEQ>::DistinctVals;
|
||||
|
||||
return DistinctValues (Range (seq.begin(), seq.end()));
|
||||
}
|
||||
|
|
@ -391,13 +391,13 @@ namespace iter_stl {
|
|||
inline typename _MapT<MMAP>::ValIter
|
||||
eachValForKey (MMAP& multimap, KEY key)
|
||||
{
|
||||
typedef typename _MapT<MMAP>::EntryIter Pos;
|
||||
typedef typename _MapT<MMAP>::ValIter Range;
|
||||
typedef typename _MapT<MMAP>::PickValIter PickVal;
|
||||
using Pos = typename _MapT<MMAP>::EntryIter;
|
||||
using Range = typename _MapT<MMAP>::ValIter;
|
||||
using PickVal = typename _MapT<MMAP>::PickValIter;
|
||||
|
||||
std::pair<Pos,Pos> valRange = multimap.equal_range (key);
|
||||
|
||||
return Range (PickVal (valRange.first), PickVal (valRange.second));
|
||||
return Range (PickVal{valRange.first}, PickVal{valRange.second});
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -413,7 +413,7 @@ namespace iter_stl {
|
|||
template<typename VAL>
|
||||
class IterSnapshot
|
||||
{
|
||||
typedef std::vector<VAL> Sequence;
|
||||
using Sequence = std::vector<VAL>;
|
||||
|
||||
mutable
|
||||
Sequence buffer_;
|
||||
|
|
@ -483,9 +483,9 @@ namespace iter_stl {
|
|||
|
||||
/* === lumiera forward iterator concept === */
|
||||
|
||||
typedef VAL* pointer;
|
||||
typedef VAL& reference;
|
||||
typedef VAL value_type;
|
||||
using pointer = VAL*;
|
||||
using reference = VAL&;
|
||||
using value_type = VAL ;
|
||||
|
||||
reference
|
||||
operator*() const
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ namespace lib {
|
|||
bool
|
||||
check() const
|
||||
{
|
||||
return source_ && checkPoint (source_,pos_); // extension point: free function checkPoint(...)
|
||||
return source_ and checkPoint (source_,pos_); // extension point: free function checkPoint(...)
|
||||
}
|
||||
|
||||
/** ask the controlling container to yield the next position.
|
||||
|
|
@ -864,7 +864,7 @@ namespace lib {
|
|||
bool
|
||||
isValid () const
|
||||
{
|
||||
return (p_!= IT()) && (p_ != e_);
|
||||
return (p_!= IT()) and (p_ != e_);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -896,10 +896,10 @@ namespace lib {
|
|||
|
||||
/// Supporting equality comparisons...
|
||||
template<class I1, class I2>
|
||||
inline bool operator== (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return (!il && !ir) || (il.getPos() == ir.getPos()); }
|
||||
inline bool operator== (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return (!il and !ir) or (il.getPos() == ir.getPos()); }
|
||||
|
||||
template<class I1, class I2>
|
||||
inline bool operator!= (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return !(il == ir); }
|
||||
inline bool operator!= (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return not (il == ir); }
|
||||
|
||||
|
||||
|
||||
|
|
@ -923,9 +923,9 @@ namespace lib {
|
|||
INT e_;
|
||||
|
||||
public:
|
||||
typedef INT* pointer;
|
||||
typedef INT& reference;
|
||||
typedef INT value_type;
|
||||
using pointer = INT*;
|
||||
using reference = INT&;
|
||||
using value_type = INT ;
|
||||
|
||||
NumIter (INT start, INT end)
|
||||
: i_(start)
|
||||
|
|
@ -1035,13 +1035,13 @@ namespace lib {
|
|||
template<template<class,class> class Iter, class TY, class CON>
|
||||
struct IterType<Iter<TY,CON>>
|
||||
{
|
||||
typedef CON Container;
|
||||
typedef TY ElemType;
|
||||
using Container = CON;
|
||||
using ElemType = TY ;
|
||||
|
||||
template<class T2>
|
||||
struct SimilarIter ///< rebind to a similarly structured Iterator with value type T2
|
||||
{
|
||||
typedef Iter<T2,CON> Type;
|
||||
using Type = Iter<T2,CON>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -1052,8 +1052,8 @@ namespace lib {
|
|||
template<class T2>
|
||||
struct SimilarIter ///< rebind to rewritten Iterator wrapped into RangeIter
|
||||
{
|
||||
typedef typename IterType<IT>::template SimilarIter<T2>::Type WrappedIter;
|
||||
typedef RangeIter<WrappedIter> Type;
|
||||
using WrappedIter = typename IterType<IT>::template SimilarIter<T2>::Type;
|
||||
using Type = RangeIter<WrappedIter>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -1067,9 +1067,9 @@ namespace lib {
|
|||
|
||||
|
||||
public:
|
||||
typedef const typename IT::value_type value_type;
|
||||
typedef const typename IT::pointer pointer;
|
||||
typedef const typename IT::reference reference;
|
||||
using value_type = const typename IT::value_type;
|
||||
using pointer = const typename IT::pointer ;
|
||||
using reference = const typename IT::reference ;
|
||||
|
||||
ConstIter (IT srcIter)
|
||||
: i_(srcIter)
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ namespace lib {
|
|||
|
||||
protected: /* == data source API to implement == */
|
||||
|
||||
typedef TY* Pos;
|
||||
typedef shared_ptr<IterSource> DataHandle;
|
||||
using Pos = TY*;
|
||||
using DataHandle = shared_ptr<IterSource>;
|
||||
|
||||
///////////////////////////////////////////////TICKET #1125 : this API should use three control functions, similar to IterStateWrapper
|
||||
/** iteration start: prepare the first element.
|
||||
|
|
@ -326,8 +326,8 @@ namespace lib {
|
|||
// we can strip the const added by the STL map types
|
||||
using KeyType = typename std::remove_const<ConstKeyType>::type;
|
||||
|
||||
typedef TransformIter<Src, KeyType> KeyIter;
|
||||
typedef TransformIter<Src, ValType> ValIter;
|
||||
using KeyIter = TransformIter<Src, KeyType>;
|
||||
using ValIter = TransformIter<Src, ValType>;
|
||||
|
||||
static KeyType takeFirst (PairType const& pair) { return pair.first; }
|
||||
static ValType takeSecond(PairType const& pair) { return pair.second;}
|
||||
|
|
@ -395,8 +395,8 @@ namespace lib {
|
|||
typename _TransformIterT<IT,FUN>::Iter
|
||||
transform (IT&& source, FUN processingFunc)
|
||||
{
|
||||
typedef typename _TransformIterT<IT,FUN>::ResVal ValType;
|
||||
typedef typename _TransformIterT<IT,FUN>::TransIter TransIT;
|
||||
using ValType = typename _TransformIterT<IT,FUN>::ResVal;
|
||||
using TransIT = typename _TransformIterT<IT,FUN>::TransIter;
|
||||
|
||||
return IterSource<ValType>::build (
|
||||
new WrappedLumieraIter<TransIT> (
|
||||
|
|
@ -466,8 +466,8 @@ namespace lib {
|
|||
|
||||
|
||||
/** @param container a STL-like container, providing
|
||||
* - a typedef \c iterator
|
||||
* - functions \c begin() and \c end()
|
||||
* - a typedef `iterator`
|
||||
* - functions `begin()` and `end()`
|
||||
* @return a Lumiera Forward Iterator yielding all values
|
||||
* starting with \c begin and excluding \c end .
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -137,9 +137,9 @@ namespace lib {
|
|||
return bool(source_);
|
||||
}
|
||||
|
||||
typedef typename IT::pointer pointer;
|
||||
typedef typename IT::reference reference;
|
||||
typedef typename IT::value_type value_type;
|
||||
using pointer = typename IT::pointer;
|
||||
using reference = typename IT::reference;
|
||||
using value_type = typename IT::value_type;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -162,16 +162,16 @@ namespace lib {
|
|||
hasData() const
|
||||
{
|
||||
return core_.evaluate()
|
||||
|| unConst(this)->iterate();
|
||||
or unConst(this)->iterate();
|
||||
} // to skip irrelevant results doesn't count as "mutation"
|
||||
|
||||
bool
|
||||
iterate ()
|
||||
{
|
||||
if (!core_.pipe()) return false;
|
||||
if (not core_.pipe()) return false;
|
||||
|
||||
do core_.advance();
|
||||
while (core_.pipe() && !core_.evaluate());
|
||||
while (core_.pipe() and not core_.evaluate());
|
||||
|
||||
return bool{core_.pipe()};
|
||||
}
|
||||
|
|
@ -186,9 +186,9 @@ namespace lib {
|
|||
|
||||
|
||||
public:
|
||||
typedef typename CORE::pointer pointer;
|
||||
typedef typename CORE::reference reference;
|
||||
typedef typename CORE::value_type value_type;
|
||||
using pointer = typename CORE::pointer;
|
||||
using reference = typename CORE::reference;
|
||||
using value_type = typename CORE::value_type;
|
||||
|
||||
|
||||
IterTool (CORE&& setup)
|
||||
|
|
@ -248,8 +248,8 @@ namespace lib {
|
|||
inline bool
|
||||
operator== (IterTool<CX> const& it1, IterTool<CX> const& it2)
|
||||
{
|
||||
return (!it1 && !it2 )
|
||||
|| ( it1 && it2 && (*it1) == (*it2) )
|
||||
return (!it1 and !it2 )
|
||||
or ( it1 and it2 and (*it1) == (*it2) )
|
||||
;
|
||||
}
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ namespace lib {
|
|||
evaluate () const
|
||||
{
|
||||
return Raw::pipe()
|
||||
&& currVal_isOK();
|
||||
and currVal_isOK();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -299,9 +299,9 @@ namespace lib {
|
|||
bool
|
||||
currVal_isOK () const ///< @return (maybe cached) result of filter predicate
|
||||
{
|
||||
return (cached_ && isOK_)
|
||||
|| (cached_ = true
|
||||
&&(isOK_ = predicate_(*Raw::pipe())));
|
||||
return (cached_ and isOK_)
|
||||
or (cached_ = true
|
||||
and (isOK_ = predicate_(*Raw::pipe())));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -542,7 +542,7 @@ namespace lib {
|
|||
template<typename VAL>
|
||||
class SkipRepetition
|
||||
{
|
||||
typedef wrapper::ItemWrapper<VAL> Item;
|
||||
using Item = wrapper::ItemWrapper<VAL>;
|
||||
|
||||
Item prev_;
|
||||
|
||||
|
|
@ -550,7 +550,7 @@ namespace lib {
|
|||
bool
|
||||
operator() (VAL const& elm)
|
||||
{
|
||||
if (prev_ &&
|
||||
if (prev_ and
|
||||
(*prev_ == elm))
|
||||
return false;
|
||||
|
||||
|
|
@ -559,7 +559,7 @@ namespace lib {
|
|||
return true;
|
||||
}
|
||||
|
||||
typedef bool result_type;
|
||||
using result_type = bool;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -578,7 +578,7 @@ namespace lib {
|
|||
template<typename VAL>
|
||||
class SingleValCore
|
||||
{
|
||||
typedef wrapper::ItemWrapper<VAL> Item;
|
||||
using Item = wrapper::ItemWrapper<VAL>;
|
||||
|
||||
Item theValue_;
|
||||
|
||||
|
|
@ -607,9 +607,9 @@ namespace lib {
|
|||
return theValue_.isValid();
|
||||
}
|
||||
|
||||
typedef std::remove_reference_t<VAL> * pointer;
|
||||
typedef std::remove_reference_t<VAL> & reference;
|
||||
typedef std::remove_reference_t<VAL> value_type;
|
||||
using pointer = std::remove_reference_t<VAL> *;
|
||||
using reference = std::remove_reference_t<VAL> &;
|
||||
using value_type = std::remove_reference_t<VAL> ;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace lumiera {
|
|||
|
||||
// ==== implementation LifecycleHook class =======
|
||||
|
||||
typedef LifecycleRegistry::Hook Callback;
|
||||
using Callback = LifecycleRegistry::Hook;
|
||||
|
||||
|
||||
LifecycleHook::LifecycleHook (Symbol eventLabel, Callback callbackFun)
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@
|
|||
\
|
||||
public: \
|
||||
static const bool value = (sizeof(Yes_t)==sizeof(check1<TY>(0)) \
|
||||
||sizeof(Yes_t)==sizeof(check2<TY>(0))); \
|
||||
or sizeof(Yes_t)==sizeof(check2<TY>(0))); \
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ namespace lib {
|
|||
template<class BA>
|
||||
struct InPlaceAnyHolder_useCommonBase
|
||||
{
|
||||
typedef BA Base;
|
||||
using Base = BA;
|
||||
|
||||
template<class SUB>
|
||||
static Base*
|
||||
|
|
@ -159,7 +159,7 @@ namespace lib {
|
|||
*/
|
||||
struct InPlaceAnyHolder_unrelatedTypes
|
||||
{
|
||||
typedef void Base;
|
||||
using Base = void;
|
||||
|
||||
template<class SUB>
|
||||
static void*
|
||||
|
|
@ -184,7 +184,7 @@ namespace lib {
|
|||
* or cleared afterwards, and this #empty() state may be detected
|
||||
* at runtime. In a similar vein, when the stored object has a
|
||||
* `bool` validity check, this can be accessed though #isValid().
|
||||
* Moreover `!empty() && isValid()` may be tested as by `bool`
|
||||
* Moreover `not empty() and isValid()` may be tested as by `bool`
|
||||
* conversion of the Holder object. The whole compound
|
||||
* is copyable if and only if the contained object is copyable.
|
||||
*
|
||||
|
|
@ -200,7 +200,7 @@ namespace lib {
|
|||
>
|
||||
class InPlaceAnyHolder
|
||||
{
|
||||
typedef typename AccessPolicy::Base * BaseP;
|
||||
using BaseP = typename AccessPolicy::Base *;
|
||||
|
||||
/** Inner capsule managing the contained object (interface) */
|
||||
struct Buffer
|
||||
|
|
@ -451,8 +451,8 @@ namespace lib {
|
|||
template<class SUB>
|
||||
SUB& get() const
|
||||
{
|
||||
typedef const Buffer* Iface;
|
||||
typedef const Buff<SUB> * Actual;
|
||||
using Iface = const Buffer *;
|
||||
using Actual = const Buff<SUB> *;
|
||||
Iface interface = &buff();
|
||||
Actual actual = dynamic_cast<Actual> (interface);
|
||||
if (actual)
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ namespace lib {
|
|||
points_to (T const& target) const
|
||||
{
|
||||
return isValid()
|
||||
&& ref_ == ⌖
|
||||
and ref_ == ⌖
|
||||
}
|
||||
|
||||
friend bool
|
||||
|
|
|
|||
|
|
@ -97,27 +97,27 @@ namespace lib {
|
|||
//////////////////TICKET #932 Clang is unable to fill in the default template argument. Resolved in newer versions of Clang. Temporary workaround: add second parameter B
|
||||
template<typename _O_,typename B>
|
||||
friend inline bool
|
||||
operator== (P const& p, P<_O_, B> const& q) { return (p && q)? (*p == *q) : (!p && !q); }
|
||||
operator== (P const& p, P<_O_, B> const& q) { return (p and q)? (*p == *q) : (!p and !q); }
|
||||
|
||||
template<typename _O_,typename B>
|
||||
friend inline bool
|
||||
operator!= (P const& p, P<_O_, B> const& q) { return (p && q)? (*p != *q) : !(!p && !q); }
|
||||
operator!= (P const& p, P<_O_, B> const& q) { return (p and q)? (*p != *q) : !(!p and !q); }
|
||||
|
||||
template<typename _O_,typename B>
|
||||
friend inline bool
|
||||
operator< (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *p < *q; } ///< @note deliberately not allowing comparison on NIL ////TICKET #307 : problem with equality test in associative containers, where equal(a,b) := !(a < b) && !(b < a)
|
||||
operator< (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *p < *q; } ///< @note deliberately not allowing comparison on NIL ////TICKET #307 : problem with equality test in associative containers, where equal(a,b) := !(a < b) and !(b < a)
|
||||
|
||||
template<typename _O_,typename B>
|
||||
friend inline bool
|
||||
operator> (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *q < *p; }
|
||||
operator> (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *q < *p; }
|
||||
|
||||
template<typename _O_,typename B>
|
||||
friend inline bool
|
||||
operator<= (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *p <= *q;}
|
||||
operator<= (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *p <= *q;}
|
||||
|
||||
template<typename _O_,typename B>
|
||||
friend inline bool
|
||||
operator>= (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *p >= *q;}
|
||||
operator>= (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *p >= *q;}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ namespace lib {
|
|||
firstNonempty () const
|
||||
{
|
||||
iterator startPos{this, elms_.begin()};
|
||||
while (startPos && isnil (*startPos))
|
||||
while (startPos and isnil (*startPos))
|
||||
++startPos;
|
||||
return startPos;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ namespace lib {
|
|||
|
||||
public:
|
||||
enum{ value = exposes_CloneFunction<T>::value
|
||||
&& ! HasMember_copyInto<T>::value
|
||||
and not HasMember_copyInto<T>::value
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -471,7 +471,7 @@ namespace lib {
|
|||
|
||||
public: /* === PolymorphicValue public API === */
|
||||
|
||||
typedef IFA Interface;
|
||||
using Interface = IFA;
|
||||
|
||||
Interface&
|
||||
getPayload()
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace lib {
|
|||
normaliseID (string& id)
|
||||
{
|
||||
id = util::sanitise(id);
|
||||
if (isnil(id) || !is_alpha (id[0]))
|
||||
if (isnil(id) or not is_alpha (id[0]))
|
||||
id.insert(0, "o");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace lib {
|
|||
bool
|
||||
empty() const
|
||||
{
|
||||
return !str_ || 0 == std::strlen(str_);
|
||||
return not str_ or 0 == std::strlen(str_);
|
||||
}
|
||||
|
||||
bool operator== (CStr cString) const;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace test {
|
|||
class Test;
|
||||
class Launcher;
|
||||
|
||||
typedef std::vector<string> & Arg;
|
||||
using Arg = std::vector<string>&;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -162,7 +162,6 @@ namespace mutation {
|
|||
|
||||
// using default construction and copy
|
||||
};
|
||||
|
||||
}}} // lib::time::mutation
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ namespace time {
|
|||
contains (TimeValue const& tp) const
|
||||
{
|
||||
return *this <= tp
|
||||
&& tp < end();
|
||||
and tp < end();
|
||||
}
|
||||
|
||||
/** may change start / duration */
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ namespace util {
|
|||
floorwrap (I num, I den)
|
||||
{
|
||||
IDiv<I> res(num,den);
|
||||
if (0 > (num^den) && res.rem)
|
||||
if (0 > (num^den) and res.rem)
|
||||
{ // negative results
|
||||
// wrapped similar to floor()
|
||||
--res.quot;
|
||||
|
|
@ -151,7 +151,7 @@ namespace util {
|
|||
{
|
||||
using std::fabs;
|
||||
return fabs (d1-d2) < DBL_EPSILON * fabs (d1+d2) * ulp
|
||||
|| fabs (d1-d2) < DBL_MIN; // special treatment for subnormal results
|
||||
or fabs (d1-d2) < DBL_MIN; // special treatment for subnormal results
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -62,13 +62,13 @@ namespace util {
|
|||
string::const_iterator e = i + (res.length());
|
||||
while ( i != e )
|
||||
{
|
||||
while ( i != e && !isValid (*i) ) ++i;
|
||||
while ( i != e && isValid (*i) ) *(j++) = *(i++);
|
||||
if ( i != e && isPunct (*i) )
|
||||
while ( i != e and !isValid (*i) ) ++i;
|
||||
while ( i != e and isValid (*i) ) *(j++) = *(i++);
|
||||
if ( i != e and isPunct (*i) )
|
||||
{
|
||||
*j++ = '_';
|
||||
do ++i;
|
||||
while ( i != e && isPunct (*i));
|
||||
while ( i != e and isPunct (*i));
|
||||
}
|
||||
}
|
||||
res.erase(j,res.end());
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace visitor {
|
|||
template<class TAR, class TOOL>
|
||||
class Dispatcher
|
||||
{
|
||||
typedef typename TOOL::ReturnType ReturnType;
|
||||
using ReturnType = typename TOOL::ReturnType;
|
||||
|
||||
/** generator for Trampoline functions,
|
||||
* used to dispatch calls down to the
|
||||
|
|
@ -147,7 +147,7 @@ namespace visitor {
|
|||
inline bool
|
||||
is_known (size_t id)
|
||||
{
|
||||
return id<=table_.size() && table_[id-1];
|
||||
return id<=table_.size() and table_[id-1];
|
||||
}
|
||||
|
||||
inline void
|
||||
|
|
@ -163,7 +163,7 @@ namespace visitor {
|
|||
inline Trampoline
|
||||
storedTrampoline (size_t id)
|
||||
{
|
||||
if (id<=table_.size() && table_[id-1])
|
||||
if (id<=table_.size() and table_[id-1])
|
||||
return table_[id-1];
|
||||
else
|
||||
return &errorHandler;
|
||||
|
|
@ -199,7 +199,6 @@ namespace visitor {
|
|||
Trampoline func = &callTrampoline<TOOLImpl>;
|
||||
storePtr (index, func);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ namespace visitor {
|
|||
class Tool : public ERR<RET>
|
||||
{
|
||||
public:
|
||||
typedef RET ReturnType; ///< Tool function invocation return type
|
||||
typedef Tool ToolBase; ///< for templating the Tag and Dispatcher
|
||||
using ReturnType = RET; ///< Tool function invocation return type
|
||||
using ToolBase = Tool; ///< for templating the Tag and Dispatcher
|
||||
|
||||
virtual ~Tool () { }; ///< use RTTI for all visiting tools
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ namespace visitor {
|
|||
: public Applicable<TOOLImpl, TYPES, BASE>
|
||||
{
|
||||
|
||||
typedef typename BASE::ToolBase ToolBase;
|
||||
using ToolBase = typename BASE::ToolBase;
|
||||
|
||||
protected:
|
||||
virtual ~Applicable () {}
|
||||
|
|
@ -188,7 +188,7 @@ namespace visitor {
|
|||
class Visitable
|
||||
{
|
||||
public:
|
||||
typedef typename TOOL::ReturnType ReturnType;
|
||||
using ReturnType = typename TOOL::ReturnType;
|
||||
|
||||
/** to be defined by the DEFINE_PROCESSABLE_BY macro
|
||||
* in all classes wanting to be treated by some tool */
|
||||
|
|
@ -199,7 +199,7 @@ namespace visitor {
|
|||
virtual ~Visitable () { };
|
||||
|
||||
/// @note may differ from TOOL
|
||||
typedef typename TOOL::ToolBase ToolBase;
|
||||
using ToolBase = typename TOOL::ToolBase;
|
||||
|
||||
/** @internal used by the #DEFINE_PROCESSABLE_BY macro.
|
||||
* Dispatches to the actual operation on the
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace lumiera {
|
|||
* @deprecated not sure if this was a good idea anyway. Better re-think how to handle wrapped objects in visitation
|
||||
* @todo really need to switch to the new lib::Variant and util::AccessCasted implementation ////////////////TICKET #450
|
||||
*/
|
||||
typedef lib::VariantO<steam::WrapperTypes, util::AccessCasted_O> WrapperPtr;
|
||||
using WrapperPtr = lib::VariantO<steam::WrapperTypes, util::AccessCasted_O>;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace ctrl{
|
|||
: public BusTerm
|
||||
, util::NonCopyable
|
||||
{
|
||||
typedef std::unordered_map<EntryID, Tangible*, EntryID::UseEmbeddedHash> RoutingTable;
|
||||
using RoutingTable = std::unordered_map<EntryID, Tangible*, EntryID::UseEmbeddedHash>;
|
||||
|
||||
RoutingTable routingTable_;
|
||||
|
||||
|
|
|
|||
|
|
@ -210,10 +210,10 @@ namespace interact {
|
|||
using lib::meta::Types;
|
||||
using lib::meta::func::PApply;
|
||||
|
||||
typedef typename _Fun<FUN>::Ret Ret;
|
||||
typedef typename _Fun<FUN>::Args Args;
|
||||
typedef typename Split<Args>::Head Arg1;
|
||||
typedef typename Split<Args>::Tail FurtherArgs;
|
||||
using Ret = typename _Fun<FUN>::Ret;
|
||||
using Args = typename _Fun<FUN>::Args;
|
||||
using Arg1 = typename Split<Args>::Head;
|
||||
using FurtherArgs = typename Split<Args>::Tail;
|
||||
|
||||
static_assert (std::is_convertible<UICoord, Arg1>::value,
|
||||
"Allocator function must accept UICoordinates (where to create/locate) as first argument");
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace output {
|
|||
if (XvQueryAdaptors (display, window, &count, &adaptorInfo) == Success)
|
||||
{
|
||||
INFO(stage, "XvQueryAdaptors count: %d", count);
|
||||
for (uint n = 0; gotPort == false && n < count; ++n )
|
||||
for (uint n = 0; gotPort == false and n < count; ++n )
|
||||
{
|
||||
// Diagnostics
|
||||
INFO(stage, "%s, %lu, %lu", adaptorInfo[ n ].name,
|
||||
|
|
@ -87,7 +87,7 @@ namespace output {
|
|||
( list[ i ].id >> 16 ) & 0xff,
|
||||
( list[ i ].id >> 24 ) & 0xff,
|
||||
( list[ i ].format == XvPacked ) ? "packed" : "planar" );
|
||||
if ( list[ i ].id == FORMAT_ID_YUY2 && !gotPort )
|
||||
if ( list[ i ].id == FORMAT_ID_YUY2 and not gotPort )
|
||||
gotPort = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -486,21 +486,21 @@ namespace widget {
|
|||
int mins = getMins (when);
|
||||
float secs = getSecs (when);
|
||||
|
||||
if (force || hrs != ms_last_hrs)
|
||||
if (force or hrs != ms_last_hrs)
|
||||
{
|
||||
sprintf(buf, "%02d", hrs); ///////////////////////////////////////////////////////////////////TICKET #750 : code smell, integrate Timecode formats
|
||||
ms_hours_label.set_text(buf);
|
||||
ms_last_hrs = hrs;
|
||||
}
|
||||
|
||||
if (force || mins != ms_last_mins)
|
||||
if (force or mins != ms_last_mins)
|
||||
{
|
||||
sprintf(buf, "%02d", mins);
|
||||
ms_minutes_label.set_text(buf);
|
||||
ms_last_mins = mins;
|
||||
}
|
||||
|
||||
if (force || secs != ms_last_secs)
|
||||
if (force or secs != ms_last_secs)
|
||||
{
|
||||
sprintf(buf, "%06.3f", secs);
|
||||
ms_seconds_label.set_text(buf);
|
||||
|
|
@ -526,7 +526,7 @@ namespace widget {
|
|||
// session->smpte_time(when, smpte);
|
||||
// }
|
||||
|
||||
if (force || smpte_hours != last_hrs || smpte_negative != last_negative)
|
||||
if (force or smpte_hours != last_hrs or smpte_negative != last_negative)
|
||||
{
|
||||
if (smpte_negative)
|
||||
{
|
||||
|
|
@ -541,21 +541,21 @@ namespace widget {
|
|||
last_negative = smpte_negative;
|
||||
}
|
||||
|
||||
if (force || smpte_minutes != last_mins)
|
||||
if (force or smpte_minutes != last_mins)
|
||||
{
|
||||
sprintf(buf, "%02d", smpte_minutes);
|
||||
minutes_label.set_text(buf);
|
||||
last_mins = smpte_minutes;
|
||||
}
|
||||
|
||||
if (force || smpte_seconds != last_secs)
|
||||
if (force or smpte_seconds != last_secs)
|
||||
{
|
||||
sprintf(buf, "%02d", smpte_seconds);
|
||||
seconds_label.set_text(buf);
|
||||
last_secs = smpte_seconds;
|
||||
}
|
||||
|
||||
if (force || smpte_frames != last_frames)
|
||||
if (force or smpte_frames != last_frames)
|
||||
{
|
||||
sprintf(buf, "%02d", smpte_frames);
|
||||
frames_label.set_text(buf);
|
||||
|
|
@ -911,8 +911,8 @@ namespace widget {
|
|||
{
|
||||
gdk_pointer_ungrab(GDK_CURRENT_TIME);
|
||||
dragging = false;
|
||||
if (ev->y > drag_start_y+1 || ev->y < drag_start_y-1
|
||||
|| (ev->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
|
||||
if (ev->y > drag_start_y+1 or ev->y < drag_start_y-1
|
||||
or (ev->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
|
||||
{
|
||||
// we actually dragged so return without setting editing focus, or we shift clicked
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ namespace workspace {
|
|||
"ph3", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_LEFT, FALSE));
|
||||
dockPlaceholders_[3] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
|
||||
"ph4", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_RIGHT, FALSE));
|
||||
ENSURE(dockPlaceholders_[0] && dockPlaceholders_[1] &&
|
||||
dockPlaceholders_[2] && dockPlaceholders_[3]);
|
||||
ENSURE(dockPlaceholders_[0] and dockPlaceholders_[1] and
|
||||
dockPlaceholders_[2] and dockPlaceholders_[3]);
|
||||
|
||||
createPanels();
|
||||
}
|
||||
|
|
@ -176,8 +176,8 @@ namespace workspace {
|
|||
void
|
||||
DockArea::switchPanel (panel::Panel& old_panel, const int description_index)
|
||||
{
|
||||
REQUIRE (description_index >= 0 &&
|
||||
description_index < getPanelDescriptionCount());
|
||||
REQUIRE (description_index >= 0);
|
||||
REQUIRE (description_index < getPanelDescriptionCount());
|
||||
|
||||
// Get the dock item
|
||||
Gdl::DockItem &dock_item = old_panel.getDockItem();
|
||||
|
|
@ -231,7 +231,8 @@ namespace workspace {
|
|||
const gchar*
|
||||
DockArea::getPanelStockID (int index)
|
||||
{
|
||||
REQUIRE (index >= 0 && index < getPanelDescriptionCount());
|
||||
REQUIRE (index >= 0);
|
||||
REQUIRE (index < getPanelDescriptionCount());
|
||||
return panelDescriptionList[index].getStockID();
|
||||
}
|
||||
|
||||
|
|
@ -239,7 +240,8 @@ namespace workspace {
|
|||
const char*
|
||||
DockArea::getPanelTitle (int index)
|
||||
{
|
||||
REQUIRE (index >= 0 && index < getPanelDescriptionCount());
|
||||
REQUIRE (index >= 0);
|
||||
REQUIRE (index < getPanelDescriptionCount());
|
||||
return panelDescriptionList[index].getTitle();
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +280,8 @@ namespace workspace {
|
|||
panel::Panel*
|
||||
DockArea::createPanel_by_index (const int index)
|
||||
{
|
||||
REQUIRE(index >= 0 && index < getPanelDescriptionCount());
|
||||
REQUIRE (index >= 0);
|
||||
REQUIRE (index < getPanelDescriptionCount());
|
||||
|
||||
// Make a unique name for the panel
|
||||
char name[5];
|
||||
|
|
@ -370,7 +373,7 @@ namespace workspace {
|
|||
DockArea::on_panel_shown (panel::Panel* panel)
|
||||
{
|
||||
REQUIRE(panel);
|
||||
if(panel->is_shown() || panel->is_iconified()) return;
|
||||
if (panel->is_shown() or panel->is_iconified()) return;
|
||||
|
||||
removePanel(panel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ namespace workspace {
|
|||
"ph3", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_LEFT, FALSE));
|
||||
dockPlaceholders_[3] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
|
||||
"ph4", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_RIGHT, FALSE));
|
||||
ENSURE(dockPlaceholders_[0] && dockPlaceholders_[1] &&
|
||||
dockPlaceholders_[2] && dockPlaceholders_[3]);
|
||||
ENSURE(dockPlaceholders_[0] and dockPlaceholders_[1] and
|
||||
dockPlaceholders_[2] and dockPlaceholders_[3]);
|
||||
|
||||
createPanels();
|
||||
}
|
||||
|
|
@ -170,8 +170,8 @@ namespace workspace {
|
|||
void
|
||||
PanelManager::switchPanel (panel::Panel& old_panel, const int description_index)
|
||||
{
|
||||
REQUIRE (description_index >= 0 &&
|
||||
description_index < getPanelDescriptionCount());
|
||||
REQUIRE (description_index >= 0);
|
||||
REQUIRE (description_index < getPanelDescriptionCount());
|
||||
|
||||
// Get the dock item
|
||||
Gdl::DockItem &dock_item = old_panel.getDockItem();
|
||||
|
|
@ -225,7 +225,8 @@ namespace workspace {
|
|||
const gchar*
|
||||
PanelManager::getPanelStockID (int index)
|
||||
{
|
||||
REQUIRE (index >= 0 && index < getPanelDescriptionCount());
|
||||
REQUIRE (index >= 0);
|
||||
REQUIRE (index < getPanelDescriptionCount());
|
||||
return panelDescriptionList[index].getStockID();
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +234,8 @@ namespace workspace {
|
|||
const char*
|
||||
PanelManager::getPanelTitle (int index)
|
||||
{
|
||||
REQUIRE (index >= 0 && index < getPanelDescriptionCount());
|
||||
REQUIRE (index >= 0);
|
||||
REQUIRE (index < getPanelDescriptionCount());
|
||||
return panelDescriptionList[index].getTitle();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,10 +175,10 @@ namespace asset {
|
|||
const uint version;
|
||||
|
||||
|
||||
Ident (const string& n,
|
||||
const Category& cat,
|
||||
const string& o = "lumi",
|
||||
const uint ver=1);
|
||||
Ident (string const& n
|
||||
,Category const& cat
|
||||
,string const& o = "lumi"
|
||||
,const uint ver=1);
|
||||
|
||||
|
||||
int compare (Ident const& other) const;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ namespace asset {
|
|||
{
|
||||
nodes.push_back(node);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace asset {
|
|||
*/
|
||||
Category::operator string () const
|
||||
{
|
||||
typedef const char * const SymID;
|
||||
using SymID = const char * const;
|
||||
|
||||
SymID kinds[6] = { "AUDIO"
|
||||
, "VIDEO"
|
||||
|
|
@ -60,7 +60,7 @@ namespace asset {
|
|||
Category::isWithin (const Category& ref) const
|
||||
{
|
||||
return ( ref.hasKind (kind_)
|
||||
&& starts_with (path_, ref.path_)
|
||||
and starts_with (path_, ref.path_)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ namespace asset {
|
|||
Category (const Kind root, Literal subfolder ="")
|
||||
: kind_(root), path_(subfolder) {};
|
||||
|
||||
bool operator== (Category const& other) const { return kind_== other.kind_ && path_== other.path_; }
|
||||
bool operator!= (Category const& other) const { return kind_!= other.kind_ || path_!= other.path_; }
|
||||
bool operator== (Category const& other) const { return kind_== other.kind_ and path_== other.path_; }
|
||||
bool operator!= (Category const& other) const { return kind_!= other.kind_ or path_!= other.path_; }
|
||||
|
||||
bool hasKind (Kind refKind) const { return kind_ == refKind; }
|
||||
bool isWithin (Category const&) const;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace asset {
|
|||
|
||||
};
|
||||
|
||||
typedef lib::P<const asset::Clip> PClipAsset;
|
||||
using PClipAsset = lib::P<const asset::Clip>;
|
||||
|
||||
const string CLIP_SUBFOLDER = "clips"; // TODO: handling of hard-wired constants....
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace asset {
|
|||
operator() (size_t val) const { return val; }
|
||||
};
|
||||
|
||||
typedef std::unordered_map<size_t, PAsset, IdentityHash> IdHashtable;
|
||||
using IdHashtable = std::unordered_map<size_t, PAsset, IdentityHash>;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace asset {
|
|||
{};
|
||||
|
||||
|
||||
typedef lib::P<Inventory> PInv;
|
||||
using PInv = lib::P<Inventory>;
|
||||
|
||||
|
||||
}} // namespace steam::asset
|
||||
|
|
|
|||
|
|
@ -167,9 +167,9 @@ namespace asset {
|
|||
pM = new Media (key,file,length);
|
||||
}
|
||||
ASSERT (pM);
|
||||
ENSURE (key.category.hasKind (VIDEO) || key.category.hasKind(AUDIO));
|
||||
ENSURE (!isnil (key.name));
|
||||
ENSURE (dynamic_cast<Media*>(pM) || (isnil (file) && dynamic_cast<Unknown*>(pM)));
|
||||
ENSURE (key.category.hasKind (VIDEO) or key.category.hasKind(AUDIO));
|
||||
ENSURE (not isnil (key.name));
|
||||
ENSURE (dynamic_cast<Media*>(pM) or (isnil (file) and dynamic_cast<Unknown*>(pM)));
|
||||
|
||||
return aMang.getAsset (pM->getID()); // note: because we query with an ID<Media>,
|
||||
// we get a Media smart ptr.
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ namespace asset {
|
|||
: util::NonCopyable
|
||||
{
|
||||
public:
|
||||
typedef lib::P<Media> PType;
|
||||
using PType = lib::P<Media>;
|
||||
|
||||
PType operator() (Asset::Ident& key, const string& file="");
|
||||
PType operator() (const string& file, const Category& cat);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ namespace asset {
|
|||
inline ID<Meta>::ID(HashVal id) : ID<Asset> (id) {};
|
||||
inline ID<Meta>::ID(const Meta& meta) : ID<Asset> (meta.getID()) {};
|
||||
|
||||
typedef lib::P<Meta> PMeta;
|
||||
using PMeta = lib::P<Meta>;
|
||||
|
||||
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ namespace asset {
|
|||
: util::NonCopyable
|
||||
{
|
||||
public:
|
||||
typedef lib::P<asset::Meta> PType;
|
||||
using PType = lib::P<asset::Meta>;
|
||||
|
||||
template<class MA>
|
||||
meta::Builder<MA> operator() (lib::idi::EntryID<MA> elementIdentity);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ namespace meta {
|
|||
: public Meta
|
||||
, public virtual lib::time::Grid
|
||||
{
|
||||
|
||||
public:
|
||||
/* === shortcut builder functions === */
|
||||
static PGrid build (FrameRate frames_per_second);
|
||||
|
|
@ -92,7 +91,6 @@ namespace meta {
|
|||
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
struct Builder<TimeGrid>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ namespace asset {
|
|||
return Asset::Ident (name, category,
|
||||
mediaref.org,
|
||||
mediaref.version );
|
||||
|
||||
}
|
||||
}//(End)implementation helper
|
||||
|
||||
|
|
|
|||
|
|
@ -82,9 +82,9 @@ namespace asset {
|
|||
ProcPatt::attach(Symbol where, PProc& node)
|
||||
{
|
||||
DoAttach *last (0);
|
||||
if ( !isnil (instructions_)
|
||||
&& (last = boost::get<DoAttach> (&(instructions_.back())))
|
||||
&& last->point==where
|
||||
if ( not isnil (instructions_)
|
||||
and (last = boost::get<DoAttach> (&(instructions_.back())))
|
||||
and last->point==where
|
||||
)
|
||||
// instead of adding a new build instruct entry,
|
||||
// we can extend the list in the last "DoAttach" entry.
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ namespace asset {
|
|||
class Proc;
|
||||
class ProcPatt;
|
||||
struct BuildInstruct;
|
||||
typedef lib::P<const asset::Proc> PProc;
|
||||
typedef lib::P<const asset::ProcPatt> PProcPatt;
|
||||
using PProc = lib::P<const asset::Proc>;
|
||||
using PProcPatt = lib::P<const asset::ProcPatt>;
|
||||
|
||||
typedef vector<BuildInstruct> InstructionSequence;
|
||||
using InstructionSequence = vector<BuildInstruct>;
|
||||
|
||||
/**
|
||||
* "Processing Pattern" is a structural Asset
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace mobject {
|
|||
namespace session {
|
||||
|
||||
class Fork;
|
||||
typedef MORef<Fork> RFork;
|
||||
using RFork = MORef<Fork>;
|
||||
}}
|
||||
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ namespace asset {
|
|||
|
||||
|
||||
class Sequence;
|
||||
typedef lib::P<Sequence> PSequence;
|
||||
using PSequence = lib::P<Sequence>;
|
||||
|
||||
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ namespace asset {
|
|||
: public Struct
|
||||
, public lib::AutoRegistered<Sequence>
|
||||
{
|
||||
typedef mobject::session::RFork RFork;
|
||||
using RFork = mobject::session::RFork;
|
||||
|
||||
Sequence (Ident const&); //////////////////////////////////////////////TICKET #692 pass in fork here
|
||||
|
||||
|
|
|
|||
|
|
@ -115,11 +115,11 @@ namespace asset {
|
|||
% StructTraits<STRU>::namePrefix()
|
||||
% (++i);
|
||||
}
|
||||
ENSURE (!isnil (nameID));
|
||||
ENSURE (not isnil (nameID));
|
||||
|
||||
// does the query actually demand the Nth instance/element?
|
||||
string seqID = query.extractID (seqNrPredicate);
|
||||
if (!isnil (seqID) && 1 < uNum(seqID))
|
||||
if (not isnil (seqID) and 1 < uNum(seqID))
|
||||
nameID += "."+seqID;
|
||||
|
||||
Category cat (STRUCT, StructTraits<STRU>::catFolder());
|
||||
|
|
@ -132,14 +132,14 @@ namespace asset {
|
|||
getFork_forSequence (string const& desiredID)
|
||||
{
|
||||
RFork fork;
|
||||
if (!isnil (desiredID))
|
||||
if (not isnil (desiredID))
|
||||
fork = Session::current->elements.pick (match_specificFork (desiredID));
|
||||
|
||||
if (fork && !Scope::containing (fork.getRef()).isRoot())
|
||||
if (fork and not Scope::containing (fork.getRef()).isRoot())
|
||||
{
|
||||
UNIMPLEMENTED ("how to deal with 'stealing' a fork sub-tree to a new sequence??");
|
||||
}
|
||||
if (!fork)
|
||||
if (not fork)
|
||||
fork = Session::current->getRoot().attach (MObject::create (ForkID (desiredID)));
|
||||
|
||||
return fork;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace mobject {
|
|||
namespace session {
|
||||
|
||||
class Binding;
|
||||
typedef MORef<Binding> RBinding;
|
||||
using RBinding = MORef<Binding>;
|
||||
}}
|
||||
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ namespace asset {
|
|||
|
||||
|
||||
class Timeline;
|
||||
typedef lib::P<Timeline> PTimeline;
|
||||
using PTimeline = lib::P<Timeline>;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -92,7 +92,7 @@ namespace asset {
|
|||
: public Struct
|
||||
, public lib::AutoRegistered<Timeline>
|
||||
{
|
||||
typedef mobject::session::RBinding RBinding;
|
||||
using RBinding = mobject::session::RBinding;
|
||||
|
||||
RBinding boundSequence_;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace mobject {
|
|||
namespace session {
|
||||
|
||||
class Binding;
|
||||
typedef MORef<Binding> RBinding;
|
||||
using RBinding = MORef<Binding>;
|
||||
}}
|
||||
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ namespace asset {
|
|||
|
||||
|
||||
class Viewer;
|
||||
typedef lib::P<Viewer> PViewer;
|
||||
using PViewer = lib::P<Viewer>;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ namespace asset {
|
|||
AssetManager::known (IDA id, const Category& cat)
|
||||
{
|
||||
PAsset pA = registry.get (id);
|
||||
return ( pA && pA->ident.category.isWithin(cat));
|
||||
return ( pA and pA->ident.category.isWithin(cat));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace control {
|
|||
|
||||
/**
|
||||
* Adapter interface for invoking an argument binding for a command
|
||||
* \em without the need to disclose the concrete types and number of arguments.
|
||||
* _without the need to disclose_ the concrete types and number of arguments.
|
||||
* At the receiver side, the concrete type can be restored by a dynamic cast.
|
||||
* This requires the receiver somehow to know the desired argument types;
|
||||
* usually this receiver will be an implementation object, whose exact
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace control {
|
|||
* A neutral container internally holding
|
||||
* the functor used to implement the Command
|
||||
*/
|
||||
typedef FunErasure<StoreFunction> CmdFunctor;
|
||||
using CmdFunctor = FunErasure<StoreFunction>;
|
||||
|
||||
class CommandImplCloneBuilder;
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,6 @@ namespace control {
|
|||
REQUIRE (newContext_->isValid());
|
||||
return newContext_->getClosure();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@ namespace control {
|
|||
bool
|
||||
operator() (const Command *pC1, const Command *pC2) const
|
||||
{
|
||||
return (!pC1 && pC2)
|
||||
|| ( pC1 && pC2 && (*pC1 < *pC2));
|
||||
return (!pC1 and pC2)
|
||||
or ( pC1 and pC2 and (*pC1 < *pC2));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ namespace control {
|
|||
CommandDef::isValid() const
|
||||
{
|
||||
return (was_activated (prototype_))
|
||||
&& (prototype_ == registered_for (this->id_))
|
||||
and (prototype_ == registered_for (this->id_))
|
||||
;
|
||||
}
|
||||
|
||||
|
|
@ -350,7 +350,7 @@ namespace control {
|
|||
Command::canExec() const
|
||||
{
|
||||
return isValid()
|
||||
&& impl().canExec();
|
||||
and impl().canExec();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -358,7 +358,7 @@ namespace control {
|
|||
Command::canUndo() const
|
||||
{
|
||||
return isValid()
|
||||
&& impl().canUndo();
|
||||
and impl().canUndo();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace control {
|
|||
, lib::Handle<CommandImpl> // actually implemented as ref counting Handle
|
||||
> //
|
||||
{
|
||||
typedef lib::Handle<CommandImpl> _Handle;
|
||||
using _Handle = lib::Handle<CommandImpl>;
|
||||
|
||||
public:
|
||||
/* === command registry === */
|
||||
|
|
@ -300,8 +300,8 @@ namespace control {
|
|||
inline bool
|
||||
operator== (Command const& c1, Command const& c2)
|
||||
{
|
||||
return (!c1 && !c2)
|
||||
|| ( c1 && c2 && (&c1.impl() == &c2.impl()));
|
||||
return (!c1 and !c2)
|
||||
or ( c1 and c2 and (&c1.impl() == &c2.impl()));
|
||||
}
|
||||
|
||||
inline bool
|
||||
|
|
@ -314,8 +314,8 @@ namespace control {
|
|||
inline bool
|
||||
operator< (Command const& c1, Command const& c2)
|
||||
{
|
||||
return (!c1 && c2)
|
||||
|| ( c1 && c2 && (&c1.impl() < &c2.impl()));
|
||||
return (!c1 and c2)
|
||||
or ( c1 and c2 and (&c1.impl() < &c2.impl()));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ namespace engine {
|
|||
*/
|
||||
class Table
|
||||
{
|
||||
typedef std::unordered_map<HashVal,Entry> MetadataStore;
|
||||
using MetadataStore = std::unordered_map<HashVal,Entry>;
|
||||
|
||||
MetadataStore entries_;
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ namespace engine {
|
|||
|
||||
|
||||
/** @internal abort normal lifecycle, reset the underlying buffer and detach from it.
|
||||
* This allows to break out of normal usage and reset the handle to \em invalid state
|
||||
* This allows to break out of normal usage and reset the handle to _invalid state_
|
||||
* @param invokeDtor if possibly the clean-up function of an TypeHandler registered with
|
||||
* the buffer metadata should be invoked prior to resetting the metadata state.
|
||||
* Default is \em not to invoke anything
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ namespace engine {
|
|||
|
||||
|
||||
public:
|
||||
typedef Buff* PBuff;
|
||||
using PBuff = Buff*;
|
||||
|
||||
/** @internal a buffer handle may be obtained by "locking"
|
||||
* a buffer from the corresponding BufferProvider */
|
||||
|
|
@ -155,7 +155,7 @@ namespace engine {
|
|||
isValid() const
|
||||
{
|
||||
return bool(pBuffer_)
|
||||
&& descriptor_.verifyValidity();
|
||||
and descriptor_.verifyValidity();
|
||||
}
|
||||
|
||||
HashVal
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ namespace engine {
|
|||
*/
|
||||
struct BuffTable
|
||||
{
|
||||
typedef BuffHandle * PHa;
|
||||
typedef BuffHandle::PBuff * PBu;
|
||||
using PHa = BuffHandle *;
|
||||
using PBu = BuffHandle::PBuff *;
|
||||
|
||||
struct StorageChunk
|
||||
{ };
|
||||
|
|
@ -80,8 +80,8 @@ namespace engine {
|
|||
void lockBuffers();
|
||||
void releaseBuffers();
|
||||
|
||||
typedef vector<BuffHandle> BuffHandleTable;
|
||||
typedef lib::RangeIter<BuffHandleTable::iterator> iterator;
|
||||
using BuffHandleTable = vector<BuffHandle>;
|
||||
using iterator = lib::RangeIter<BuffHandleTable::iterator>;
|
||||
|
||||
iterator buffers();
|
||||
iterator inBuffers();
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ namespace engine{
|
|||
|
||||
};
|
||||
|
||||
typedef std::vector<CalcStream> CalcStreams; //////////////////////////////////////////////////////TICKET #1297 : probably unnecessary, since we intend to connect always one Feed per ModelPort (and handle multiple channels internally, in the processing nodes)
|
||||
using CalcStreams = std::vector<CalcStream>; //////////////////////////////////////////////////////TICKET #1297 : probably unnecessary, since we intend to connect always one Feed per ModelPort (and handle multiple channels internally, in the processing nodes)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace engine{
|
|||
using mobject::ModelPort;
|
||||
using steam::play::Timings;
|
||||
|
||||
typedef steam::play::OutputSlot::Allocation OutputConnection;
|
||||
using OutputConnection = steam::play::OutputSlot::Allocation;
|
||||
|
||||
|
||||
|
||||
|
|
@ -117,8 +117,8 @@ namespace engine{
|
|||
};
|
||||
|
||||
|
||||
typedef lib::polyvalue::CloneValueSupport<Quality> _Clonable_QoS_Strategy;
|
||||
typedef lib::PolymorphicValue<Quality, QoS_IMPL_SIZE, _Clonable_QoS_Strategy> QoS_Definition;
|
||||
using _Clonable_QoS_Strategy = lib::polyvalue::CloneValueSupport<Quality>;
|
||||
using QoS_Definition = lib::PolymorphicValue<Quality, QoS_IMPL_SIZE, _Clonable_QoS_Strategy>;
|
||||
|
||||
static QoS_Definition QoS_DEFAULT;
|
||||
static QoS_Definition QoS_BACKGROUND;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace session {
|
|||
|
||||
class Clip;
|
||||
class Effect;
|
||||
typedef Placement<Effect> PEffect;
|
||||
using PEffect = Placement<Effect>;
|
||||
// TODO: class Transition;
|
||||
|
||||
}} // namespace mobject::session
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ namespace engine {
|
|||
|
||||
class BlockPool;
|
||||
|
||||
typedef std::unordered_map<HashVal,BlockPool> PoolTable;
|
||||
using PoolTable = std::unordered_map<HashVal,BlockPool>;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ namespace engine {
|
|||
*/
|
||||
struct TypeHandler
|
||||
{
|
||||
typedef function<void(void*)> DoInBuffer;
|
||||
using DoInBuffer = function<void(void*)>;
|
||||
|
||||
DoInBuffer createAttached;
|
||||
DoInBuffer destroyAttached;
|
||||
|
|
@ -166,7 +166,7 @@ namespace engine {
|
|||
operator== (TypeHandler const& left, TypeHandler const& right)
|
||||
{
|
||||
return (not left.isValid() and not right.isValid())
|
||||
|| (left.identity == right.identity);
|
||||
or (left.identity == right.identity);
|
||||
}
|
||||
friend bool
|
||||
operator!= (TypeHandler const& left, TypeHandler const& right)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace node {
|
|||
class DummyTickService
|
||||
: lib::ThreadJoinable<>
|
||||
{
|
||||
typedef function<void(void)> Tick;
|
||||
using Tick = function<void(void)>;
|
||||
std::atomic_uint timespan_;
|
||||
|
||||
/** poll interval for new settings in wait state */
|
||||
|
|
@ -89,8 +89,8 @@ namespace node {
|
|||
void activate (uint fps)
|
||||
{
|
||||
REQUIRE ( 0==fps
|
||||
||( 1000000/fps < std::numeric_limits<uint>::max()
|
||||
&& 1000000/fps > POLL_TIMEOUT));
|
||||
or( 1000000/fps < std::numeric_limits<uint>::max()
|
||||
and 1000000/fps > POLL_TIMEOUT));
|
||||
if (fps)
|
||||
timespan_ = 1000000/fps; // microseconds per tick
|
||||
else
|
||||
|
|
|
|||
4
src/steam/external/libgavl.hpp
vendored
4
src/steam/external/libgavl.hpp
vendored
|
|
@ -55,8 +55,8 @@ namespace external {
|
|||
|
||||
using lib::Symbol;
|
||||
|
||||
typedef StreamType::ImplFacade ImplFacade;
|
||||
typedef StreamType::ImplFacade::TypeTag TypeTag;
|
||||
using ImplFacade = StreamType::ImplFacade;
|
||||
using TypeTag = StreamType::ImplFacade::TypeTag;
|
||||
|
||||
|
||||
class LibGavl;
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ namespace fixture {
|
|||
: util::NonCopyable
|
||||
{
|
||||
|
||||
typedef ID<Pipe> PID;
|
||||
// typedef ID<Struct> StID;
|
||||
using PID = ID<Pipe>;
|
||||
// using StID = ID<Struct>;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ namespace fixture {
|
|||
ModelPortRegistry::contains (ID<Pipe> key) const
|
||||
{
|
||||
return bool(key)
|
||||
&& util::contains (transaction_, key);
|
||||
and util::contains (transaction_, key);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ namespace fixture {
|
|||
ModelPortRegistry::isRegistered (ID<Pipe> key) const
|
||||
{
|
||||
return bool(key)
|
||||
&& util::contains (currentReg_, key);
|
||||
and util::contains (currentReg_, key);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ namespace fixture {
|
|||
private:
|
||||
static lib::OptionalRef<ModelPortRegistry> theGlobalRegistry;
|
||||
|
||||
typedef std::map<PID, ModelPortDescriptor> MPTable;
|
||||
using MPTable = std::map<PID, ModelPortDescriptor>;
|
||||
|
||||
MPTable currentReg_;
|
||||
MPTable transaction_;
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ namespace mobject {
|
|||
{
|
||||
PlacementRef<MO> newRef (pRefID);
|
||||
|
||||
if (isValid() && pRef_ == newRef )
|
||||
if (isValid() and pRef_ == newRef)
|
||||
return *this; // self assignment detected
|
||||
else
|
||||
return activate (*newRef); // STRONG exception safe
|
||||
|
|
@ -263,7 +263,7 @@ namespace mobject {
|
|||
isValid() const
|
||||
{
|
||||
return _Handle::isValid()
|
||||
&& pRef_.isValid();
|
||||
and pRef_.isValid();
|
||||
}
|
||||
|
||||
size_t
|
||||
|
|
@ -277,7 +277,7 @@ namespace mobject {
|
|||
isCompatible() const
|
||||
{
|
||||
return pRef_
|
||||
&& (*pRef_).template isCompatible<MOX>();
|
||||
and (*pRef_).template isCompatible<MOX>();
|
||||
}
|
||||
|
||||
operator string() const ///////////////////////TICKET #527 #528 should be better integrated with the other object types
|
||||
|
|
@ -296,7 +296,7 @@ namespace mobject {
|
|||
operator== (MORef<MOX> const& oRef) const
|
||||
{
|
||||
return isValid()
|
||||
&& oRef == this->pRef_;
|
||||
and oRef == this->pRef_;
|
||||
}
|
||||
|
||||
template<class MOX>
|
||||
|
|
@ -369,8 +369,8 @@ namespace mobject {
|
|||
inline bool
|
||||
isSharedPointee (MORef<MOX> const& ref1, MORef<MOY> const& ref2)
|
||||
{
|
||||
return ref1.isValid() && ref2.isValid()
|
||||
&& isSharedPointee (ref1.getPlacement(), ref2.getPlacement());
|
||||
return ref1.isValid() and ref2.isValid()
|
||||
and isSharedPointee (ref1.getPlacement(), ref2.getPlacement());
|
||||
}
|
||||
|
||||
/** check if the two references actually denote an equivalent placement */
|
||||
|
|
@ -378,8 +378,8 @@ namespace mobject {
|
|||
inline bool
|
||||
isEquivalentPlacement (MORef<MOX> const& ref1, MORef<MOY> const& ref2)
|
||||
{
|
||||
return ref1.isValid() && ref2.isValid()
|
||||
&& isSameDef (ref1.getPlacement(), ref2.getPlacement());
|
||||
return ref1.isValid() and ref2.isValid()
|
||||
and isSameDef (ref1.getPlacement(), ref2.getPlacement());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ namespace steam {
|
|||
checkValidity () const
|
||||
{
|
||||
return session::SessionServiceFetch::isAccessible() // session interface opened?
|
||||
&& session::SessionServiceFetch::isRegisteredID (this->id_);
|
||||
and session::SessionServiceFetch::isRegisteredID (this->id_);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -260,7 +260,7 @@ namespace steam {
|
|||
static PlacementMX&
|
||||
access (_Id const& placementID)
|
||||
{
|
||||
if (!placementID)
|
||||
if (not placementID)
|
||||
throw error::Logic{"Attempt to access a NIL PlacementRef"
|
||||
, LERR_(BOTTOM_PLACEMENTREF)};
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace mobject {
|
|||
isSameDef (PlacementMO const& pl1, PlacementMO const& pl2)
|
||||
{
|
||||
return pl1.getID() == pl2.getID()
|
||||
|| pl1.chain == pl2.chain
|
||||
or pl1.chain == pl2.chain
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ namespace session {
|
|||
using asset::Media;
|
||||
using lib::time::TimeVar;
|
||||
|
||||
typedef lib::P<Media> PMedia;
|
||||
typedef lib::P<asset::Clip> PClipAsset;
|
||||
using PMedia = lib::P<Media>;
|
||||
using PClipAsset = lib::P<asset::Clip>;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace session {
|
|||
REQUIRE (newLp);
|
||||
REQUIRE (!newLp->next_, "can insert only single LocatingPins");
|
||||
|
||||
if (next_ && newLp->getPrioLevel() > next_->getPrioLevel())
|
||||
if (next_ and newLp->getPrioLevel() > next_->getPrioLevel())
|
||||
return next_->addChain (newLp);
|
||||
else
|
||||
{
|
||||
|
|
@ -120,7 +120,7 @@ namespace session {
|
|||
if (!solution.still_to_solve())
|
||||
return;
|
||||
this->intersect (solution);
|
||||
if (next_ && solution.still_to_solve())
|
||||
if (next_ and solution.still_to_solve())
|
||||
next_->resolve(solution);
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ namespace session {
|
|||
bool
|
||||
LocatingPin::LocatingSolution::is_definite() ///< found a solution?
|
||||
{
|
||||
return (minTime == maxTime && minTrack == maxTrack);
|
||||
return (minTime == maxTime and minTrack == maxTrack);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace asset {
|
|||
class Effect;
|
||||
class Sequence;
|
||||
|
||||
typedef lib::P<Sequence> PSequence;
|
||||
using PSequence = lib::P<Sequence>;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ namespace session {
|
|||
bool
|
||||
exhausted()
|
||||
{
|
||||
while (!scopes_.empty() && !scopes_.top())
|
||||
while (not scopes_.empty() and not scopes_.top())
|
||||
scopes_.pop();
|
||||
return scopes_.empty();
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ namespace session {
|
|||
Pla&
|
||||
step ()
|
||||
{
|
||||
REQUIRE (!scopes_.empty() && scopes_.top());
|
||||
REQUIRE (not scopes_.empty() and scopes_.top());
|
||||
Pla& pos = *scopes_.top();
|
||||
++scopes_.top();
|
||||
scopes_.push(index_.getReferrers(pos.getID()));
|
||||
|
|
@ -323,15 +323,15 @@ namespace session {
|
|||
PlacementIndexQueryResolver::canHandleQuery(QID qID) const
|
||||
{
|
||||
return qID.kind == Goal::DISCOVERY
|
||||
&&( qID.type == getResultTypeID<Placement<MObject>>()
|
||||
||qID.type == getResultTypeID<Placement<Clip>>()
|
||||
||qID.type == getResultTypeID<Placement<Effect>>()
|
||||
and( qID.type == getResultTypeID<Placement<MObject>>()
|
||||
or qID.type == getResultTypeID<Placement<Clip>>()
|
||||
or qID.type == getResultTypeID<Placement<Effect>>()
|
||||
/////////////////////////////////////////////////////////////////TICKET #414
|
||||
|
||||
||qID.type == getResultTypeID<Placement<mobject::test::DummyMO >>()
|
||||
||qID.type == getResultTypeID<Placement<mobject::test::TestSubMO1 >>()
|
||||
||qID.type == getResultTypeID<Placement<mobject::test::TestSubMO2 >>()
|
||||
||qID.type == getResultTypeID<Placement<mobject::test::TestSubMO21>>()
|
||||
or qID.type == getResultTypeID<Placement<mobject::test::DummyMO >>()
|
||||
or qID.type == getResultTypeID<Placement<mobject::test::TestSubMO1 >>()
|
||||
or qID.type == getResultTypeID<Placement<mobject::test::TestSubMO2 >>()
|
||||
or qID.type == getResultTypeID<Placement<mobject::test::TestSubMO21>>()
|
||||
/////////////////////////////////////////////////////////////////TICKET #532
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ namespace session {
|
|||
|
||||
|
||||
/* some type shorthands */
|
||||
typedef mobject::PlacementMO PlacementMO;
|
||||
typedef PlacementIndex::PRef PRef;
|
||||
typedef PlacementIndex::ID ID;
|
||||
using PlacementMO = mobject::PlacementMO;
|
||||
using PRef = PlacementIndex::PRef;
|
||||
using ID = PlacementIndex::ID ;
|
||||
|
||||
|
||||
/*****************************************************************//**
|
||||
|
|
@ -104,7 +104,7 @@ namespace session {
|
|||
*/
|
||||
class PlacementIndex::Table
|
||||
{
|
||||
typedef shared_ptr<PlacementMO> PPlacement;
|
||||
using PPlacement = shared_ptr<PlacementMO>;
|
||||
|
||||
struct PlacementEntry
|
||||
{
|
||||
|
|
@ -113,11 +113,11 @@ namespace session {
|
|||
};
|
||||
|
||||
// using hashtables to implement the index
|
||||
typedef PlacementMO::ID PID;
|
||||
typedef unordered_map<PID, PlacementEntry> IDTable;
|
||||
typedef std::unordered_multimap<PID,PID> ScopeTable;
|
||||
using PID = PlacementMO::ID;
|
||||
using IDTable = std::unordered_map<PID, PlacementEntry>;
|
||||
using ScopeTable = std::unordered_multimap<PID,PID>;
|
||||
|
||||
typedef pair<ScopeIter, ScopeIter> ScopeContents;
|
||||
using ScopeContents = pair<ScopeIter, ScopeIter>;
|
||||
|
||||
|
||||
TypedAllocationManager allocator_;
|
||||
|
|
@ -313,7 +313,7 @@ namespace session {
|
|||
|
||||
|
||||
private:
|
||||
typedef IDTable::const_iterator Slot;
|
||||
using Slot = IDTable::const_iterator;
|
||||
|
||||
PlacementEntry const&
|
||||
base_entry (ID key) const
|
||||
|
|
@ -338,7 +338,7 @@ namespace session {
|
|||
void
|
||||
remove_from_scope (ID scopeID, ID entryID)
|
||||
{
|
||||
typedef ScopeTable::const_iterator Pos;
|
||||
using Pos = ScopeTable::const_iterator;
|
||||
pair<Pos,Pos> searchRange = scopeTab_.equal_range(scopeID);
|
||||
|
||||
Pos pos = searchRange.first;
|
||||
|
|
@ -356,13 +356,13 @@ namespace session {
|
|||
void
|
||||
remove_all_from_scope (ID scopeID)
|
||||
{
|
||||
typedef ScopeTable::const_iterator Pos;
|
||||
using Pos = ScopeTable::const_iterator;
|
||||
pair<Pos,Pos> scopeEntries = scopeTab_.equal_range(scopeID);
|
||||
Pos first = scopeEntries.first;
|
||||
Pos end = scopeEntries.second;
|
||||
|
||||
// take a snapshot of all children to be processed recursively
|
||||
typedef IterSnapshot<PID> ChildIDs;
|
||||
using ChildIDs = IterSnapshot<PID>;
|
||||
ChildIDs child (eachVal(first,end));
|
||||
|
||||
scopeTab_.erase (first,end); // assumed to be NOP for first==end
|
||||
|
|
@ -395,7 +395,7 @@ namespace session {
|
|||
}
|
||||
|
||||
|
||||
typedef function<PlacementMO& (pair<PID,PID> const&)> ElementResolver;
|
||||
using ElementResolver = function<PlacementMO& (pair<PID,PID> const&)>;
|
||||
mutable ElementResolver elementResolver_;
|
||||
|
||||
ElementResolver
|
||||
|
|
@ -614,8 +614,8 @@ namespace session {
|
|||
|
||||
PMO& theElement = *elm(id);
|
||||
ID theScope (sco(id)->getID());
|
||||
if (theScope == id
|
||||
&& elm(id)==tab._root_4check()
|
||||
if ( theScope == id
|
||||
and elm(id)==tab._root_4check()
|
||||
) // no need to check root,
|
||||
return; // because root is it's own scope
|
||||
|
||||
|
|
@ -635,7 +635,7 @@ namespace session {
|
|||
|
||||
PMO* root = tab._root_4check();
|
||||
PMO* scope = sco(id);
|
||||
while (scope && scope != sco(scope->getID()))
|
||||
while (scope and scope != sco(scope->getID()))
|
||||
scope = sco(scope->getID());
|
||||
|
||||
VERIFY ( root==scope, "(2.4) Scopes", "Found a scope not attached below root.");
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ namespace session {
|
|||
template<typename MO, typename BMO>
|
||||
struct BuildID<Placement<MO,BMO>>
|
||||
{
|
||||
typedef PlacementMO::Id<MO> Type;
|
||||
typedef MO Target;
|
||||
using Type = PlacementMO::Id<MO>;
|
||||
using Target = MO ;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ namespace session {
|
|||
QueryFocusStack::push (Scope const& newStartPoint)
|
||||
{
|
||||
ScopePath newPathFrame (newStartPoint); // may throw
|
||||
ENSURE (newPathFrame.isValid() || newStartPoint.isRoot());
|
||||
ENSURE (newPathFrame.isValid() or newStartPoint.isRoot());
|
||||
|
||||
paths_.push_back (newPathFrame);
|
||||
ENSURE (0 < size());
|
||||
|
|
@ -141,7 +141,7 @@ namespace session {
|
|||
QueryFocusStack::top ()
|
||||
{
|
||||
if ( 0 == size()
|
||||
|| 0 == paths_.back().ref_count()
|
||||
or 0 == paths_.back().ref_count()
|
||||
)
|
||||
pop_unused();
|
||||
|
||||
|
|
@ -160,10 +160,10 @@ namespace session {
|
|||
void
|
||||
QueryFocusStack::pop_unused ()
|
||||
{
|
||||
if (1 == size() && !paths_.front().isValid())
|
||||
if (1 == size() and not paths_.front().isValid())
|
||||
return; // unnecessary to evict a base frame repeatedly
|
||||
|
||||
while (size() && (0 == paths_.back().ref_count()))
|
||||
while (size() and (0 == paths_.back().ref_count()))
|
||||
paths_.pop_back();
|
||||
|
||||
if (0 == size())
|
||||
|
|
@ -183,8 +183,8 @@ namespace session {
|
|||
|
||||
paths_.resize(1);
|
||||
|
||||
ENSURE (!paths_.front().empty());
|
||||
ENSURE (!paths_.front().isValid()); // i.e. just root scope
|
||||
ENSURE (not paths_.front().empty());
|
||||
ENSURE (not paths_.front().isValid()); // i.e. just root scope
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace session {
|
|||
|
||||
namespace {
|
||||
|
||||
typedef std::pair<const QueryKey, any> AnyPair;
|
||||
using AnyPair = std::pair<const QueryKey, any>;
|
||||
|
||||
/** helper to simplify creating mock table entries, wrapped correctly */
|
||||
template<class TY>
|
||||
|
|
@ -78,7 +78,7 @@ namespace session {
|
|||
template<class STRU>
|
||||
AnyPair entry_Struct(Literal caps)
|
||||
{
|
||||
typedef typename WrapReturn<STRU>::Wrapper Ptr;
|
||||
using Ptr = typename WrapReturn<STRU>::Wrapper;
|
||||
|
||||
string capabilities (caps);
|
||||
Query<STRU> query (capabilities);
|
||||
|
|
@ -99,7 +99,7 @@ namespace session {
|
|||
INFO (config, "creating mock answers for some hard wired config queries...");
|
||||
isInit_ = true; // allow re-entrance
|
||||
|
||||
typedef const ProcPatt cPP;
|
||||
using cPP = const ProcPatt;
|
||||
|
||||
|
||||
// for baiscpipetest.cpp ---------
|
||||
|
|
@ -137,7 +137,7 @@ namespace session {
|
|||
bool
|
||||
MockTable::fabricate_matching_new_Pipe (Query<Pipe> const& q, string const& pipeID, string const& streamID)
|
||||
{
|
||||
typedef WrapReturn<Pipe>::Wrapper Ptr;
|
||||
using Ptr = WrapReturn<Pipe>::Wrapper;
|
||||
|
||||
Ptr newPipe (Struct::retrieve.newPipe (pipeID, streamID));
|
||||
answer_.insert (entry<Pipe> (q, newPipe));
|
||||
|
|
@ -148,7 +148,7 @@ namespace session {
|
|||
bool
|
||||
MockTable::fabricate_just_new_Pipe (Query<Pipe> const& q )
|
||||
{
|
||||
typedef WrapReturn<Pipe>::Wrapper Ptr;
|
||||
using Ptr = WrapReturn<Pipe>::Wrapper;
|
||||
|
||||
Ptr newPipe (Struct::retrieve.made4fake (q));
|
||||
answer_.insert (entry<Pipe> (q, newPipe));
|
||||
|
|
@ -174,8 +174,8 @@ namespace session {
|
|||
bool
|
||||
MockTable::fabricate_Timeline_on_demand (Query<asset::Timeline> const& query)
|
||||
{
|
||||
typedef asset::Timeline aTL;
|
||||
typedef WrapReturn<aTL>::Wrapper Ptr;
|
||||
using aTL = asset::Timeline;
|
||||
using Ptr = WrapReturn<aTL>::Wrapper;
|
||||
|
||||
string nameID = query.extractID("id");
|
||||
if (isnil (nameID))
|
||||
|
|
@ -210,8 +210,8 @@ namespace session {
|
|||
bool
|
||||
MockTable::fabricate_Sequence_on_demand (Query<asset::Sequence> const& query)
|
||||
{
|
||||
typedef asset::Sequence aSeq;
|
||||
typedef WrapReturn<aSeq>::Wrapper Ptr;
|
||||
using aSeq = asset::Sequence;
|
||||
using Ptr = WrapReturn<aSeq>::Wrapper;
|
||||
|
||||
string nameID = query.extractID("id");
|
||||
if (isnil (nameID))
|
||||
|
|
|
|||
|
|
@ -82,10 +82,10 @@ namespace session {
|
|||
|
||||
/** a traits-class to define the smart-ptr to wrap the result */
|
||||
template<class TY>
|
||||
struct WrapReturn { typedef P<TY> Wrapper; };
|
||||
struct WrapReturn { using Wrapper = P<TY>; };
|
||||
|
||||
template<>
|
||||
struct WrapReturn<ProcPatt> { typedef PProcPatt Wrapper; };
|
||||
struct WrapReturn<ProcPatt> { using Wrapper = PProcPatt; };
|
||||
|
||||
|
||||
/** helper detecting if a query actually intended to retrieve a "default" object.
|
||||
|
|
@ -121,7 +121,7 @@ namespace session {
|
|||
class MockTable
|
||||
: public steam::ConfigResolver
|
||||
{
|
||||
typedef std::map<QueryKey,any> Tab;
|
||||
using Tab = std::map<QueryKey,any>;
|
||||
|
||||
Tab answer_;
|
||||
bool isInit_;
|
||||
|
|
@ -185,7 +185,7 @@ namespace session {
|
|||
{
|
||||
Ret const& candidate (any_cast<Ret const&> (entry));
|
||||
if (! solution
|
||||
||(solution && solution == candidate) // simulates a real unification
|
||||
or(solution and solution == candidate) // simulates a real unification
|
||||
)
|
||||
return exists (solution = candidate);
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ namespace session {
|
|||
bool
|
||||
try_special_case (Ret& solution, Query<TY> const& q)
|
||||
{
|
||||
if (solution && isFakeBypass(q)) // backdoor for tests
|
||||
if (solution and isFakeBypass(q)) // backdoor for tests
|
||||
return exists (solution);
|
||||
|
||||
if (is_defaults_query (q))
|
||||
|
|
@ -230,13 +230,13 @@ namespace session {
|
|||
const string pipeID = q.extractID("pipe");
|
||||
const string streamID = q.extractID("stream");
|
||||
|
||||
if (candidate && pipeID == candidate->getPipeID())
|
||||
if (candidate and pipeID == candidate->getPipeID())
|
||||
return set_new_mock_solution (q, candidate); // "learn" this solution to be "valid"
|
||||
|
||||
if (!isnil(pipeID) && !isnil(streamID))
|
||||
if (!isnil(pipeID) and not isnil(streamID))
|
||||
return fabricate_matching_new_Pipe (q, pipeID, streamID);
|
||||
|
||||
if (!candidate && (!isnil(streamID) || !isnil(pipeID)))
|
||||
if (not candidate and (not isnil(streamID) or not isnil(pipeID)))
|
||||
return fabricate_just_new_Pipe (q);
|
||||
|
||||
return false;
|
||||
|
|
@ -248,7 +248,7 @@ namespace session {
|
|||
{
|
||||
const string streamID = q.extractID("stream");
|
||||
|
||||
if (!candidate && !isnil(streamID))
|
||||
if (not candidate and not isnil(streamID))
|
||||
return fabricate_ProcPatt_on_demand (q);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ namespace session {
|
|||
{
|
||||
return (1 < length())
|
||||
#if NOBUG_MODE_ALPHA
|
||||
&& hasValidRoot()
|
||||
and hasValidRoot()
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
|
@ -252,10 +252,10 @@ namespace session {
|
|||
bool
|
||||
disjoint (ScopePath const& path1, ScopePath const& path2)
|
||||
{
|
||||
if (path1.empty() || path2.empty()) return false;
|
||||
if (path1.empty() or path2.empty()) return false;
|
||||
|
||||
return (path1.isValid() && path2.isValid())
|
||||
&& (path1.path_[1] != path2.path_[1]) // no common prefix
|
||||
return (path1.isValid() and path2.isValid())
|
||||
and (path1.path_[1] != path2.path_[1]) // no common prefix
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ namespace session {
|
|||
{
|
||||
return (1 == size())
|
||||
#if NOBUG_MODE_ALPHA
|
||||
&& path_[0].isRoot()
|
||||
and path_[0].isRoot()
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace session {
|
|||
if (index().contains (scope))
|
||||
index().clear (scope);
|
||||
|
||||
ENSURE (!index().contains (scope) || (scope == index().getRoot().getID()));
|
||||
ENSURE (!index().contains (scope) or (scope == index().getRoot().getID()));
|
||||
ENSURE (siz >= index().size());
|
||||
return siz != index().size();
|
||||
}
|
||||
|
|
@ -222,7 +222,7 @@ namespace session {
|
|||
PlacementIndex&
|
||||
getPlacementIndex()
|
||||
{
|
||||
if (mockIndex_ && mockIndex_->isValid())
|
||||
if (mockIndex_ and mockIndex_->isValid())
|
||||
return *mockIndex_;
|
||||
else
|
||||
return IMPL::getPlacementIndex();
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace session {
|
|||
SessionServiceFetch::isAccessible ()
|
||||
{
|
||||
return Session::initFlag
|
||||
&& Session::current.isUp();
|
||||
and Session::current.isUp();
|
||||
}
|
||||
|
||||
/** verify the given placement-ID (hash) is valid,
|
||||
|
|
|
|||
|
|
@ -102,11 +102,11 @@ namespace play {
|
|||
Timings::isValid() const
|
||||
{
|
||||
return bool(grid_)
|
||||
&& (( (ASAP == playbackUrgency || NICE == playbackUrgency)
|
||||
&& Time::NEVER == scheduledDelivery)
|
||||
||
|
||||
(TIMEBOUND == playbackUrgency
|
||||
&& Time::MIN < scheduledDelivery && scheduledDelivery < Time::MAX)
|
||||
and (( (ASAP == playbackUrgency or NICE == playbackUrgency)
|
||||
and Time::NEVER == scheduledDelivery)
|
||||
or
|
||||
( TIMEBOUND == playbackUrgency
|
||||
and Time::MIN < scheduledDelivery and scheduledDelivery < Time::MAX)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace vault {
|
|||
* Global access point for starting a script within Lumiera application
|
||||
* context.
|
||||
*
|
||||
* @todo build the (LUA,C)-script runner.
|
||||
* @todo build a suitable binding interface and a script runner.
|
||||
*
|
||||
*/
|
||||
struct ScriptRunnerFacade
|
||||
|
|
|
|||
|
|
@ -235,28 +235,28 @@ namespace test{
|
|||
digi.installMutator (protocollingMutator, digi);
|
||||
|
||||
digi = 12.3;
|
||||
CHECK ( 0.0 == preval && 12.3 == newval);
|
||||
CHECK ( 0.0 == preval and 12.3 == newval);
|
||||
digi += 10;
|
||||
CHECK (12.3 == preval && 22.3 == newval);
|
||||
CHECK (12.3 == preval and 22.3 == newval);
|
||||
digi -= 5;
|
||||
CHECK (22.3 == preval && 17.3 == newval);
|
||||
CHECK (22.3 == preval and 17.3 == newval);
|
||||
++digi;
|
||||
CHECK (17.3 == preval && 18.3 == newval);
|
||||
CHECK (17.3 == preval and 18.3 == newval);
|
||||
digi++;
|
||||
CHECK (18.3 == preval && 19.3 == newval);
|
||||
CHECK (18.3 == preval and 19.3 == newval);
|
||||
--digi;
|
||||
CHECK (19.3 == preval && 18.3 == newval);
|
||||
CHECK (19.3 == preval and 18.3 == newval);
|
||||
digi--;
|
||||
CHECK (18.3 == preval && 17.3 == newval);
|
||||
CHECK (18.3 == preval and 17.3 == newval);
|
||||
|
||||
double val = ++digi;
|
||||
CHECK (18.3 == digi && 18.3 == val);
|
||||
CHECK (18.3 == digi and 18.3 == val);
|
||||
val = digi++;
|
||||
CHECK (19.3 == digi && 18.3 == val);
|
||||
CHECK (19.3 == digi and 18.3 == val);
|
||||
val = --digi;
|
||||
CHECK (18.3 == digi && 18.3 == val);
|
||||
CHECK (18.3 == digi and 18.3 == val);
|
||||
val = digi--;
|
||||
CHECK (17.3 == digi && 18.3 == val);
|
||||
CHECK (17.3 == digi and 18.3 == val);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ namespace test{
|
|||
seedRand();
|
||||
TimeValue o (random_or_get (pop(arg)));
|
||||
TimeValue c (random_or_get (pop(arg)));
|
||||
CHECK (c!=Time::ZERO && o != c, "unsuitable testdata");
|
||||
CHECK (c!=Time::ZERO and o != c, "unsuitable testdata");
|
||||
|
||||
// 25fps-grid, but with an time origin offset by 1/50sec
|
||||
TimeGrid::build("test_grid_PAL", FrameRate::PAL, Time(FSecs(1,50)));
|
||||
|
|
@ -346,14 +346,14 @@ namespace test{
|
|||
void
|
||||
____verify_nudged (TAR const& target, TAR const& refState, FrameCnt offsetSteps)
|
||||
{
|
||||
CHECK (target != refState || !offsetSteps);
|
||||
CHECK (target != refState or not offsetSteps);
|
||||
CHECK (target == Time(refState)+Time(FSecs(offsetSteps)));
|
||||
}
|
||||
template<>
|
||||
void
|
||||
____verify_nudged (QuTime const& target, QuTime const& refState, FrameCnt offsetSteps)
|
||||
{
|
||||
CHECK (target != refState || !offsetSteps);
|
||||
CHECK (target != refState or not offsetSteps);
|
||||
CHECK (target == Time (materialise(refState))
|
||||
+ Offset(offsetSteps, FrameRate::PAL));
|
||||
}
|
||||
|
|
@ -366,7 +366,7 @@ namespace test{
|
|||
if (isDuration<SRC>())
|
||||
{
|
||||
CHECK (materialise(target) == follower.receivedValue()
|
||||
|| Duration::NIL == follower.receivedValue() );
|
||||
or Duration::NIL == follower.receivedValue() );
|
||||
}
|
||||
else
|
||||
if (isQuTime<TAR>())
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue