35 EXPECT_TRUE(path.
str().empty());
42 EXPECT_EQ(path.
str(),
"1");
45 EXPECT_EQ(path.
str(),
"1,2");
48 EXPECT_EQ(path.
str(),
"3,1,2");
54 EXPECT_EQ(path.
str(),
"1,2,3");
60 EXPECT_EQ(path.
str(),
"3,2,3");
70 auto alienItem = std::make_unique<SessionItem>();
Supports navigation through SessionModel.
void prepend(PathElement element)
static Path fromVector(const std::vector< int > &data)
Constructs Path object from vector of integers..
static Path fromString(const std::string &str)
Constructs Path object from string containing sequence of integers ("0,0,1,3").
std::string str() const
Returns string representing path ("0,0,1,3").
void append(PathElement element)
The main object representing an editable/displayable/serializable entity.
void registerTag(const TagInfo &tagInfo, bool set_as_default=false)
Registers tag to hold items under given name.
Main class to hold hierarchy of SessionItem objects.
T * insertItem(SessionItem *parent=nullptr, const TagRow &tagrow={})
Inserts item into given parent under given tagrow.
static TagInfo universalTag(std::string name, std::vector< std::string > modelTypes={})
Constructs universal tag intended for unlimited amount of various items.
MVVM_MODEL_EXPORT SessionItem * ItemFromPath(const SessionModel &moodel, const Path &path)
Returns item found in the model following given Path.
MVVM_MODEL_EXPORT Path PathFromItem(const SessionItem *item)
Constructs path to find given item. Item must belong to a model.
materialitems.h Collection of materials to populate MaterialModel.
TEST_F(PathTest, initialState)