Helper for source morphology.
More...
#include <JMorphology.hh>
Helper for source morphology.
Definition at line 483 of file JMorphology.hh.
◆ JMorphology_t()
JASTRONOMY::JMorphology_t::JMorphology_t |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 490 of file JMorphology.hh.
491 {
492 dictionary[
"Point"] .reset(
new JMorphologyPoint());
493 dictionary[
"Gauss"] .reset(
new JMorphologyGauss());
494 dictionary[
"Gauss2D"] .reset(
new JMorphologyGauss2D());
495 dictionary[
"Binary"] .reset(
new JMorphologyBinary());
496 dictionary[
"Histogram"].reset(
new JMorphologyHistogram());
497 }
std::map< std::string, std::shared_ptr< JMorphology > > dictionary
◆ 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 506 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 519 of file JMorphology.hh.
520 {
522
524
525 if (in >> key) {
526
528
529 static_cast<std::shared_ptr<JMorphology>&
>(object) =
object.
dictionary[key];
530
531 object.setTitle(key);
532
533 object->read(in);
534
535 } else {
536
537 THROW(JParseError,
"Invalid key " << key);
538 }
539 }
540
541 return in;
542 }
#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 552 of file JMorphology.hh.
553 {
554 out << object.getTitle() << ' ';
555
556 if (static_cast<const std::shared_ptr<JMorphology>&>(object)) {
557 object->write(out);
558 }
559
560 return out;
561 }
◆ dictionary
◆ title
std::string JLANG::JTitle::title |
|
protectedinherited |
The documentation for this struct was generated from the following file: