PLaSK library
Loading...
Searching...
No Matches
plask::Mesh Struct Referenceabstract

Base class for all the meshes. More...

#include <plask/mesh/mesh.hpp>

Inheritance diagram for plask::Mesh:
[legend]
Collaboration diagram for plask::Mesh:
[legend]

Classes

struct  Event
 Store information about event connected with mesh. More...
 

Public Member Functions

template<typename ClassT , typename methodT >
boost::signals2::connection changedConnectMethod (ClassT *obj, methodT method, boost::signals2::connect_position at=boost::signals2::at_back)
 Connect a method to changed signal.
 
template<typename ClassT , typename methodT >
void changedDisconnectMethod (ClassT *obj, methodT method)
 
template<typename EventT = Event, typename ... Args>
void fireChanged (Args &&... event_constructor_params_without_source)
 Call changed with this as event source.
 
void fireResized ()
 This method is called when the mesh is resized.
 
virtual std::size_t size () const =0
 
virtual bool empty () const
 
virtual void writeXML (XMLElement &object) const
 Write mesh to XML.
 
virtual ~Mesh ()
 
- Public Member Functions inherited from plask::Printable
virtual void print (std::ostream &out) const =0
 Print this to stream out.
 
virtual ~Printable ()
 
std::string str () const
 Get string representation of this using print method.
 
- Public Member Functions inherited from plask::MeshBase
virtual ~MeshBase ()
 

Public Attributes

boost::signals2::signal< void(Event &)> changed
 Changed signal, fired when mesh was changed.
 

Protected Member Functions

virtual void onChange (const Event &evt)
 This method is called when the mesh is changed, just before changed signal.
 

Detailed Description

Base class for all the meshes.

Mesh represent a set of points in 2D or 3D space and:

  • knows number of points,
  • allows for iterate over this points,
  • can calculate interpolated value for given destination points, source values, and the interpolation method,
  • inform about self changes.
See also
Meshes

Definition at line 134 of file mesh.hpp.

Constructor & Destructor Documentation

◆ ~Mesh()

virtual plask::Mesh::~Mesh ( )
inlinevirtual

Definition at line 223 of file mesh.hpp.

Member Function Documentation

◆ changedConnectMethod()

boost::signals2::connection plask::Mesh::changedConnectMethod ( ClassT obj,
methodT  method,
boost::signals2::connect_position  at = boost::signals2::at_back 
)
inline

Connect a method to changed signal.

Parameters
obj,methodslot to connect, object and it's method
atspecifies where the slot should be connected:
  • boost::signals2::at_front indicates that the slot will be connected at the front of the list or group of slots
  • boost::signals2::at_back (default) indicates that the slot will be connected at the back of the list or group of slots

Definition at line 188 of file mesh.hpp.

◆ changedDisconnectMethod()

void plask::Mesh::changedDisconnectMethod ( ClassT obj,
methodT  method 
)
inline

Definition at line 193 of file mesh.hpp.

◆ empty()

virtual bool plask::Mesh::empty ( ) const
inlinevirtual

◆ fireChanged()

template<typename EventT = Event, typename ... Args>
void plask::Mesh::fireChanged ( Args &&...  event_constructor_params_without_source)
inline

Call changed with this as event source.

Parameters
event_constructor_params_without_sourceparameters for event constructor (without first - source)

Definition at line 202 of file mesh.hpp.

◆ fireResized()

void plask::Mesh::fireResized ( )
inline

This method is called when the mesh is resized.

Definition at line 209 of file mesh.hpp.

◆ onChange()

void plask::Mesh::onChange ( const Event evt)
protectedvirtual

This method is called when the mesh is changed, just before changed signal.

Parameters
evttriggering event

Definition at line 22 of file mesh.cpp.

◆ size()

◆ writeXML()

Member Data Documentation

◆ changed

boost::signals2::signal<void(Event&)> plask::Mesh::changed

Changed signal, fired when mesh was changed.

Definition at line 178 of file mesh.hpp.


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