PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
plask::Path Struct Reference

Path in geometry graph. More...

`#include <plask/geometry/path.hpp>`

Collaboration diagram for plask::Path:
[legend]

## Public Member Functions
| Path (const std::vector< shared_ptr< const GeometryObject > > &path)
| Path (std::vector< shared_ptr< const GeometryObject > > &&path)
| Path (const GeometryObject::Subtree &paths)
| Path (GeometryObject::Subtree &&paths)
| Path (const PathHints::Hint &hint)
| Path (const GeometryObject &object)
| Path (shared_ptr< const GeometryObject > object)
void | push_front (const std::vector< shared_ptr< const GeometryObject > > &toAdd)
| Push front content of toAdd vector to objects.
void | push_back (const std::vector< shared_ptr< const GeometryObject > > &toAdd)
| Push back content of toAdd vector to objects.
Path & | append (const std::vector< shared_ptr< const GeometryObject > > &path, const PathHints *hints=nullptr)
| Append `path` content to this path.
Path & | append (const GeometryObject::Subtree &path, const PathHints *hints=nullptr)
| Append `paths` content to this path.
Path & | append (const Path &path, const PathHints *hints=nullptr)
| Append `path` content to this path.
Path & | append (const PathHints::Hint &hint, const PathHints *hints=nullptr)
| Append `hint` to this path.
Path & | append (const GeometryObject &object, const PathHints *hints=nullptr)
| Append `object` to this path.
Path & | append (shared_ptr< const GeometryObject > object, const PathHints *hints=nullptr)
| Append `object` to this path.
Path & | operator+= (const std::vector< shared_ptr< const GeometryObject > > &path)
Path & | operator+= (const GeometryObject::Subtree &paths)
Path & | operator+= (const Path &path)
Path & | operator+= (const PathHints::Hint &hint)
Path & | operator+= (const GeometryObject &object)
Path & | operator+= (shared_ptr< const GeometryObject > object)
PathHints | getPathHints () const
| Get path hints implicted by this.
shared_ptr< const GeometryObject > | front () const
shared_ptr< const GeometryObject > | back () const
| operator PathHints () const
| Get path hinst implicted by this.

## Public Attributes
std::vector< shared_ptr< const GeometryObject > > | objects
| Path content.

## Detailed Description

Path in geometry graph.

Definition at line 244 of file path.hpp.

## Constructor & Destructor Documentation

## ◆ Path() [1/7]

plask::Path::Path | ( | const std::vector< shared_ptr< const GeometryObject > > & | path | ) |
| inline

Definition at line 254 of file path.hpp.

## ◆ Path() [2/7]

plask::Path::Path | ( | std::vector< shared_ptr< const GeometryObject > > && | path | ) |
| inline

Definition at line 257 of file path.hpp.

## ◆ Path() [3/7]

plask::Path::Path | ( | const GeometryObject::Subtree & | paths | ) |
| inline

Definition at line 260 of file path.hpp.

## ◆ Path() [4/7]

plask::Path::Path | ( | GeometryObject::Subtree && | paths | ) |
| inline

Definition at line 263 of file path.hpp.

## ◆ Path() [5/7]

plask::Path::Path | ( | const PathHints::Hint & | hint | ) |
| inline

Definition at line 270 of file path.hpp.

## ◆ Path() [6/7]

plask::Path::Path | ( | const GeometryObject & | object | ) |
| inline

Definition at line 272 of file path.hpp.

## ◆ Path() [7/7]

plask::Path::Path | ( | shared_ptr< const GeometryObject > | object | ) |
| inline

Definition at line 274 of file path.hpp.

## Member Function Documentation

## ◆ append() [1/6]

Path & plask::Path::append | ( | const GeometryObject & | object,
|  | const PathHints * | hints = `nullptr`
| ) |  |

Append `object` to this path.

Try complete missing path fragment if necessary, and throw exception it is impossible or ambiguous.

Parameters

  object | objects to add
  hints | optional path hints which are use to non-ambiguous completion of paths

Definition at line 174 of file path.cpp.

## ◆ append() [2/6]

Path & plask::Path::append | ( | const GeometryObject::Subtree & | path,
|  | const PathHints * | hints = `nullptr`
| ) |  |

Append `paths` content to this path.

Try complete missing path fragment if necessary, and throw exception it is impossible or ambiguous.

Parameters

  path | objects to add, exception will be thrown if it have branches
  hints | optional path hints which are used to non-ambiguous completion of paths

Definition at line 162 of file path.cpp.

## ◆ append() [3/6]

Path & plask::Path::append | ( | const Path & | path,
|  | const PathHints * | hints = `nullptr`
| ) |  |

Append `path` content to this path.

Try complete missing path fragment if necessary, and throw exception it is impossible or ambiguous.

Parameters

  path | objects to add
  hints | optional path hints which are use to non-ambiguous completion of paths

Definition at line 166 of file path.cpp.

## ◆ append() [4/6]

Path & plask::Path::append | ( | const PathHints::Hint & | hint,
|  | const PathHints * | hints = `nullptr`
| ) |  |

Append `hint` to this path.

Try complete missing path fragment if necessary, and throw exception it is impossible or ambiguous.

Parameters

  hint | objects to add
  hints | optional path hints which are use to non-ambiguous completion of paths

Definition at line 170 of file path.cpp.

## ◆ append() [5/6]

Path & plask::Path::append | ( | const std::vector< shared_ptr< const GeometryObject > > & | path,
|  | const PathHints * | hints = `nullptr`
| ) |  |

Append `path` content to this path.

Try complete missing path fragment if necessary, and throw exception it is impossible or ambiguous.

Parameters

  path | objects to add
  hints | optional path hints which are use to non-ambiguous completion of paths

Definition at line 146 of file path.cpp.

## ◆ append() [6/6]

Path & plask::Path::append | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints * | hints = `nullptr`
| ) |  |

Append `object` to this path.

Try complete missing path fragment if necessary, and throw exception it is impossible or ambiguous.

Parameters

  object | objects to add
  hints | optional path hints which are use to non-ambiguous completion of paths

Definition at line 178 of file path.cpp.

## ◆ back()

shared_ptr< const GeometryObject > plask::Path::back | ( |  | ) | const
| inline

Returns
  last object of the path

Definition at line 373 of file path.hpp.

## ◆ front()

shared_ptr< const GeometryObject > plask::Path::front | ( |  | ) | const
| inline

Returns
  first object of the path

Definition at line 370 of file path.hpp.

## ◆ getPathHints()

PathHints plask::Path::getPathHints | ( |  | ) | const

Get path hints implicted by this.

Returns
  path hints which include all hints implicted by this path

Definition at line 182 of file path.cpp.

## ◆ operator PathHints()

plask::Path::operator PathHints | ( |  | ) | const
| inline

Get path hinst implicted by this.

Returns
  path hints which include all hints implicted by this path

Definition at line 379 of file path.hpp.

## ◆ operator+=() [1/6]

Path & plask::Path::operator+= | ( | const GeometryObject & | object | ) |
| inline

Definition at line 359 of file path.hpp.

## ◆ operator+=() [2/6]

Path & plask::Path::operator+= | ( | const GeometryObject::Subtree & | paths | ) |
| inline

Definition at line 353 of file path.hpp.

## ◆ operator+=() [3/6]

Path & plask::Path::operator+= | ( | const Path & | path | ) |
| inline

Definition at line 355 of file path.hpp.

## ◆ operator+=() [4/6]

Path & plask::Path::operator+= | ( | const PathHints::Hint & | hint | ) |
| inline

Definition at line 357 of file path.hpp.

## ◆ operator+=() [5/6]

Path & plask::Path::operator+= | ( | const std::vector< shared_ptr< const GeometryObject > > & | path | ) |
| inline

Definition at line 351 of file path.hpp.

## ◆ operator+=() [6/6]

Path & plask::Path::operator+= | ( | shared_ptr< const GeometryObject > | object | ) |
| inline

Definition at line 361 of file path.hpp.

## ◆ push_back()

void plask::Path::push_back | ( | const std::vector< shared_ptr< const GeometryObject > > & | toAdd | ) |

Push back content of toAdd vector to objects.

Skip first object from `toAdd` if it is last in objects, but neither check path integrity nor complete path.

Parameters

  toAdd | objects to push on back of objects

See also
  operator+=(const std::vector< shared_ptr<const GeometryObject> >& path)

Definition at line 134 of file path.cpp.

## ◆ push_front()

void plask::Path::push_front | ( | const std::vector< shared_ptr< const GeometryObject > > & | toAdd | ) |

Push front content of toAdd vector to objects.

Skip last object from `toAdd` if it is first in objects, but neither check path integrity nor complete path.

Parameters

  toAdd | objects to push on front of objects

See also
  operator+=(const std::vector< shared_ptr<const GeometryObject> >& path)

Definition at line 122 of file path.cpp.

## Member Data Documentation

## ◆ objects

std::vector< shared_ptr<const GeometryObject> > plask::Path::objects

Path content.

Definition at line 277 of file path.hpp.

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

- plask/geometry/path.hpp
- plask/geometry/path.cpp