Visual Computing Library
Loading...
Searching...
No Matches
vcl::comp::Name< ParentElemType, OPT > Class Template Reference

The Name component class represents a simple name stored as string. This class is usually used as a component of a Mesh. More...

#include <vclib/mesh/components/name.h>

Inheritance diagram for vcl::comp::Name< ParentElemType, OPT >:

Public Member Functions

 Name ()=default
 Initilizes an empty name.
 
std::string & name ()
 Returns the name of this object.
 
const std::string & name () const
 Returns the name of this object.
 

Protected Member Functions

template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 

Private Types

using Base = Component< Name< ParentElemType, OPT >, CompId::NAME, std::string, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT >
 

Detailed Description

template<typename ParentElemType = void, bool OPT = false>
class vcl::comp::Name< ParentElemType, OPT >

The Name component class represents a simple name stored as string. This class is usually used as a component of a Mesh.

The member functions of this class will be available in the instance of any Element or Mesh that will contain this component.

For example, if you have a Mesh m with the Name component, you'll be able to access to this component member functions from m:

m.name();
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Note
This component can be both used for Elements and Meshes.
Template Parameters
ParentElemTypeThis template argument must be void if the component needs to be stored horizontally, or the type of the parent element that will contain this component if the component needs to be stored vertically.
OPTIf true, the component will be optional. This argument is considered only if the component is stored vertically.

Member Function Documentation

◆ name() [1/2]

template<typename ParentElemType = void, bool OPT = false>
std::string & vcl::comp::Name< ParentElemType, OPT >::name ( )
inline

Returns the name of this object.

Returns
The name of this object.

◆ name() [2/2]

template<typename ParentElemType = void, bool OPT = false>
const std::string & vcl::comp::Name< ParentElemType, OPT >::name ( ) const
inline

Returns the name of this object.

Returns
The name of this object.

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