9#include "MantidGeometry/DllConfig.h"
36 std::string
type()
const override {
return "ICompAssembly"; }
49 virtual std::shared_ptr<IComponent>
getChild(
const int i)
const = 0;
52 virtual std::shared_ptr<const IComponent>
getComponentByName(
const std::string &cname,
int nlevels = 0)
const = 0;
54 virtual void getChildren(std::vector<IComponent_const_sptr> &outVector,
bool recursive)
const = 0;
57 virtual std::shared_ptr<IComponent>
operator[](
int i)
const = 0;
Class for Assembly of geometric components.
virtual void printTree(std::ostream &) const =0
Print information about all the elements in the tree to a stream Loops through all components in the ...
IComponent * clone() const override=0
Make a clone of the present component.
ICompAssembly & operator=(const ICompAssembly &)=delete
virtual void getChildren(std::vector< IComponent_const_sptr > &outVector, bool recursive) const =0
Get all children.
ICompAssembly(const ICompAssembly &)=default
Protected copy constructor.
virtual std::shared_ptr< const IComponent > getComponentByName(const std::string &cname, int nlevels=0) const =0
Returns a pointer to the first component of assembly encountered with the given name.
virtual int addCopy(IComponent *)=0
Add a copy (clone) of a component.
virtual std::shared_ptr< IComponent > getChild(const int i) const =0
Get a pointer to the ith component within the assembly.
std::string type() const override
String description of the type of component.
virtual void printChildren(std::ostream &) const =0
Print information about all children.
virtual void testIntersectionWithChildren(Track &testRay, std::deque< IComponent_const_sptr > &searchQueue) const =0
Test the intersection of the ray with the children of the component assembly.
virtual int nelements() const =0
Return the number of elements in the assembly.
virtual int addCopy(IComponent *, const std::string &)=0
Add a copy (clone) of a component and rename it.
virtual std::shared_ptr< IComponent > operator[](int i) const =0
Overloaded index operator.
virtual int add(IComponent *)=0
Add a component to the assembly.
base class for Geometric IComponent
Defines a track as a start point and a direction.
std::shared_ptr< const ICompAssembly > ICompAssembly_const_sptr
Shared pointer to a const ICompAssembly.
std::shared_ptr< ICompAssembly > ICompAssembly_sptr
Shared pointer to a ICompAssembly.
Helper class which provides the Collimation Length for SANS instruments.