Rodin/FormLanguage/List.h file

Polymorphic container for form language objects.

This file defines the List class template, which provides a type-safe container for storing polymorphic form language objects. The List maintains ownership of its elements through unique pointers and supports standard container operations.

Design

The List class is designed to work with types derived from FormLanguage::Base, leveraging the copy() method for proper polymorphic copying. Elements are stored as unique_ptr instances, ensuring automatic memory management.

Usage Example

List<BoundaryCondition> bcList;
bcList.add(DirichletBC(...));
bcList.add(NeumannBC(...));

for (const auto& bc : bcList)
{
  // Process each boundary condition
}

Namespaces

namespace Rodin
The Rodin library for Shape and Topology Optimization.
namespace Rodin::FormLanguage
Module for writing high level abstract expressions.

Classes

template<class T>
class Rodin::FormLanguage::List
Container for polymorphic form language objects.
class Rodin::FormLanguage::List::Iterator
Forward iterator for non-const List.
class Rodin::FormLanguage::List::ConstIterator
Forward iterator for const List.