aGrUM  0.16.0
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 619 of file O3prm.h.

Member Typedef Documentation

◆ O3AggregateList

Definition at line 625 of file O3prm.h.

◆ O3AttributeList

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

Definition at line 624 of file O3prm.h.

◆ O3LabelList

Definition at line 621 of file O3prm.h.

◆ O3ParameterList

Definition at line 622 of file O3prm.h.

◆ O3ReferenceSlotList

Definition at line 623 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3Class() [1/3]

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

Definition at line 774 of file O3prm.cpp.

774  {
775  GUM_CONSTRUCTOR(O3Class);
776 
777  auto i = new O3LabelList();
778  __interfaces = std::unique_ptr< O3LabelList >(i);
779 
780  auto p = new O3ParameterList();
781  __params = std::unique_ptr< O3ParameterList >(p);
782 
783  auto r = new O3ReferenceSlotList();
784  __refs = std::unique_ptr< O3ReferenceSlotList >(r);
785 
786  auto e = new O3AttributeList();
787  __attrs = std::unique_ptr< O3AttributeList >(e);
788 
789  auto a = new O3AggregateList();
790  __aggs = std::unique_ptr< O3AggregateList >(a);
791  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:623
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:664
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:665
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:624
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:663
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:666
std::vector< O3Label > O3LabelList
Definition: O3prm.h:621
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:667
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:625
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:622

◆ O3Class() [2/3]

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

Definition at line 793 of file O3prm.cpp.

References __aggs, __attrs, __interfaces, __params, __refs, aggregates(), attributes(), interfaces(), parameters(), and referenceSlots().

793  :
794  __pos(src.__pos), __name(src.__name), __superLabel(src.__superLabel) {
795  GUM_CONS_CPY(O3Class);
796  auto i = new O3LabelList(src.interfaces());
797  __interfaces = std::unique_ptr< O3LabelList >(i);
798 
799  auto p = new O3ParameterList(src.parameters());
800  __params = std::unique_ptr< O3ParameterList >(p);
801 
802  auto r = new O3ReferenceSlotList(src.referenceSlots());
803  __refs = std::unique_ptr< O3ReferenceSlotList >(r);
804 
805  auto e = new O3AttributeList();
806  __attrs = std::unique_ptr< O3AttributeList >(e);
807  for (const auto& elt : src.attributes()) {
808  __attrs->push_back(elt->copy());
809  }
810 
811  auto a = new O3AggregateList(src.aggregates());
812  __aggs = std::unique_ptr< O3AggregateList >(a);
813  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:623
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:664
O3Position __pos
Definition: O3prm.h:660
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:665
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:624
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:663
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:666
std::vector< O3Label > O3LabelList
Definition: O3prm.h:621
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:667
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:625
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:622
+ Here is the call graph for this function:

◆ O3Class() [3/3]

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

Definition at line 815 of file O3prm.cpp.

815  :
816  __pos(std::move(src.__pos)), __name(std::move(src.__name)),
817  __superLabel(std::move(src.__superLabel)),
818  __interfaces(std::move(src.__interfaces)),
819  __params(std::move(src.__params)), __refs(std::move(src.__refs)),
820  __attrs(std::move(src.__attrs)), __aggs(std::move(src.__aggs)) {
821  GUM_CONS_MOV(O3Class);
822  }
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:664
O3Position __pos
Definition: O3prm.h:660
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:665
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:663
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:666
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:667

◆ ~O3Class()

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

Definition at line 824 of file O3prm.cpp.

824 { GUM_DESTRUCTOR(O3Class); }

Member Function Documentation

◆ aggregates() [1/2]

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

Definition at line 895 of file O3prm.cpp.

References __aggs.

Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkImplementation(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__completeAggregates(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__declareAggregates(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::completeAttributes(), O3Class(), and operator=().

895 { return *__aggs; }
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:667
+ Here is the caller graph for this function:

◆ aggregates() [2/2]

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

Definition at line 896 of file O3prm.cpp.

References __aggs.

896  {
897  return *__aggs;
898  }
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:667

◆ attributes() [1/2]

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

Definition at line 889 of file O3prm.cpp.

References __attrs.

Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkImplementation(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__completeAttribute(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__declareAttribute(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::completeAttributes(), O3Class(), and operator=().

889 { return *__attrs; }
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:666
+ Here is the caller graph for this function:

◆ attributes() [2/2]

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

Definition at line 891 of file O3prm.cpp.

References __attrs.

891  {
892  return *__attrs;
893  }
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:666

◆ interfaces() [1/2]

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

Definition at line 877 of file O3prm.cpp.

References __interfaces.

Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkImplementation(), O3Class(), and operator=().

877 { return *__interfaces; }
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:663
+ Here is the caller graph for this function:

◆ interfaces() [2/2]

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

Definition at line 874 of file O3prm.cpp.

References __interfaces.

874  {
875  return *__interfaces;
876  }
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:663

◆ name() [1/2]

◆ name() [2/2]

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

Definition at line 868 of file O3prm.cpp.

References __name.

868 { return __name; }

◆ operator=() [1/2]

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

Definition at line 826 of file O3prm.cpp.

References __aggs, __attrs, __interfaces, __name, __params, __pos, __refs, __superLabel, aggregates(), attributes(), interfaces(), parameters(), and referenceSlots().

826  {
827  if (this == &src) { return *this; }
828  __pos = src.__pos;
829  __name = src.__name;
830  __superLabel = src.__superLabel;
831 
832  auto i = new O3LabelList(src.interfaces());
833  __interfaces = std::unique_ptr< O3LabelList >(i);
834 
835  auto p = new O3ParameterList(src.parameters());
836  __params = std::unique_ptr< O3ParameterList >(p);
837 
838  auto r = new O3ReferenceSlotList(src.referenceSlots());
839  __refs = std::unique_ptr< O3ReferenceSlotList >(r);
840 
841  auto e = new O3AttributeList();
842  __attrs = std::unique_ptr< O3AttributeList >(e);
843  for (const auto& elt : src.attributes()) {
844  __attrs->push_back(elt->copy());
845  }
846 
847  auto a = new O3AggregateList(src.aggregates());
848  __aggs = std::unique_ptr< O3AggregateList >(a);
849  return *this;
850  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:623
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:664
O3Position __pos
Definition: O3prm.h:660
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:665
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:624
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:663
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:666
std::vector< O3Label > O3LabelList
Definition: O3prm.h:621
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:667
std::vector< O3Aggregate > O3AggregateList
Definition: O3prm.h:625
std::vector< O3Parameter > O3ParameterList
Definition: O3prm.h:622
+ Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 852 of file O3prm.cpp.

References __aggs, __attrs, __interfaces, __name, __params, __pos, __refs, and __superLabel.

852  {
853  if (this == &src) { return *this; }
854  __pos = std::move(src.__pos);
855  __name = std::move(src.__name);
856  __superLabel = std::move(src.__superLabel);
857  __interfaces = std::move(src.__interfaces);
858  __params = std::move(src.__params);
859  __refs = std::move(src.__refs);
860  __attrs = std::move(src.__attrs);
861  __aggs = std::move(src.__aggs);
862  return *this;
863  }
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:664
O3Position __pos
Definition: O3prm.h:660
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:665
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:663
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:666
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:667

◆ parameters() [1/2]

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

Definition at line 882 of file O3prm.cpp.

References __params.

Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__addParameters(), O3Class(), and operator=().

882 { return *__params; }
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:664
+ Here is the caller graph for this function:

◆ parameters() [2/2]

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

Definition at line 879 of file O3prm.cpp.

References __params.

879  {
880  return *__params;
881  }
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:664

◆ position() [1/2]

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

Definition at line 866 of file O3prm.cpp.

References __pos.

866 { return __pos; }
O3Position __pos
Definition: O3prm.h:660

◆ position() [2/2]

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

Definition at line 865 of file O3prm.cpp.

References __pos.

865 { return __pos; }
O3Position __pos
Definition: O3prm.h:660

◆ referenceSlots() [1/2]

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

Definition at line 887 of file O3prm.cpp.

References __refs.

Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__addReferenceSlots(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkImplementation(), O3Class(), and operator=().

887 { return *__refs; }
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:665
+ Here is the caller graph for this function:

◆ referenceSlots() [2/2]

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

Definition at line 884 of file O3prm.cpp.

References __refs.

884  {
885  return *__refs;
886  }
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:665

◆ superLabel() [1/2]

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

Definition at line 872 of file O3prm.cpp.

References __superLabel.

Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkAggTypeLegality(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkAttributeForDeclaration(), and gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::completeAttributes().

872 { return __superLabel; }
+ Here is the caller graph for this function:

◆ superLabel() [2/2]

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

Definition at line 871 of file O3prm.cpp.

References __superLabel.

871 { return __superLabel; }

Member Data Documentation

◆ __aggs

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

Definition at line 667 of file O3prm.h.

Referenced by aggregates(), O3Class(), and operator=().

◆ __attrs

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

Definition at line 666 of file O3prm.h.

Referenced by attributes(), O3Class(), and operator=().

◆ __interfaces

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

Definition at line 663 of file O3prm.h.

Referenced by interfaces(), O3Class(), and operator=().

◆ __name

O3Label gum::prm::o3prm::O3Class::__name
private

Definition at line 661 of file O3prm.h.

Referenced by name(), and operator=().

◆ __params

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

Definition at line 664 of file O3prm.h.

Referenced by O3Class(), operator=(), and parameters().

◆ __pos

O3Position gum::prm::o3prm::O3Class::__pos
private

Definition at line 660 of file O3prm.h.

Referenced by operator=(), and position().

◆ __refs

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

Definition at line 665 of file O3prm.h.

Referenced by O3Class(), operator=(), and referenceSlots().

◆ __superLabel

O3Label gum::prm::o3prm::O3Class::__superLabel
private

Definition at line 662 of file O3prm.h.

Referenced by operator=(), and superLabel().


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