source: src/Geometry/GeometryObject.hpp

Candidate_v1.6.1
Last change on this file was d8c6c7, checked in by Frederik Heber <frederik.heber@…>, 8 years ago

Added GeometryObject and GeometryRegistry.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 * GeometryObject.hpp
3 *
4 * Created on: Mar 25, 2017
5 * Author: heber
6 */
7
8
9#ifndef GEOMETRY_GEOMETRYOBJECT_HPP_
10#define GEOMETRY_GEOMETRYOBJECT_HPP_
11
12// include config.h
13#ifdef HAVE_CONFIG_H
14#include <config.h>
15#endif
16
17#include <iosfwd>
18#include <string>
19
20#include "LinearAlgebra/Vector.hpp"
21
22/** This class encapsulates the Vector for use in the storage.
23 *
24 * We need to add a name to the Vector, hence we store it directly
25 * more generally as a GeometryObject (if later other objects such
26 * as lines, planes need to be added).
27 */
28class GeometryObject
29{
30public:
31 /** Cstor for the GeometryObject.
32 *
33 * \param _v vector to use
34 * \param _name name to set
35 */
36 GeometryObject(const Vector &_v, const std::string &_name) :
37 name(_name),
38 v(_v)
39 {}
40
41 /** Getter for the object.
42 *
43 * \return vector v
44 */
45 Vector getVector() const
46 { return v; }
47
48 /** Setter for the name of the object.
49 *
50 * \param _name
51 */
52 void setName(const std::string &_name)
53 { name = _name; }
54
55 /** Getter for the name of the object.
56 *
57 * \return name
58 */
59 const std::string& getName() const
60 { return name; }
61
62private:
63 //!> name of object
64 std::string name;
65 //!> contained geometry, namely a vector
66 Vector v;
67};
68
69std::ostream& operator<<(std::ostream &, const GeometryObject &_vec);
70
71#endif /* GEOMETRY_GEOMETRYOBJECT_HPP_ */
Note: See TracBrowser for help on using the repository browser.