libMesh
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
libMesh::Predicates::abstract_multi_predicate< T > Struct Template Reference

#include <multi_predicates.h>

Inheritance diagram for libMesh::Predicates::abstract_multi_predicate< T >:
[legend]

Public Member Functions

virtual ~abstract_multi_predicate ()
 
abstract_multi_predicateoperator= (const abstract_multi_predicate &rhs)
 
virtual bool operator() (const T &it) const
 

Protected Member Functions

 abstract_multi_predicate ()
 
 abstract_multi_predicate (const abstract_multi_predicate &rhs)
 
void deep_copy (const abstract_multi_predicate &rhs)
 

Protected Attributes

std::vector< predicate< T > * > _predicates
 

Detailed Description

template<typename T>
struct libMesh::Predicates::abstract_multi_predicate< T >

Definition at line 55 of file multi_predicates.h.

Constructor & Destructor Documentation

template<typename T >
virtual libMesh::Predicates::abstract_multi_predicate< T >::~abstract_multi_predicate ( )
virtual

Definition at line 58 of file multi_predicates.h.

59  {
60  // Clean-up vector
61  for (std::size_t i=0; i<_predicates.size(); ++i)
62  delete _predicates[i];
63  }
std::vector< predicate< T > * > _predicates

Definition at line 96 of file multi_predicates.h.

96 {}
template<typename T >
libMesh::Predicates::abstract_multi_predicate< T >::abstract_multi_predicate ( const abstract_multi_predicate< T > &  rhs)
protected

Definition at line 99 of file multi_predicates.h.

100  {
101  this->deep_copy(rhs);
102  }
void deep_copy(const abstract_multi_predicate &rhs)

Member Function Documentation

template<typename T >
void libMesh::Predicates::abstract_multi_predicate< T >::deep_copy ( const abstract_multi_predicate< T > &  rhs)
protected

Definition at line 107 of file multi_predicates.h.

References libMesh::Predicates::abstract_multi_predicate< T >::_predicates.

108  {
109  for (std::size_t i=0; i<rhs._predicates.size(); ++i)
110  _predicates.push_back(rhs._predicates[i]->clone());
111  }
std::vector< predicate< T > * > _predicates
template<typename T >
virtual bool libMesh::Predicates::abstract_multi_predicate< T >::operator() ( const T &  it) const
virtual

Definition at line 79 of file multi_predicates.h.

References libMesh::libmesh_assert(), and pred.

80  {
81  for (std::size_t i=0; i<_predicates.size(); ++i)
82  {
83  const predicate<T> * pred = _predicates[i];
84 
85  libmesh_assert (pred);
86 
87  if (!(*pred)(it))
88  return false;
89  }
90 
91  return true;
92  }
libmesh_assert(j)
std::vector< predicate< T > * > _predicates
PredBase * pred
The predicate object.
template<typename T >
abstract_multi_predicate& libMesh::Predicates::abstract_multi_predicate< T >::operator= ( const abstract_multi_predicate< T > &  rhs)

Definition at line 66 of file multi_predicates.h.

67  {
68  // First clear out the predicates vector
69  for (std::size_t i=0; i<_predicates.size(); ++i)
70  delete _predicates[i];
71 
72  // Now copy over the information from the rhs.
73  this->deep_copy(rhs);
74 
75  return *this;
76  }
void deep_copy(const abstract_multi_predicate &rhs)
std::vector< predicate< T > * > _predicates

Member Data Documentation

template<typename T >
std::vector<predicate<T> *> libMesh::Predicates::abstract_multi_predicate< T >::_predicates
protected

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