Helper for source morphology.
More...
#include <JMorphology.hh>
Helper for source morphology.
Definition at line 494 of file JMorphology.hh.
◆ JMorphology_t()
JASTRONOMY::JMorphology_t::JMorphology_t |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 501 of file JMorphology.hh.
502 {
503 dictionary[
"Point"] .reset(
new JMorphologyPoint());
504 dictionary[
"Gauss"] .reset(
new JMorphologyGauss());
505 dictionary[
"Gauss2D"] .reset(
new JMorphologyGauss2D());
506 dictionary[
"Binary"] .reset(
new JMorphologyBinary());
507 dictionary[
"Histogram"].reset(
new JMorphologyHistogram());
508 }
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 517 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 530 of file JMorphology.hh.
531 {
533
535
536 if (in >> key) {
537
539
540 static_cast<std::shared_ptr<JMorphology>&
>(object) =
object.
dictionary[key];
541
542 object.setTitle(key);
543
544 object->read(in);
545
546 } else {
547
548 THROW(JParseError,
"Invalid key " << key);
549 }
550 }
551
552 return in;
553 }
#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 563 of file JMorphology.hh.
564 {
565 out << object.getTitle() << ' ';
566
567 if (static_cast<const std::shared_ptr<JMorphology>&>(object)) {
568 object->write(out);
569 }
570
571 return out;
572 }
◆ dictionary
◆ title
std::string JLANG::JTitle::title |
|
protectedinherited |
The documentation for this struct was generated from the following file: