Helper for source morphology I/O.
More...
#include <JMorphology.hh>
Helper for source morphology I/O.
Definition at line 491 of file JMorphology.hh.
◆ dictionary_type
◆ JMorphology_t()
| JASTRONOMY::JMorphology_t::JMorphology_t |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 500 of file JMorphology.hh.
501 {
502 dictionary[
"Point"] .reset(
new JMorphologyPoint());
503 dictionary[
"Gauss"] .reset(
new JMorphologyGauss());
504 dictionary[
"Gauss2D"] .reset(
new JMorphologyGauss2D());
505 dictionary[
"Binary"] .reset(
new JMorphologyBinary());
506 dictionary[
"Histogram"].reset(
new JMorphologyHistogram());
507 }
dictionary_type dictionary
◆ getDictionary()
◆ put()
| void JASTRONOMY::JMorphology_t::put |
( |
const std::string & | key, |
|
|
JMorphology * | morphology ) |
|
inline |
Put source morphology at given key.
- Parameters
-
| key | key |
| morphology | morphology |
Definition at line 527 of file JMorphology.hh.
◆ getTitle()
| const std::string & JLANG::JTitle::getTitle |
( |
| ) |
const |
|
inlineinherited |
Get title.
- Returns
- title
Definition at line 55 of file JTitle.hh.
◆ setTitle()
| void JLANG::JTitle::setTitle |
( |
const std::string & | title | ) |
|
|
inlineinherited |
Set title.
- Parameters
-
Definition at line 66 of file JTitle.hh.
◆ operator>>
| std::istream & operator>> |
( |
std::istream & | in, |
|
|
JMorphology_t & | object ) |
|
friend |
Read source morphology from input stream.
- Parameters
-
| in | input stream |
| object | source morphology |
- Returns
- input stream
Definition at line 540 of file JMorphology.hh.
541 {
543
545
546 if (in >> key) {
547
549
550 static_cast<shared_ptr<JMorphology>&
>(object) =
object.
dictionary[key];
551
552 object.setTitle(key);
553
554 object->read(in);
555
556 } else {
557
558 THROW(JParseError,
"Invalid key " << key);
559 }
560 }
561
562 return in;
563 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JMorphology_t & | object ) |
|
friend |
Write source morphology to output stream.
- Parameters
-
| out | output stream |
| object | source morphology |
- Returns
- output stream
Definition at line 573 of file JMorphology.hh.
574 {
575 out << object.getTitle() << ' ';
576
577 if (static_cast<const std::shared_ptr<JMorphology>&>(object)) {
578 object->write(out);
579 }
580
581 return out;
582 }
◆ dictionary
◆ title
| std::string JLANG::JTitle::title |
|
protectedinherited |
The documentation for this struct was generated from the following file: