aGrUM  0.20.2
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 623 of file O3prm.h.

Member Typedef Documentation

◆ O3AggregateList

Definition at line 629 of file O3prm.h.

◆ O3AttributeList

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

Definition at line 628 of file O3prm.h.

◆ O3LabelList

Definition at line 625 of file O3prm.h.

◆ O3ParameterList

Definition at line 626 of file O3prm.h.

◆ O3ReferenceSlotList

Definition at line 627 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3Class() [1/3]

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

Definition at line 773 of file O3prm.cpp.

773  {
774  GUM_CONSTRUCTOR(O3Class);
775 
776  auto i = new O3LabelList();
777  interfaces__ = std::unique_ptr< O3LabelList >(i);
778 
779  auto p = new O3ParameterList();
780  params__ = std::unique_ptr< O3ParameterList >(p);
781 
782  auto r = new O3ReferenceSlotList();
783  refs__ = std::unique_ptr< O3ReferenceSlotList >(r);
784 
785  auto e = new O3AttributeList();
786  attrs__ = std::unique_ptr< O3AttributeList >(e);
787 
788  auto a = new O3AggregateList();
789  aggs__ = std::unique_ptr< O3AggregateList >(a);
790  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:627
std::unique_ptr< O3ParameterList > params__
Definition: O3prm.h:668
std::unique_ptr< O3AggregateList > aggs__
Definition: O3prm.h:671
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:628
std::unique_ptr< O3ReferenceSlotList > refs__
Definition: O3prm.h:669
std::vector< O3Label > O3LabelList
Definition: O3prm.h:625
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:629
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:626
std::unique_ptr< O3LabelList > interfaces__
Definition: O3prm.h:667
std::unique_ptr< O3AttributeList > attrs__
Definition: O3prm.h:670

◆ O3Class() [2/3]

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

Definition at line 792 of file O3prm.cpp.

792  :
793  pos__(src.pos__), name__(src.name__), superLabel__(src.superLabel__) {
794  GUM_CONS_CPY(O3Class);
795  auto i = new O3LabelList(src.interfaces());
796  interfaces__ = std::unique_ptr< O3LabelList >(i);
797 
798  auto p = new O3ParameterList(src.parameters());
799  params__ = std::unique_ptr< O3ParameterList >(p);
800 
801  auto r = new O3ReferenceSlotList(src.referenceSlots());
802  refs__ = std::unique_ptr< O3ReferenceSlotList >(r);
803 
804  auto e = new O3AttributeList();
805  attrs__ = std::unique_ptr< O3AttributeList >(e);
806  for (const auto& elt: src.attributes()) {
807  attrs__->push_back(elt->copy());
808  }
809 
810  auto a = new O3AggregateList(src.aggregates());
811  aggs__ = std::unique_ptr< O3AggregateList >(a);
812  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:627
std::unique_ptr< O3ParameterList > params__
Definition: O3prm.h:668
std::unique_ptr< O3AggregateList > aggs__
Definition: O3prm.h:671
O3Position pos__
Definition: O3prm.h:664
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:628
std::unique_ptr< O3ReferenceSlotList > refs__
Definition: O3prm.h:669
std::vector< O3Label > O3LabelList
Definition: O3prm.h:625
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:629
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:626
std::unique_ptr< O3LabelList > interfaces__
Definition: O3prm.h:667
std::unique_ptr< O3AttributeList > attrs__
Definition: O3prm.h:670

◆ O3Class() [3/3]

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

Definition at line 814 of file O3prm.cpp.

814  :
815  pos__(std::move(src.pos__)), name__(std::move(src.name__)),
816  superLabel__(std::move(src.superLabel__)),
817  interfaces__(std::move(src.interfaces__)),
818  params__(std::move(src.params__)), refs__(std::move(src.refs__)),
819  attrs__(std::move(src.attrs__)), aggs__(std::move(src.aggs__)) {
820  GUM_CONS_MOV(O3Class);
821  }
std::unique_ptr< O3ParameterList > params__
Definition: O3prm.h:668
std::unique_ptr< O3AggregateList > aggs__
Definition: O3prm.h:671
O3Position pos__
Definition: O3prm.h:664
std::unique_ptr< O3ReferenceSlotList > refs__
Definition: O3prm.h:669
std::unique_ptr< O3LabelList > interfaces__
Definition: O3prm.h:667
std::unique_ptr< O3AttributeList > attrs__
Definition: O3prm.h:670

◆ ~O3Class()

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

Definition at line 823 of file O3prm.cpp.

823 { GUM_DESTRUCTOR(O3Class); }

Member Function Documentation

◆ aggregates() [1/2]

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

Definition at line 894 of file O3prm.cpp.

894 { return *aggs__; }
std::unique_ptr< O3AggregateList > aggs__
Definition: O3prm.h:671

◆ aggregates() [2/2]

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

Definition at line 895 of file O3prm.cpp.

895  {
896  return *aggs__;
897  }
std::unique_ptr< O3AggregateList > aggs__
Definition: O3prm.h:671

◆ attributes() [1/2]

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

Definition at line 888 of file O3prm.cpp.

888 { return *attrs__; }
std::unique_ptr< O3AttributeList > attrs__
Definition: O3prm.h:670

◆ attributes() [2/2]

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

Definition at line 890 of file O3prm.cpp.

890  {
891  return *attrs__;
892  }
std::unique_ptr< O3AttributeList > attrs__
Definition: O3prm.h:670

◆ interfaces() [1/2]

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

Definition at line 876 of file O3prm.cpp.

876 { return *interfaces__; }
std::unique_ptr< O3LabelList > interfaces__
Definition: O3prm.h:667

◆ interfaces() [2/2]

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

Definition at line 873 of file O3prm.cpp.

873  {
874  return *interfaces__;
875  }
std::unique_ptr< O3LabelList > interfaces__
Definition: O3prm.h:667

◆ name() [1/2]

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

Definition at line 868 of file O3prm.cpp.

868 { return name__; }

◆ name() [2/2]

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

Definition at line 867 of file O3prm.cpp.

867 { return name__; }

◆ operator=() [1/2]

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

Definition at line 825 of file O3prm.cpp.

825  {
826  if (this == &src) { return *this; }
827  pos__ = src.pos__;
828  name__ = src.name__;
829  superLabel__ = src.superLabel__;
830 
831  auto i = new O3LabelList(src.interfaces());
832  interfaces__ = std::unique_ptr< O3LabelList >(i);
833 
834  auto p = new O3ParameterList(src.parameters());
835  params__ = std::unique_ptr< O3ParameterList >(p);
836 
837  auto r = new O3ReferenceSlotList(src.referenceSlots());
838  refs__ = std::unique_ptr< O3ReferenceSlotList >(r);
839 
840  auto e = new O3AttributeList();
841  attrs__ = std::unique_ptr< O3AttributeList >(e);
842  for (const auto& elt: src.attributes()) {
843  attrs__->push_back(elt->copy());
844  }
845 
846  auto a = new O3AggregateList(src.aggregates());
847  aggs__ = std::unique_ptr< O3AggregateList >(a);
848  return *this;
849  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:627
std::unique_ptr< O3ParameterList > params__
Definition: O3prm.h:668
std::unique_ptr< O3AggregateList > aggs__
Definition: O3prm.h:671
O3Position pos__
Definition: O3prm.h:664
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:628
std::unique_ptr< O3ReferenceSlotList > refs__
Definition: O3prm.h:669
std::vector< O3Label > O3LabelList
Definition: O3prm.h:625
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:629
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:626
std::unique_ptr< O3LabelList > interfaces__
Definition: O3prm.h:667
std::unique_ptr< O3AttributeList > attrs__
Definition: O3prm.h:670

◆ operator=() [2/2]

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

Definition at line 851 of file O3prm.cpp.

851  {
852  if (this == &src) { return *this; }
853  pos__ = std::move(src.pos__);
854  name__ = std::move(src.name__);
855  superLabel__ = std::move(src.superLabel__);
856  interfaces__ = std::move(src.interfaces__);
857  params__ = std::move(src.params__);
858  refs__ = std::move(src.refs__);
859  attrs__ = std::move(src.attrs__);
860  aggs__ = std::move(src.aggs__);
861  return *this;
862  }
std::unique_ptr< O3ParameterList > params__
Definition: O3prm.h:668
std::unique_ptr< O3AggregateList > aggs__
Definition: O3prm.h:671
O3Position pos__
Definition: O3prm.h:664
std::unique_ptr< O3ReferenceSlotList > refs__
Definition: O3prm.h:669
std::unique_ptr< O3LabelList > interfaces__
Definition: O3prm.h:667
std::unique_ptr< O3AttributeList > attrs__
Definition: O3prm.h:670

◆ parameters() [1/2]

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

Definition at line 881 of file O3prm.cpp.

881 { return *params__; }
std::unique_ptr< O3ParameterList > params__
Definition: O3prm.h:668

◆ parameters() [2/2]

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

Definition at line 878 of file O3prm.cpp.

878  {
879  return *params__;
880  }
std::unique_ptr< O3ParameterList > params__
Definition: O3prm.h:668

◆ position() [1/2]

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

Definition at line 865 of file O3prm.cpp.

865 { return pos__; }
O3Position pos__
Definition: O3prm.h:664

◆ position() [2/2]

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

Definition at line 864 of file O3prm.cpp.

864 { return pos__; }
O3Position pos__
Definition: O3prm.h:664

◆ referenceSlots() [1/2]

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

Definition at line 886 of file O3prm.cpp.

886 { return *refs__; }
std::unique_ptr< O3ReferenceSlotList > refs__
Definition: O3prm.h:669

◆ referenceSlots() [2/2]

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

Definition at line 883 of file O3prm.cpp.

883  {
884  return *refs__;
885  }
std::unique_ptr< O3ReferenceSlotList > refs__
Definition: O3prm.h:669

◆ superLabel() [1/2]

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

Definition at line 871 of file O3prm.cpp.

871 { return superLabel__; }

◆ superLabel() [2/2]

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

Definition at line 870 of file O3prm.cpp.

870 { return superLabel__; }

Member Data Documentation

◆ aggs__

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

Definition at line 671 of file O3prm.h.

◆ attrs__

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

Definition at line 670 of file O3prm.h.

◆ interfaces__

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

Definition at line 667 of file O3prm.h.

◆ name__

O3Label gum::prm::o3prm::O3Class::name__
private

Definition at line 665 of file O3prm.h.

◆ params__

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

Definition at line 668 of file O3prm.h.

◆ pos__

O3Position gum::prm::o3prm::O3Class::pos__
private

Definition at line 664 of file O3prm.h.

◆ refs__

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

Definition at line 669 of file O3prm.h.

◆ superLabel__

O3Label gum::prm::o3prm::O3Class::superLabel__
private

Definition at line 666 of file O3prm.h.


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