aGrUM  0.14.2
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 772 of file O3prm.cpp.

772  {
773  GUM_CONSTRUCTOR(O3Class);
774 
775  auto i = new O3LabelList();
776  __interfaces = std::unique_ptr< O3LabelList >(i);
777 
778  auto p = new O3ParameterList();
779  __params = std::unique_ptr< O3ParameterList >(p);
780 
781  auto r = new O3ReferenceSlotList();
782  __refs = std::unique_ptr< O3ReferenceSlotList >(r);
783 
784  auto e = new O3AttributeList();
785  __attrs = std::unique_ptr< O3AttributeList >(e);
786 
787  auto a = new O3AggregateList();
788  __aggs = std::unique_ptr< O3AggregateList >(a);
789  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:621
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:662
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:663
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:622
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:661
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:664
std::vector< O3Label > O3LabelList
Definition: O3prm.h:619
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

◆ O3Class() [2/3]

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

Definition at line 791 of file O3prm.cpp.

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

791  :
792  __pos(src.__pos), __name(src.__name), __superLabel(src.__superLabel) {
793  GUM_CONS_CPY(O3Class);
794  auto i = new O3LabelList(src.interfaces());
795  __interfaces = std::unique_ptr< O3LabelList >(i);
796 
797  auto p = new O3ParameterList(src.parameters());
798  __params = std::unique_ptr< O3ParameterList >(p);
799 
800  auto r = new O3ReferenceSlotList(src.referenceSlots());
801  __refs = std::unique_ptr< O3ReferenceSlotList >(r);
802 
803  auto e = new O3AttributeList();
804  __attrs = std::unique_ptr< O3AttributeList >(e);
805  for (const auto& elt : src.attributes()) {
806  __attrs->push_back(elt->copy());
807  }
808 
809  auto a = new O3AggregateList(src.aggregates());
810  __aggs = std::unique_ptr< O3AggregateList >(a);
811  }
std::vector< O3ReferenceSlot > O3ReferenceSlotList
Definition: O3prm.h:621
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:662
O3Position __pos
Definition: O3prm.h:658
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:663
std::vector< std::unique_ptr< O3Attribute > > O3AttributeList
Definition: O3prm.h:622
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:661
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:664
std::vector< O3Label > O3LabelList
Definition: O3prm.h:619
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
+ Here is the call graph for this function:

◆ O3Class() [3/3]

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

Definition at line 813 of file O3prm.cpp.

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

◆ ~O3Class()

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

Definition at line 822 of file O3prm.cpp.

822 { GUM_DESTRUCTOR(O3Class); }

Member Function Documentation

◆ aggregates() [1/2]

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

Definition at line 893 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=().

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

◆ aggregates() [2/2]

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

Definition at line 894 of file O3prm.cpp.

References __aggs.

894  {
895  return *__aggs;
896  }
std::unique_ptr< O3AggregateList > __aggs
Definition: O3prm.h:665

◆ attributes() [1/2]

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

Definition at line 887 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=().

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

◆ attributes() [2/2]

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

Definition at line 889 of file O3prm.cpp.

References __attrs.

889  {
890  return *__attrs;
891  }
std::unique_ptr< O3AttributeList > __attrs
Definition: O3prm.h:664

◆ interfaces() [1/2]

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

Definition at line 875 of file O3prm.cpp.

References __interfaces.

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

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

◆ interfaces() [2/2]

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

Definition at line 872 of file O3prm.cpp.

References __interfaces.

872  {
873  return *__interfaces;
874  }
std::unique_ptr< O3LabelList > __interfaces
Definition: O3prm.h:661

◆ name() [1/2]

◆ name() [2/2]

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

Definition at line 866 of file O3prm.cpp.

References __name.

866 { return __name; }

◆ operator=() [1/2]

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

Definition at line 824 of file O3prm.cpp.

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

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

◆ operator=() [2/2]

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

Definition at line 850 of file O3prm.cpp.

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

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

◆ parameters() [1/2]

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

Definition at line 880 of file O3prm.cpp.

References __params.

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

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

◆ parameters() [2/2]

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

Definition at line 877 of file O3prm.cpp.

References __params.

877  {
878  return *__params;
879  }
std::unique_ptr< O3ParameterList > __params
Definition: O3prm.h:662

◆ position() [1/2]

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

Definition at line 864 of file O3prm.cpp.

References __pos.

864 { return __pos; }
O3Position __pos
Definition: O3prm.h:658

◆ position() [2/2]

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

Definition at line 863 of file O3prm.cpp.

References __pos.

863 { return __pos; }
O3Position __pos
Definition: O3prm.h:658

◆ referenceSlots() [1/2]

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

Definition at line 885 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=().

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

◆ referenceSlots() [2/2]

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

Definition at line 882 of file O3prm.cpp.

References __refs.

882  {
883  return *__refs;
884  }
std::unique_ptr< O3ReferenceSlotList > __refs
Definition: O3prm.h:663

◆ superLabel() [1/2]

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

Definition at line 870 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().

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

◆ superLabel() [2/2]

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

Definition at line 869 of file O3prm.cpp.

References __superLabel.

869 { return __superLabel; }

Member Data Documentation

◆ __aggs

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

Definition at line 665 of file O3prm.h.

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

◆ __attrs

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

Definition at line 664 of file O3prm.h.

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

◆ __interfaces

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

Definition at line 661 of file O3prm.h.

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

◆ __name

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

Definition at line 659 of file O3prm.h.

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

◆ __params

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

Definition at line 662 of file O3prm.h.

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

◆ __pos

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

Definition at line 658 of file O3prm.h.

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

◆ __refs

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

Definition at line 663 of file O3prm.h.

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

◆ __superLabel

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

Definition at line 660 of file O3prm.h.

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


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