Assets: verify creation of ErrorLog meta-Asset
This commit is contained in:
parent
f872e22216
commit
53c47a6fcc
5 changed files with 25 additions and 10 deletions
|
|
@ -31,13 +31,13 @@
|
|||
#include "proc/assetmanager.hpp"
|
||||
//#include "lib/time/timevalue.hpp"
|
||||
//#include "lib/format-string.hpp"
|
||||
#include "lib/util.hpp"
|
||||
//#include "lib/util.hpp"
|
||||
|
||||
//#include <string>
|
||||
|
||||
//using util::_Fmt;
|
||||
//using util::cStr;
|
||||
using util::isnil;
|
||||
//using util::isnil;
|
||||
//using std::string;
|
||||
using std::dynamic_pointer_cast;
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ namespace meta {
|
|||
lib::P<ErrorLog>
|
||||
Builder<ErrorLog>::commit()
|
||||
{
|
||||
ASSERT (isnil (nameID), "only the single global Error Log is implemented for now"); ////////////////////TICKET #1157 : and the entity created here is bare of any functionality
|
||||
ASSERT (nameID == theErrorLog_ID.getSym(), "only the single global Error Log is implemented for now");///TICKET #1157 : and the entity created here is bare of any functionality
|
||||
return AssetManager::wrap (*new ErrorLog{theErrorLog_ID});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,14 +54,14 @@ namespace proc {
|
|||
namespace asset {
|
||||
|
||||
inline void
|
||||
dump (PcAsset& aa)
|
||||
dump (PcAsset const& aa)
|
||||
{
|
||||
if (!aa)
|
||||
cout << "Asset(NULL)\n";
|
||||
else
|
||||
{
|
||||
_Fmt fmt("%s %|50T.| id=%s adr=%p smart-ptr=%p use-count=%u");
|
||||
cout << fmt % aa % aa->getID() % aa.get() % &aa % (aa.use_count() - 1) << "\n";
|
||||
cout << fmt % aa % aa->getID() % (void*)aa.get() % &aa % (aa.use_count() - 1) << "\n";
|
||||
} }
|
||||
|
||||
|
||||
|
|
@ -70,7 +70,8 @@ namespace asset {
|
|||
{
|
||||
list<PcAsset> assets (AssetManager::instance().listContent());
|
||||
cout << "----all-registered-Assets----\n";
|
||||
for_each (assets, bind (&dump, _1));
|
||||
for (auto const& pA : assets)
|
||||
dump (pA);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -236,9 +236,13 @@ namespace test {
|
|||
// for the ErrorLog assert, as of 8/2018 there is just one single global placeholder entity available
|
||||
asset::meta::PLog globalLog = asset::meta::ErrorLog::global(); /////////////////////////////////TICKET #1157 : what's the purpose of this ErrorLog Asset after all??
|
||||
|
||||
|
||||
CHECK (globalLog->ident.name == meta::theErrorLog_ID.getSym());
|
||||
CHECK (AssetManager::instance().known (globalLog->getID()));
|
||||
CHECK (2 == globalLog.use_count()); // AssetManager also holds a reference
|
||||
|
||||
PAsset furtherRef = asset::meta::ErrorLog::global();
|
||||
CHECK (3 == globalLog.use_count());
|
||||
CHECK (furtherRef == globalLog);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ namespace test{
|
|||
* - re-access the instances just by symbolic ID
|
||||
* - verify the registration is cleaned up automatically.
|
||||
*
|
||||
* @todo partially unimplemented and thus commented out ////////////////////TICKET #599
|
||||
* @todo draft from 2010 -- partially unimplemented and thus commented out //////////////////////////////////////////STICKET #599
|
||||
*
|
||||
* @see typed-id.hpp interface covered here
|
||||
* @see typed-lookup.cpp implementation
|
||||
|
|
|
|||
|
|
@ -14325,7 +14325,7 @@
|
|||
</node>
|
||||
</node>
|
||||
<node CREATED="1486943969999" ID="ID_1823284637" MODIFIED="1518487921078" TEXT="Wizzard">
|
||||
<node CREATED="1533688038820" ID="ID_70134302" MODIFIED="1533998488236" TEXT="Fehlerlog (notification display)">
|
||||
<node CREATED="1533688038820" ID="ID_70134302" MODIFIED="1534025106095" TEXT="Fehlerlog (notification display)">
|
||||
<linktarget COLOR="#a9aac1" DESTINATION="ID_70134302" ENDARROW="Default" ENDINCLINATION="-1984;0;" ID="Arrow_ID_1885125683" SOURCE="ID_361019548" STARTARROW="None" STARTINCLINATION="803;-67;"/>
|
||||
</node>
|
||||
<node CREATED="1486943974590" ID="ID_1603501979" MODIFIED="1518487921078" TEXT="Hilfe (Website?)"/>
|
||||
|
|
@ -32053,6 +32053,10 @@
|
|||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1481777343548" ID="ID_354877994" MODIFIED="1518487921096" TEXT="irgendwann post main()"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1534025083017" ID="ID_1484082332" MODIFIED="1534025124521" TEXT="weiterlaufende Render-Prozesse">
|
||||
<linktarget COLOR="#eb4053" DESTINATION="ID_1484082332" ENDARROW="Default" ENDINCLINATION="568;0;" ID="Arrow_ID_936372806" SOURCE="ID_1126518975" STARTARROW="Default" STARTINCLINATION="291;0;"/>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1481777355747" ID="ID_1804595708" MODIFIED="1518487921096" TEXT="Subsystem->end">
|
||||
<node CREATED="1481777368330" ID="ID_1933237483" MODIFIED="1518487921096" TEXT="Halte-Nachricht"/>
|
||||
|
|
@ -32134,6 +32138,12 @@
|
|||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1534024950739" ID="ID_1395279965" MODIFIED="1534024969582" TEXT="Races und mögliche Kollisionen überall">
|
||||
<icon BUILTIN="clanbomber"/>
|
||||
</node>
|
||||
<node CREATED="1534025017601" ID="ID_1126518975" MODIFIED="1534025124521" TEXT="Zusammenhang mit dem Session-Lebenszyklus">
|
||||
<arrowlink COLOR="#eb4053" DESTINATION="ID_1484082332" ENDARROW="Default" ENDINCLINATION="568;0;" ID="Arrow_ID_936372806" STARTARROW="Default" STARTINCLINATION="291;0;"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1533918431595" ID="ID_1121251191" MODIFIED="1533918772587" TEXT="ErrorLog(Asset)">
|
||||
|
|
@ -32215,7 +32225,7 @@
|
|||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1533997901765" ID="ID_361019548" MODIFIED="1533998488236">
|
||||
<node CREATED="1533997901765" ID="ID_361019548" MODIFIED="1534025106095">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue