CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::FunctionVisitor Class Referenceabstract

#include <FunctionVisitor.hh>

+ Inheritance diagram for CASM::FunctionVisitor:

Detailed Description

Defines visitor pattern for abstract Function objects. FunctionVisitor has virtual methods for each type of derived Function object, which by default do nothing. Classes that derive from FunctionVisitor implement specific visitation behavior by overloading the virtual visit() methods, as needed. An abstract FunctionVisitor object operates on a Function tree by being passed to the Function::accept(FunctionVisitor*) method of the root of the tree.

Definition at line 34 of file FunctionVisitor.hh.

Public Member Functions

virtual ~FunctionVisitor ()
 
virtual std::string type_name () const =0
 
virtual bool visit (Variable const &host, BasisSet const *bset_ptr) const
 
virtual bool visit (Variable &host, BasisSet const *bset_ptr) const
 
virtual bool visit (OccupantFunction const &host, BasisSet const *bset_ptr) const
 
virtual bool visit (OccupantFunction &host, BasisSet const *bset_ptr) const
 
virtual bool visit (PolynomialFunction const &host, BasisSet const *bset_ptr) const
 
virtual bool visit (PolynomialFunction &host, BasisSet const *bset_ptr) const
 

Private Member Functions

virtual bool _generic_visit (Function &host, BasisSet const *bset_ptr) const
 
virtual bool _generic_visit (Function const &host, BasisSet const *bset_ptr) const
 
virtual bool _visit (const Array< Function * > &host_list, BasisSet const *bset_ptr) const
 

Constructor & Destructor Documentation

◆ ~FunctionVisitor()

virtual CASM::FunctionVisitor::~FunctionVisitor ( )
inlinevirtual

Definition at line 36 of file FunctionVisitor.hh.

Member Function Documentation

◆ _generic_visit() [1/2]

bool CASM::FunctionVisitor::_generic_visit ( Function host,
BasisSet const *  bset_ptr 
) const
privatevirtual

Reimplemented in CASM::SubExpressionLabeler.

Definition at line 55 of file FunctionVisitor.cc.

◆ _generic_visit() [2/2]

bool CASM::FunctionVisitor::_generic_visit ( Function const &  host,
BasisSet const *  bset_ptr 
) const
privatevirtual

Reimplemented in CASM::SubExpressionLabeler, and CASM::OccFuncEvaluator.

Definition at line 61 of file FunctionVisitor.cc.

◆ _visit()

virtual bool CASM::FunctionVisitor::_visit ( const Array< Function * > &  host_list,
BasisSet const *  bset_ptr 
) const
inlineprivatevirtual

Definition at line 60 of file FunctionVisitor.hh.

◆ type_name()

virtual std::string CASM::FunctionVisitor::type_name ( ) const
pure virtual

◆ visit() [1/6]

bool CASM::FunctionVisitor::visit ( OccupantFunction host,
BasisSet const *  bset_ptr 
) const
virtual

Reimplemented in CASM::OccFuncEvaluator, CASM::OccFuncBasisIndexer, and CASM::OccFuncLabeler.

Definition at line 40 of file FunctionVisitor.cc.

◆ visit() [2/6]

bool CASM::FunctionVisitor::visit ( OccupantFunction const &  host,
BasisSet const *  bset_ptr 
) const
virtual

Reimplemented in CASM::OccFuncEvaluator.

Definition at line 35 of file FunctionVisitor.cc.

◆ visit() [3/6]

bool CASM::FunctionVisitor::visit ( PolynomialFunction host,
BasisSet const *  bset_ptr 
) const
virtual

Definition at line 50 of file FunctionVisitor.cc.

◆ visit() [4/6]

bool CASM::FunctionVisitor::visit ( PolynomialFunction const &  host,
BasisSet const *  bset_ptr 
) const
virtual

Definition at line 45 of file FunctionVisitor.cc.

◆ visit() [5/6]

bool CASM::FunctionVisitor::visit ( Variable host,
BasisSet const *  bset_ptr 
) const
virtual

Reimplemented in CASM::VariableLabeler.

Definition at line 31 of file FunctionVisitor.cc.

◆ visit() [6/6]

bool CASM::FunctionVisitor::visit ( Variable const &  host,
BasisSet const *  bset_ptr 
) const
virtual

Definition at line 26 of file FunctionVisitor.cc.


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