aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
gum::prm::o3prm::O3PRM Class Reference

The O3PRM is part of the AST of the O3PRM language. More...

#include <agrum/PRM/o3prm/O3prm.h>

Public Types

using O3TypeList = std::vector< std::unique_ptr< O3Type > >
using O3IntTypeList = std::vector< std::unique_ptr< O3IntType > >
using O3RealTypeList = std::vector< std::unique_ptr< O3RealType > >
using O3InterfaceList = std::vector< std::unique_ptr< O3Interface > >
using O3ClassList = std::vector< std::unique_ptr< O3Class > >
using O3SystemList = std::vector< std::unique_ptr< O3System > >
using O3ImportList = std::vector< std::unique_ptr< O3Import > >

Public Member Functions

 O3PRM ()
 O3PRM (const O3PRM &src)
 O3PRM (O3PRM &&src)
 ~O3PRM ()
O3PRM & operator= (const O3PRM &src)
O3PRM & operator= (O3PRM &&src)
O3TypeList & types ()
const O3TypeList & types () const
O3IntTypeList & int_types ()
const O3IntTypeList & int_types () const
O3RealTypeList & real_types ()
const O3RealTypeList & real_types () const
O3InterfaceList & interfaces ()
const O3InterfaceList & interfaces () const
O3ClassList & classes ()
const O3ClassList & classes () const
O3SystemList & systems ()
const O3SystemList & systems () const
O3ImportList & imports ()
const O3ImportList & imports () const

Private Attributes

O3TypeList _types_
O3IntTypeList _int_types_
O3RealTypeList _real_types_
O3InterfaceList _interfaces_
O3ClassList _classes_
O3SystemList _systems_
O3ImportList _imports_

Detailed Description

The O3PRM is part of the AST of the O3PRM language.

Definition at line 915 of file O3prm.h.

Member Typedef Documentation

◆ O3ClassList

using gum::prm::o3prm::O3PRM::O3ClassList = std::vector< std::unique_ptr< O3Class > >

Definition at line 921 of file O3prm.h.

◆ O3ImportList

using gum::prm::o3prm::O3PRM::O3ImportList = std::vector< std::unique_ptr< O3Import > >

Definition at line 923 of file O3prm.h.

◆ O3InterfaceList

using gum::prm::o3prm::O3PRM::O3InterfaceList = std::vector< std::unique_ptr< O3Interface > >

Definition at line 920 of file O3prm.h.

◆ O3IntTypeList

using gum::prm::o3prm::O3PRM::O3IntTypeList = std::vector< std::unique_ptr< O3IntType > >

Definition at line 918 of file O3prm.h.

◆ O3RealTypeList

using gum::prm::o3prm::O3PRM::O3RealTypeList = std::vector< std::unique_ptr< O3RealType > >

Definition at line 919 of file O3prm.h.

◆ O3SystemList

using gum::prm::o3prm::O3PRM::O3SystemList = std::vector< std::unique_ptr< O3System > >

Definition at line 922 of file O3prm.h.

◆ O3TypeList

using gum::prm::o3prm::O3PRM::O3TypeList = std::vector< std::unique_ptr< O3Type > >

Definition at line 917 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3PRM() [1/3]

gum::prm::o3prm::O3PRM::O3PRM ( )

Definition at line 471 of file O3prm.cpp.

471 {
472 GUM_CONSTRUCTOR(O3PRM);
473 // Creating the boolean type
474 auto name = O3Label(O3Position(), "boolean");
475 auto f = O3Label(O3Position(), "false");
476 auto t = O3Label(O3Position(), "true");
477 auto labels = O3Type::LabelMap();
478 labels.push_back(O3Type::LabelPair(f, O3Label()));
479 labels.push_back(O3Type::LabelPair(t, O3Label()));
480 auto boolean = std::unique_ptr< O3Type >(new O3Type());
481 boolean->name() = std::move(name);
482 boolean->labels() = std::move(labels);
483 _types_.push_back(std::move(boolean));
484 }
O3TypeList _types_
Definition O3prm.h:955
std::pair< O3Label, O3Label > LabelPair
Definition O3prm.h:227
std::vector< LabelPair > LabelMap
Definition O3prm.h:228

References gum::prm::o3prm::O3Label::O3Label(), gum::prm::o3prm::O3Position::O3Position(), O3PRM(), gum::prm::o3prm::O3Type::O3Type(), and _types_.

Referenced by O3PRM(), O3PRM(), O3PRM(), ~O3PRM(), operator=(), operator=(), and gum::prm::o3prm::O3prmReader< GUM_SCALAR >::operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ O3PRM() [2/3]

gum::prm::o3prm::O3PRM::O3PRM ( const O3PRM & src)

Definition at line 486 of file O3prm.cpp.

486 {
487 GUM_CONS_CPY(O3PRM);
488 for (const auto& t: src._types_) {
489 _types_.emplace_back(new O3Type(*t));
490 }
491 for (const auto& t: src._int_types_) {
492 _int_types_.emplace_back(new O3IntType(*t));
493 }
494 for (const auto& t: src._real_types_) {
495 _real_types_.emplace_back(new O3RealType(*t));
496 }
497 for (const auto& i: src._interfaces_) {
498 _interfaces_.emplace_back(new O3Interface(*i));
499 }
500 for (const auto& c: src._classes_) {
501 _classes_.emplace_back(new O3Class(*c));
502 }
503 for (const auto& s: src._systems_) {
504 _systems_.emplace_back(new O3System(*s));
505 }
506 for (const auto& i: src._imports_) {
507 _imports_.emplace_back(new O3Import(*i));
508 }
509 }
O3SystemList _systems_
Definition O3prm.h:960
O3ImportList _imports_
Definition O3prm.h:961
O3ClassList _classes_
Definition O3prm.h:959
O3RealTypeList _real_types_
Definition O3prm.h:957
O3InterfaceList _interfaces_
Definition O3prm.h:958
O3IntTypeList _int_types_
Definition O3prm.h:956

References gum::prm::o3prm::O3IntType::O3IntType(), O3PRM(), gum::prm::o3prm::O3RealType::O3RealType(), gum::prm::o3prm::O3Type::O3Type(), _int_types_, _interfaces_, _real_types_, and _types_.

Here is the call graph for this function:

◆ O3PRM() [3/3]

gum::prm::o3prm::O3PRM::O3PRM ( O3PRM && src)

Definition at line 511 of file O3prm.cpp.

511 :
512 _types_(std::move(src._types_)), _int_types_(std::move(src._int_types_)),
513 _real_types_(std::move(src._real_types_)), _interfaces_(std::move(src._interfaces_)),
514 _classes_(std::move(src._classes_)), _systems_(std::move(src._systems_)),
515 _imports_(std::move(src._imports_)) {
516 GUM_CONS_MOV(O3PRM);
517 }

References O3PRM(), _classes_, _imports_, _int_types_, _interfaces_, _real_types_, _systems_, and _types_.

Here is the call graph for this function:

◆ ~O3PRM()

gum::prm::o3prm::O3PRM::~O3PRM ( )

Definition at line 519 of file O3prm.cpp.

519 {
520 GUM_DESTRUCTOR(O3PRM);
521 ;
522 }

References O3PRM().

Here is the call graph for this function:

Member Function Documentation

◆ classes() [1/2]

O3PRM::O3ClassList & gum::prm::o3prm::O3PRM::classes ( )

Definition at line 578 of file O3prm.cpp.

578{ return _classes_; }

References _classes_.

◆ classes() [2/2]

const O3PRM::O3ClassList & gum::prm::o3prm::O3PRM::classes ( ) const

Definition at line 580 of file O3prm.cpp.

580{ return _classes_; }

References _classes_.

◆ imports() [1/2]

O3PRM::O3ImportList & gum::prm::o3prm::O3PRM::imports ( )

Definition at line 586 of file O3prm.cpp.

586{ return _imports_; }

References _imports_.

◆ imports() [2/2]

const O3PRM::O3ImportList & gum::prm::o3prm::O3PRM::imports ( ) const

Definition at line 588 of file O3prm.cpp.

588{ return _imports_; }

References _imports_.

◆ int_types() [1/2]

O3PRM::O3IntTypeList & gum::prm::o3prm::O3PRM::int_types ( )

Definition at line 566 of file O3prm.cpp.

566{ return _int_types_; }

References _int_types_.

◆ int_types() [2/2]

const O3PRM::O3IntTypeList & gum::prm::o3prm::O3PRM::int_types ( ) const

Definition at line 568 of file O3prm.cpp.

568{ return _int_types_; }

References _int_types_.

◆ interfaces() [1/2]

O3PRM::O3InterfaceList & gum::prm::o3prm::O3PRM::interfaces ( )

Definition at line 574 of file O3prm.cpp.

574{ return _interfaces_; }

References _interfaces_.

◆ interfaces() [2/2]

const O3PRM::O3InterfaceList & gum::prm::o3prm::O3PRM::interfaces ( ) const

Definition at line 576 of file O3prm.cpp.

576{ return _interfaces_; }

References _interfaces_.

◆ operator=() [1/2]

O3PRM & gum::prm::o3prm::O3PRM::operator= ( const O3PRM & src)

Definition at line 524 of file O3prm.cpp.

524 {
525 if (this == &src) { return *this; }
526 for (const auto& t: src._types_) {
527 _types_.emplace_back(new O3Type(*t));
528 }
529 for (const auto& t: src._int_types_) {
530 _int_types_.emplace_back(new O3IntType(*t));
531 }
532 for (const auto& t: src._real_types_) {
533 _real_types_.emplace_back(new O3RealType(*t));
534 }
535 for (const auto& i: src._interfaces_) {
536 _interfaces_.emplace_back(new O3Interface(*i));
537 }
538 for (const auto& c: src._classes_) {
539 _classes_.emplace_back(new O3Class(*c));
540 }
541 for (const auto& s: src._systems_) {
542 _systems_.emplace_back(new O3System(*s));
543 }
544 for (const auto& i: src._imports_) {
545 _imports_.emplace_back(new O3Import(*i));
546 }
547 return *this;
548 }

References gum::prm::o3prm::O3Class::O3Class(), gum::prm::o3prm::O3Import::O3Import(), gum::prm::o3prm::O3Interface::O3Interface(), gum::prm::o3prm::O3IntType::O3IntType(), O3PRM(), gum::prm::o3prm::O3RealType::O3RealType(), gum::prm::o3prm::O3System::O3System(), gum::prm::o3prm::O3Type::O3Type(), _classes_, _imports_, _int_types_, _interfaces_, _real_types_, _systems_, and _types_.

Here is the call graph for this function:

◆ operator=() [2/2]

O3PRM & gum::prm::o3prm::O3PRM::operator= ( O3PRM && src)

Definition at line 550 of file O3prm.cpp.

550 {
551 if (this == &src) { return *this; }
552 _types_ = std::move(src._types_);
553 _int_types_ = std::move(src._int_types_);
554 _real_types_ = std::move(src._real_types_);
555 _interfaces_ = std::move(src._interfaces_);
556 _classes_ = std::move(src._classes_);
557 _systems_ = std::move(src._systems_);
558 _imports_ = std::move(src._imports_);
559 return *this;
560 }

References O3PRM(), _classes_, _imports_, _int_types_, _interfaces_, _real_types_, _systems_, and _types_.

Here is the call graph for this function:

◆ real_types() [1/2]

O3PRM::O3RealTypeList & gum::prm::o3prm::O3PRM::real_types ( )

Definition at line 570 of file O3prm.cpp.

570{ return _real_types_; }

References _real_types_.

◆ real_types() [2/2]

const O3PRM::O3RealTypeList & gum::prm::o3prm::O3PRM::real_types ( ) const

Definition at line 572 of file O3prm.cpp.

572{ return _real_types_; }

References _real_types_.

◆ systems() [1/2]

O3PRM::O3SystemList & gum::prm::o3prm::O3PRM::systems ( )

Definition at line 582 of file O3prm.cpp.

582{ return _systems_; }

References _systems_.

◆ systems() [2/2]

const O3PRM::O3SystemList & gum::prm::o3prm::O3PRM::systems ( ) const

Definition at line 584 of file O3prm.cpp.

584{ return _systems_; }

References _systems_.

◆ types() [1/2]

O3PRM::O3TypeList & gum::prm::o3prm::O3PRM::types ( )

Definition at line 562 of file O3prm.cpp.

562{ return _types_; }

References _types_.

◆ types() [2/2]

const O3PRM::O3TypeList & gum::prm::o3prm::O3PRM::types ( ) const

Definition at line 564 of file O3prm.cpp.

564{ return _types_; }

References _types_.

Member Data Documentation

◆ _classes_

O3ClassList gum::prm::o3prm::O3PRM::_classes_
private

Definition at line 959 of file O3prm.h.

Referenced by O3PRM(), classes(), classes(), operator=(), and operator=().

◆ _imports_

O3ImportList gum::prm::o3prm::O3PRM::_imports_
private

Definition at line 961 of file O3prm.h.

Referenced by O3PRM(), imports(), imports(), operator=(), and operator=().

◆ _int_types_

O3IntTypeList gum::prm::o3prm::O3PRM::_int_types_
private

Definition at line 956 of file O3prm.h.

Referenced by O3PRM(), O3PRM(), int_types(), int_types(), operator=(), and operator=().

◆ _interfaces_

O3InterfaceList gum::prm::o3prm::O3PRM::_interfaces_
private

◆ _real_types_

O3RealTypeList gum::prm::o3prm::O3PRM::_real_types_
private

Definition at line 957 of file O3prm.h.

Referenced by O3PRM(), O3PRM(), operator=(), operator=(), real_types(), and real_types().

◆ _systems_

O3SystemList gum::prm::o3prm::O3PRM::_systems_
private

Definition at line 960 of file O3prm.h.

Referenced by O3PRM(), operator=(), operator=(), systems(), and systems().

◆ _types_

O3TypeList gum::prm::o3prm::O3PRM::_types_
private

Definition at line 955 of file O3prm.h.

Referenced by O3PRM(), O3PRM(), O3PRM(), operator=(), operator=(), types(), and types().


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