Drake
Drake C++ Documentation
FemModel< T >::Builder Class Referenceabstract

Detailed Description

template<typename T>
class drake::multibody::fem::FemModel< T >::Builder

Builder that builds the FemModel.

Each concrete FemModel must define its own builder, subclassing this class, to add new elements to the model.

#include <drake/multibody/fem/fem_model.h>

Public Member Functions

virtual ~Builder ()=default
 
void Build ()
 Adds the FEM elements described by calls to this builder to this associated FemModel. More...
 
Does not allow copy, move, or assignment
 Builder (const Builder &)=delete
 
Builderoperator= (const Builder &)=delete
 
 Builder (Builder &&)=delete
 
Builderoperator= (Builder &&)=delete
 

Protected Member Functions

void ThrowIfBuilt () const
 Throws an exception if Build() has been called on this Builder. More...
 
 Builder (FemModel< T > *model)
 Constructs a new builder that builds into the given model. More...
 
virtual void DoBuild ()=0
 Derived builders must provide implementations for this function to add the FEM elements described by calls to the builder to the associated FemModel. More...
 

Constructor & Destructor Documentation

◆ Builder() [1/3]

Builder ( const Builder )
delete

◆ Builder() [2/3]

Builder ( Builder &&  )
delete

◆ ~Builder()

virtual ~Builder ( )
virtualdefault

◆ Builder() [3/3]

Builder ( FemModel< T > *  model)
explicitprotected

Constructs a new builder that builds into the given model.

Precondition
model != nullptr.
Note
The model pointer is persisted and the pointed to FemModel must outlive this *Builder.

Member Function Documentation

◆ Build()

void Build ( )

Adds the FEM elements described by calls to this builder to this associated FemModel.

The builder is left in an invalid state after Build() is invoked, and should thus be discarded and not reused again.

◆ DoBuild()

virtual void DoBuild ( )
protectedpure virtual

Derived builders must provide implementations for this function to add the FEM elements described by calls to the builder to the associated FemModel.

◆ operator=() [1/2]

Builder& operator= ( Builder &&  )
delete

◆ operator=() [2/2]

Builder& operator= ( const Builder )
delete

◆ ThrowIfBuilt()

void ThrowIfBuilt ( ) const
protected

Throws an exception if Build() has been called on this Builder.


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