SOFA API  9d9100aa
Open source framework for multi-physics simuation
sofa::core::topology::TopologyChange Class Reference

#include <TopologyChange.h>

Base class to indicate a topology change occurred. More...

Inheritance diagram for sofa::core::topology::TopologyChange:

Detailed Description

Base class to indicate a topology change occurred.

All topological changes taking place in a given BaseTopology will issue a TopologyChange in the BaseTopology's changeList, so that BasicTopologies mapped to it can know what happened and decide how to react. Classes inheriting from this one describe a given topolopy change (e.g. RemovedPoint, AddedEdge, etc). The exact type of topology change is given by member changeType.

Protected Attributes

TopologyChangeType m_changeType
 A code that tells the nature of the Topology modification event (could be an enum). More...
 

Public Member Functions

virtual ~TopologyChange ()
 
TopologyChangeType getChangeType () const
 Returns the code of this TopologyChange. More...
 
virtual bool write (std::ostream &out) const
 
virtual bool read (std::istream &in)
 

Protected Member Functions

 TopologyChange (TopologyChangeType changeType=BASE)
 

Friends

std::ostream & operator<< (std::ostream &out, const TopologyChange *t)
 Output stream. More...
 
std::istream & operator>> (std::istream &in, TopologyChange *&t)
 Input (empty) stream. More...
 
std::istream & operator>> (std::istream &in, const TopologyChange *&)
 Input (empty) stream. More...
 

Attribute details

TopologyChangeType sofa::core::topology::TopologyChange::m_changeType
protected

A code that tells the nature of the Topology modification event (could be an enum).

Constructor details

sofa::core::topology::TopologyChange::~TopologyChange ( )
virtual

\ brief Destructor.

Must be virtual for TopologyChange to be a Polymorphic type.

sofa::core::topology::TopologyChange::TopologyChange ( TopologyChangeType  changeType = BASE)
inlineprotected

Function details

TopologyChangeType sofa::core::topology::TopologyChange::getChangeType ( ) const
inline

Returns the code of this TopologyChange.

bool sofa::core::topology::TopologyChange::read ( std::istream &  in)
virtual
bool sofa::core::topology::TopologyChange::write ( std::ostream &  out) const
virtual

Related details

std::ostream& operator<< ( std::ostream &  out,
const TopologyChange t 
)
friend

Output stream.

std::istream& operator>> ( std::istream &  in,
TopologyChange *&  t 
)
friend

Input (empty) stream.

std::istream& operator>> ( std::istream &  in,
const TopologyChange *&   
)
friend

Input (empty) stream.