MCPcopy Create free account
hub / github.com/bluescan/tacentview / Load

Method Load

Src/FileDialog.cpp:358–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356
357
358bool Bookmark::Load(tExpr expr)
359{
360 Items.Empty();
361 if (expr.Item0() != "Bookmark")
362 return false;
363
364 if (expr.CountItems() < 3)
365 return false;
366
367 switch (expr.Item1().Hash())
368 {
369 case tHash::tHashCT("User"): BookmarkType = Type::User; break;
370 case tHash::tHashCT("Home"): BookmarkType = Type::Home; break;
371 case tHash::tHashCT("Root"): BookmarkType = Type::Root; break;
372 }
373
374 for (tExpr e = expr.Item2(); e.IsValid(); e = e.Next())
375 Items.Append(new tStringItem(e.GetAtomString()));
376
377 return false;
378}
379
380
381bool Bookmark::operator==(const Bookmark& b) const

Callers

nothing calls this directly

Calls 2

ExistsMethod · 0.80
IsValidMethod · 0.45

Tested by

no test coverage detected