SOFA API  1a4bb3e7
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

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

Attribute details

◆ m_changeType

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

◆ ~TopologyChange()

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

\ brief Destructor.

Must be virtual for TopologyChange to be a Polymorphic type.

◆ TopologyChange()

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

Function details

◆ getChangeType()

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

Returns the code of this TopologyChange.

◆ read()

bool sofa::core::topology::TopologyChange::read ( std::istream &  in)
virtual

◆ write()

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

Related details

◆ operator<<

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

Output stream.

◆ operator>> [1/2]

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

Input (empty) stream.

◆ operator>> [2/2]

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

Input (empty) stream.