The Lumiera »Reference Platform« is now upgraded to Debian/Buster, which provides GCC-14 and Clang-20. Thus the compiler support for C++20 language features seems solid enough, and C++23, while still in ''experimental stage'' can be seen as a complement and addendum. This changeset * upgrades the compile switches for the build system * provides all the necessary adjustments to keep the code base compilable Notable changes: * λ-capture by value now requires explicit qualification how to handle `this` * comparison operators are now handled transparently by the core language, largely obsoleting boost::operators. This change incurs several changes to implicit handling rules and causes lots of ambiguities — which typically pinpoint some long standing design issues, especially related to MObjects and the ''time entities''. Most tweaks done here can be ''considered preliminary'' * unfortunately the upgraded standard ''fails'' to handle **tuple-like** entities in a satisfactory way — rather an ''exposition-only'' concept is introduced, which applies solely to some containers from the STL, thereby breaking some very crucial code in the render entities, which was built upon the notion of ''tuple-like'' entities and the ''tuple protocol''. The solution is to abandon the STL in this respect and **provide an alternative implementation** of the `apply` function and related elements.
79 lines
1.8 KiB
C++
79 lines
1.8 KiB
C++
/*
|
||
ABSTRACTMO.hpp - abstract base class for all Media Objects
|
||
|
||
Copyright (C)
|
||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||
|
||
**Lumiera** is free software; you can redistribute it and/or modify it
|
||
under the terms of the GNU General Public License as published by the
|
||
Free Software Foundation; either version 2 of the License, or (at your
|
||
option) any later version. See the file COPYING for further details.
|
||
|
||
*/
|
||
|
||
|
||
/** @file abstractmo.hpp
|
||
** @todo result of the very first code generation from UML in 2008. Relevance not clear yet...
|
||
*/
|
||
|
||
|
||
#ifndef MOBJECT_SESSION_ABSTRACTMO_H
|
||
#define MOBJECT_SESSION_ABSTRACTMO_H
|
||
|
||
#include "steam/mobject/mobject.hpp"
|
||
#include "lib/symbol.hpp"
|
||
|
||
|
||
|
||
namespace steam {
|
||
namespace mobject {
|
||
namespace session {
|
||
|
||
namespace error = lumiera::error;
|
||
|
||
|
||
/**
|
||
* abstract base class of all MObjects for providing common services.
|
||
* @todo seems that we don't need this intermediate class...
|
||
*/
|
||
class AbstractMO
|
||
: public MObject
|
||
{
|
||
|
||
|
||
/* === some default implementations === */
|
||
|
||
DEFINE_PROCESSABLE_BY (builder::BuilderTool);
|
||
|
||
string
|
||
initShortID() const
|
||
{
|
||
return buildShortID("MObject");
|
||
}
|
||
|
||
public:
|
||
|
||
Duration&
|
||
getLength()
|
||
{
|
||
return length_;
|
||
}
|
||
|
||
bool isEquivalentTo (const MObject& oo) const override;
|
||
|
||
protected:
|
||
void
|
||
throwIfInvalid() const
|
||
{
|
||
if (!isValid())
|
||
throw error::Fatal ("Invalid MObject in model. Indicates a race "
|
||
"or similarly broken internal assumptions.");
|
||
}
|
||
|
||
string buildShortID (lib::Literal typeID, string suffix ="") const;
|
||
};
|
||
|
||
|
||
|
||
}}} // namespace steam::mobject::session
|
||
#endif
|