BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InsertNewItemCommandTest Class Reference
Inheritance diagram for InsertNewItemCommandTest:
[legend]
Collaboration diagram for InsertNewItemCommandTest:
[legend]

Public Member Functions

 ~InsertNewItemCommandTest ()
 
std::unique_ptr< InsertNewItemCommandcreate_command (SessionItem *parent, std::string tag, int row)
 

Detailed Description

Definition at line 28 of file insertnewitemcommand.test.cpp.

Constructor & Destructor Documentation

◆ ~InsertNewItemCommandTest()

InsertNewItemCommandTest::~InsertNewItemCommandTest ( )
default

Member Function Documentation

◆ create_command()

std::unique_ptr<InsertNewItemCommand> InsertNewItemCommandTest::create_command ( SessionItem parent,
std::string  tag,
int  row 
)
inline

Definition at line 31 of file insertnewitemcommand.test.cpp.

33  {
34  auto factory_func = [parent]() {
35  return parent->model()->factory()->createItem(Constants::BaseType);
36  };
37  return std::make_unique<InsertNewItemCommand>(factory_func, parent, TagRow{tag, row});
38  }
virtual std::unique_ptr< SessionItem > createItem(const model_type &modelType) const =0
SessionModel * model() const
Returns the model to which given item belongs to.
const ItemFactoryInterface * factory() const
Returns item factory which can generate all items supported by this model.
Aggregate to hold (tag, row) information for SessionModel.
Definition: tagrow.h:25
const model_type BaseType
Definition: mvvm_types.h:45

References ModelView::Constants::BaseType, ModelView::ItemFactoryInterface::createItem(), ModelView::SessionModel::factory(), and ModelView::SessionItem::model().

Here is the call graph for this function:

The documentation for this class was generated from the following file: