aGrUM  0.16.0
gum::prm::o3prm::O3Attribute Class Referenceabstract

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

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

+ Inheritance diagram for gum::prm::o3prm::O3Attribute:
+ Collaboration diagram for gum::prm::o3prm::O3Attribute:

Public Member Functions

 O3Attribute ()
 
 O3Attribute (const O3Label &type, const O3Label &name, const O3LabelList &parents)
 
 O3Attribute (const O3Attribute &src)
 
 O3Attribute (O3Attribute &&src)
 
virtual ~O3Attribute ()
 
virtual O3Attributeoperator= (const O3Attribute &src)
 
virtual O3Attributeoperator= (O3Attribute &&src)
 
virtual O3Labeltype ()
 
virtual const O3Labeltype () const
 
virtual O3Labelname ()
 
virtual const O3Labelname () const
 
virtual O3LabelListparents ()
 
virtual const O3LabelListparents () const
 
virtual std::unique_ptr< O3Attributecopy () const =0
 

Public Types

using O3LabelList = std::vector< O3Label >
 

Detailed Description

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

Definition at line 471 of file O3prm.h.

Member Typedef Documentation

◆ O3LabelList

Definition at line 473 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3Attribute() [1/4]

gum::prm::o3prm::O3Attribute::O3Attribute ( )

Definition at line 623 of file O3prm.cpp.

623 { GUM_CONSTRUCTOR(O3Attribute); }

◆ O3Attribute() [2/4]

gum::prm::o3prm::O3Attribute::O3Attribute ( const O3Label type,
const O3Label name,
const O3LabelList parents 
)

Definition at line 625 of file O3prm.cpp.

627  :
628  __type(type),
630  GUM_CONSTRUCTOR(O3Attribute);
631  }
virtual O3LabelList & parents()
Definition: O3prm.cpp:668
virtual O3Label & type()
Definition: O3prm.cpp:662
virtual O3Label & name()
Definition: O3prm.cpp:665

◆ O3Attribute() [3/4]

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

Definition at line 633 of file O3prm.cpp.

633  :
634  __type(src.__type), __name(src.__name), __parents(src.__parents) {
635  GUM_CONS_CPY(O3Attribute);
636  }

◆ O3Attribute() [4/4]

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

Definition at line 638 of file O3prm.cpp.

638  :
639  __type(std::move(src.__type)), __name(std::move(src.__name)),
640  __parents(std::move(src.__parents)) {
641  GUM_CONS_MOV(O3Attribute);
642  }

◆ ~O3Attribute()

gum::prm::o3prm::O3Attribute::~O3Attribute ( )
virtual

Definition at line 644 of file O3prm.cpp.

644 { GUM_DESTRUCTOR(O3Attribute); }

Member Function Documentation

◆ copy()

virtual std::unique_ptr< O3Attribute > gum::prm::o3prm::O3Attribute::copy ( ) const
pure virtual

◆ name() [1/2]

O3Label & gum::prm::o3prm::O3Attribute::name ( )
virtual

Definition at line 665 of file O3prm.cpp.

References __name.

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

665 { return __name; }
+ Here is the caller graph for this function:

◆ name() [2/2]

const O3Label & gum::prm::o3prm::O3Attribute::name ( ) const
virtual

Definition at line 666 of file O3prm.cpp.

References __name.

666 { return __name; }

◆ operator=() [1/2]

O3Attribute & gum::prm::o3prm::O3Attribute::operator= ( const O3Attribute src)
virtual

Definition at line 646 of file O3prm.cpp.

References __name, __parents, and __type.

Referenced by gum::prm::o3prm::O3RawCPT::operator=(), and gum::prm::o3prm::O3RuleCPT::operator=().

646  {
647  if (this == &src) { return *this; }
648  __type = src.__type;
649  __name = src.__name;
650  __parents = src.__parents;
651  return *this;
652  }
+ Here is the caller graph for this function:

◆ operator=() [2/2]

O3Attribute & gum::prm::o3prm::O3Attribute::operator= ( O3Attribute &&  src)
virtual

Definition at line 654 of file O3prm.cpp.

References __name, __parents, and __type.

654  {
655  if (this == &src) { return *this; }
656  __type = std::move(src.__type);
657  __name = std::move(src.__name);
658  __parents = std::move(src.__parents);
659  return *this;
660  }

◆ parents() [1/2]

O3Attribute::O3LabelList & gum::prm::o3prm::O3Attribute::parents ( )
virtual

Definition at line 668 of file O3prm.cpp.

References __parents.

Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkAttributeForCompletion(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkLabelsNumber(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkLabelsValues(), and gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRawCPT().

668 { return __parents; }
+ Here is the caller graph for this function:

◆ parents() [2/2]

const O3Attribute::O3LabelList & gum::prm::o3prm::O3Attribute::parents ( ) const
virtual

Definition at line 669 of file O3prm.cpp.

References __parents.

669  {
670  return __parents;
671  }

◆ type() [1/2]

O3Label & gum::prm::o3prm::O3Attribute::type ( )
virtual

Definition at line 662 of file O3prm.cpp.

References __type.

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

662 { return __type; }
+ Here is the caller graph for this function:

◆ type() [2/2]

const O3Label & gum::prm::o3prm::O3Attribute::type ( ) const
virtual

Definition at line 663 of file O3prm.cpp.

References __type.

663 { return __type; }

Member Data Documentation

◆ __name

O3Label gum::prm::o3prm::O3Attribute::__name
private

Definition at line 499 of file O3prm.h.

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

◆ __parents

O3LabelList gum::prm::o3prm::O3Attribute::__parents
private

Definition at line 500 of file O3prm.h.

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

◆ __type

O3Label gum::prm::o3prm::O3Attribute::__type
private

Definition at line 498 of file O3prm.h.

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


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