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

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

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

+ Collaboration diagram for gum::prm::o3prm::O3Class:

Public Member Functions

 O3Class ()
 
 O3Class (const O3Class &src)
 
 O3Class (O3Class &&src)
 
 ~O3Class ()
 
O3Classoperator= (const O3Class &src)
 
O3Classoperator= (O3Class &&src)
 
O3Positionposition ()
 
const O3Positionposition () const
 
O3Labelname ()
 
const O3Labelname () const
 
O3LabelsuperLabel ()
 
const O3LabelsuperLabel () const
 
O3LabelListinterfaces ()
 
const O3LabelListinterfaces () const
 
O3ParameterListparameters ()
 
const O3ParameterListparameters () const
 
O3ReferenceSlotListreferenceSlots ()
 
const O3ReferenceSlotListreferenceSlots () const
 
O3AttributeListattributes ()
 
const O3AttributeListattributes () const
 
O3AggregateListaggregates ()
 
const O3AggregateListaggregates () const
 

Public Types

using O3LabelList = std::vector< O3Label >
 
using O3ParameterList = std::vector< O3Parameter >
 
using O3ReferenceSlotList = std::vector< O3ReferenceSlot >
 
using O3AttributeList = std::vector< std::unique_ptr< O3Attribute > >
 
using O3AggregateList = std::vector< O3Aggregate >
 

Detailed Description

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

Definition at line 617 of file O3prm.h.

Member Typedef Documentation

◆ O3AggregateList

Definition at line 623 of file O3prm.h.

◆ O3AttributeList

using gum::prm::o3prm::O3Class::O3AttributeList = std::vector< std::unique_ptr< O3Attribute > >

Definition at line 622 of file O3prm.h.

◆ O3LabelList

Definition at line 619 of file O3prm.h.

◆ O3ParameterList

Definition at line 620 of file O3prm.h.

◆ O3ReferenceSlotList

Definition at line 621 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3Class() [1/3]

gum::prm::o3prm::O3Class::O3Class ( )

Definition at line 803 of file O3prm.cpp.

803  {
804  GUM_CONSTRUCTOR(O3Class);
805 
806  auto i = new O3LabelList();
807  _interfaces_ = std::unique_ptr< O3LabelList >(i);
808 
809  auto p = new O3ParameterList();
810  _params_ = std::unique_ptr< O3ParameterList >(p);
811 
812  auto r = new O3ReferenceSlotList();
813  _refs_ = std::unique_ptr< O3ReferenceSlotList >(r);
814 
815  auto e = new O3AttributeList();
816  _attrs_ = std::unique_ptr< O3AttributeList >(e);
817 
818  auto a = new O3AggregateList();
819  _aggs_ = std::unique_ptr< O3AggregateList >(a);
820  }
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:621
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:622
std::vector< O3Label > O3LabelList
Definition: O3prm.h:619
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:623
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:620
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662

◆ O3Class() [2/3]

gum::prm::o3prm::O3Class::O3Class ( const O3Class src)

Definition at line 822 of file O3prm.cpp.

822  :
823  _pos_(src._pos_), _name_(src._name_), _superLabel_(src._superLabel_) {
824  GUM_CONS_CPY(O3Class);
825  auto i = new O3LabelList(src.interfaces());
826  _interfaces_ = std::unique_ptr< O3LabelList >(i);
827 
828  auto p = new O3ParameterList(src.parameters());
829  _params_ = std::unique_ptr< O3ParameterList >(p);
830 
831  auto r = new O3ReferenceSlotList(src.referenceSlots());
832  _refs_ = std::unique_ptr< O3ReferenceSlotList >(r);
833 
834  auto e = new O3AttributeList();
835  _attrs_ = std::unique_ptr< O3AttributeList >(e);
836  for (const auto& elt: src.attributes()) {
837  _attrs_->push_back(elt->copy());
838  }
839 
840  auto a = new O3AggregateList(src.aggregates());
841  _aggs_ = std::unique_ptr< O3AggregateList >(a);
842  }
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:621
O3Position _pos_
Definition: O3prm.h:658
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:622
std::vector< O3Label > O3LabelList
Definition: O3prm.h:619
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:623
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:620
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662

◆ O3Class() [3/3]

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

Definition at line 844 of file O3prm.cpp.

844  :
845  _pos_(std::move(src._pos_)), _name_(std::move(src._name_)),
846  _superLabel_(std::move(src._superLabel_)), _interfaces_(std::move(src._interfaces_)),
847  _params_(std::move(src._params_)), _refs_(std::move(src._refs_)),
848  _attrs_(std::move(src._attrs_)), _aggs_(std::move(src._aggs_)) {
849  GUM_CONS_MOV(O3Class);
850  }
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664
O3Position _pos_
Definition: O3prm.h:658
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662

◆ ~O3Class()

gum::prm::o3prm::O3Class::~O3Class ( )

Definition at line 852 of file O3prm.cpp.

852  {
853  GUM_DESTRUCTOR(O3Class);
854  ;
855  }

Member Function Documentation

◆ aggregates() [1/2]

O3Class::O3AggregateList & gum::prm::o3prm::O3Class::aggregates ( )

Definition at line 918 of file O3prm.cpp.

918 { return *_aggs_; }
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665

◆ aggregates() [2/2]

const O3Class::O3AggregateList & gum::prm::o3prm::O3Class::aggregates ( ) const

Definition at line 919 of file O3prm.cpp.

919 { return *_aggs_; }
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665

◆ attributes() [1/2]

O3Class::O3AttributeList & gum::prm::o3prm::O3Class::attributes ( )

Definition at line 914 of file O3prm.cpp.

914 { return *_attrs_; }
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664

◆ attributes() [2/2]

const O3Class::O3AttributeList & gum::prm::o3prm::O3Class::attributes ( ) const

Definition at line 916 of file O3prm.cpp.

916 { return *_attrs_; }
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664

◆ interfaces() [1/2]

O3Class::O3LabelList & gum::prm::o3prm::O3Class::interfaces ( )

Definition at line 906 of file O3prm.cpp.

906 { return *_interfaces_; }
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661

◆ interfaces() [2/2]

const O3Class::O3LabelList & gum::prm::o3prm::O3Class::interfaces ( ) const

Definition at line 905 of file O3prm.cpp.

905 { return *_interfaces_; }
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661

◆ name() [1/2]

O3Label & gum::prm::o3prm::O3Class::name ( )

Definition at line 900 of file O3prm.cpp.

900 { return _name_; }

◆ name() [2/2]

const O3Label & gum::prm::o3prm::O3Class::name ( ) const

Definition at line 899 of file O3prm.cpp.

899 { return _name_; }

◆ operator=() [1/2]

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

Definition at line 857 of file O3prm.cpp.

857  {
858  if (this == &src) { return *this; }
859  _pos_ = src._pos_;
860  _name_ = src._name_;
861  _superLabel_ = src._superLabel_;
862 
863  auto i = new O3LabelList(src.interfaces());
864  _interfaces_ = std::unique_ptr< O3LabelList >(i);
865 
866  auto p = new O3ParameterList(src.parameters());
867  _params_ = std::unique_ptr< O3ParameterList >(p);
868 
869  auto r = new O3ReferenceSlotList(src.referenceSlots());
870  _refs_ = std::unique_ptr< O3ReferenceSlotList >(r);
871 
872  auto e = new O3AttributeList();
873  _attrs_ = std::unique_ptr< O3AttributeList >(e);
874  for (const auto& elt: src.attributes()) {
875  _attrs_->push_back(elt->copy());
876  }
877 
878  auto a = new O3AggregateList(src.aggregates());
879  _aggs_ = std::unique_ptr< O3AggregateList >(a);
880  return *this;
881  }
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:621
O3Position _pos_
Definition: O3prm.h:658
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:622
std::vector< O3Label > O3LabelList
Definition: O3prm.h:619
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:623
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:620
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662

◆ operator=() [2/2]

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

Definition at line 883 of file O3prm.cpp.

883  {
884  if (this == &src) { return *this; }
885  _pos_ = std::move(src._pos_);
886  _name_ = std::move(src._name_);
887  _superLabel_ = std::move(src._superLabel_);
888  _interfaces_ = std::move(src._interfaces_);
889  _params_ = std::move(src._params_);
890  _refs_ = std::move(src._refs_);
891  _attrs_ = std::move(src._attrs_);
892  _aggs_ = std::move(src._aggs_);
893  return *this;
894  }
std::unique_ptr< O3AttributeList > _attrs_
Definition: O3prm.h:664
O3Position _pos_
Definition: O3prm.h:658
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663
std::unique_ptr< O3AggregateList > _aggs_
Definition: O3prm.h:665
std::unique_ptr< O3LabelList > _interfaces_
Definition: O3prm.h:661
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662

◆ parameters() [1/2]

O3Class::O3ParameterList & gum::prm::o3prm::O3Class::parameters ( )

Definition at line 909 of file O3prm.cpp.

909 { return *_params_; }
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662

◆ parameters() [2/2]

const O3Class::O3ParameterList & gum::prm::o3prm::O3Class::parameters ( ) const

Definition at line 908 of file O3prm.cpp.

908 { return *_params_; }
std::unique_ptr< O3ParameterList > _params_
Definition: O3prm.h:662

◆ position() [1/2]

O3Position & gum::prm::o3prm::O3Class::position ( )

Definition at line 897 of file O3prm.cpp.

897 { return _pos_; }
O3Position _pos_
Definition: O3prm.h:658

◆ position() [2/2]

const O3Position & gum::prm::o3prm::O3Class::position ( ) const

Definition at line 896 of file O3prm.cpp.

896 { return _pos_; }
O3Position _pos_
Definition: O3prm.h:658

◆ referenceSlots() [1/2]

O3Class::O3ReferenceSlotList & gum::prm::o3prm::O3Class::referenceSlots ( )

Definition at line 912 of file O3prm.cpp.

912 { return *_refs_; }
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663

◆ referenceSlots() [2/2]

const O3Class::O3ReferenceSlotList & gum::prm::o3prm::O3Class::referenceSlots ( ) const

Definition at line 911 of file O3prm.cpp.

911 { return *_refs_; }
std::unique_ptr< O3ReferenceSlotList > _refs_
Definition: O3prm.h:663

◆ superLabel() [1/2]

O3Label & gum::prm::o3prm::O3Class::superLabel ( )

Definition at line 903 of file O3prm.cpp.

903 { return _superLabel_; }

◆ superLabel() [2/2]

const O3Label & gum::prm::o3prm::O3Class::superLabel ( ) const

Definition at line 902 of file O3prm.cpp.

902 { return _superLabel_; }

Member Data Documentation

◆ _aggs_

std::unique_ptr< O3AggregateList > gum::prm::o3prm::O3Class::_aggs_
private

Definition at line 665 of file O3prm.h.

◆ _attrs_

std::unique_ptr< O3AttributeList > gum::prm::o3prm::O3Class::_attrs_
private

Definition at line 664 of file O3prm.h.

◆ _interfaces_

std::unique_ptr< O3LabelList > gum::prm::o3prm::O3Class::_interfaces_
private

Definition at line 661 of file O3prm.h.

◆ _name_

O3Label gum::prm::o3prm::O3Class::_name_
private

Definition at line 659 of file O3prm.h.

◆ _params_

std::unique_ptr< O3ParameterList > gum::prm::o3prm::O3Class::_params_
private

Definition at line 662 of file O3prm.h.

◆ _pos_

O3Position gum::prm::o3prm::O3Class::_pos_
private

Definition at line 658 of file O3prm.h.

◆ _refs_

std::unique_ptr< O3ReferenceSlotList > gum::prm::o3prm::O3Class::_refs_
private

Definition at line 663 of file O3prm.h.

◆ _superLabel_

O3Label gum::prm::o3prm::O3Class::_superLabel_
private

Definition at line 660 of file O3prm.h.


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