aGrUM  0.16.0
gum::prm::o3prm::O3RuleCPT Class Reference

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

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

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

Public Member Functions

 O3RuleCPT ()
 
 O3RuleCPT (const O3Label &type, const O3Label &name, const O3Attribute::O3LabelList &parents, O3RuleList &&rules)
 
 O3RuleCPT (const O3RuleCPT &src)
 
 O3RuleCPT (O3RuleCPT &&src)
 
 ~O3RuleCPT ()
 
virtual O3RuleCPToperator= (const O3RuleCPT &src)
 
virtual O3RuleCPToperator= (O3RuleCPT &&src)
 
virtual O3RuleListrules ()
 
virtual const O3RuleListrules () const
 
virtual std::unique_ptr< O3Attributecopy () const
 
virtual O3Labeltype ()
 
virtual const O3Labeltype () const
 
virtual O3Labelname ()
 
virtual const O3Labelname () const
 
virtual O3LabelListparents ()
 
virtual const O3LabelListparents () const
 

Public Types

using O3LabelList = std::vector< O3Label >
 
using O3FormulaList = std::vector< O3Formula >
 
using O3Rule = std::pair< O3LabelList, O3FormulaList >
 
using O3RuleList = std::vector< O3Rule >
 

Detailed Description

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

Definition at line 542 of file O3prm.h.

Member Typedef Documentation

◆ O3FormulaList

Definition at line 545 of file O3prm.h.

◆ O3LabelList

Definition at line 544 of file O3prm.h.

◆ O3Rule

Definition at line 546 of file O3prm.h.

◆ O3RuleList

Definition at line 547 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3RuleCPT() [1/4]

gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( )

Definition at line 724 of file O3prm.cpp.

Referenced by copy().

724  : O3Attribute(), __rules{new O3RuleList{}} {
725  GUM_CONSTRUCTOR(O3RuleCPT);
726  }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:547
+ Here is the caller graph for this function:

◆ O3RuleCPT() [2/4]

gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( const O3Label type,
const O3Label name,
const O3Attribute::O3LabelList parents,
O3RuleList &&  rules 
)

Definition at line 728 of file O3prm.cpp.

731  :
733  __rules(std::unique_ptr< O3RuleList >(new O3RuleList(rules))) {
734  GUM_CONSTRUCTOR(O3RuleCPT);
735  }
virtual O3LabelList & parents()
Definition: O3prm.cpp:668
virtual O3RuleList & rules()
Definition: O3prm.cpp:766
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:547
virtual O3Label & type()
Definition: O3prm.cpp:662
virtual O3Label & name()
Definition: O3prm.cpp:665

◆ O3RuleCPT() [3/4]

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

Definition at line 737 of file O3prm.cpp.

737  :
738  O3Attribute(src),
739  __rules(std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()))) {
740  GUM_CONS_CPY(O3RuleCPT);
741  }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:547

◆ O3RuleCPT() [4/4]

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

Definition at line 743 of file O3prm.cpp.

743  :
744  O3Attribute(src), __rules(std::move(src.__rules)) {
745  GUM_CONS_MOV(O3RuleCPT);
746  }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567

◆ ~O3RuleCPT()

gum::prm::o3prm::O3RuleCPT::~O3RuleCPT ( )

Definition at line 748 of file O3prm.cpp.

748 { GUM_DESTRUCTOR(O3RuleCPT); }

Member Function Documentation

◆ copy()

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

Implements gum::prm::o3prm::O3Attribute.

Definition at line 769 of file O3prm.cpp.

References O3RuleCPT().

769  {
770  auto copy = new O3RuleCPT(*this);
771  return std::unique_ptr< O3Attribute >(copy);
772  }
virtual std::unique_ptr< O3Attribute > copy() const
Definition: O3prm.cpp:769
+ Here is the call graph for this function:

◆ name() [1/2]

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

Definition at line 665 of file O3prm.cpp.

References gum::prm::o3prm::O3Attribute::__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
virtualinherited

Definition at line 666 of file O3prm.cpp.

References gum::prm::o3prm::O3Attribute::__name.

666 { return __name; }

◆ operator=() [1/2]

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

Definition at line 750 of file O3prm.cpp.

References __rules, gum::prm::o3prm::O3Attribute::operator=(), and rules().

750  {
751  if (this == &src) { return *this; }
752 
754  __rules = std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()));
755  return *this;
756  }
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:646
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:547
+ Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 758 of file O3prm.cpp.

References __rules, and gum::prm::o3prm::O3Attribute::operator=().

758  {
759  if (this == &src) { return *this; }
760 
762  __rules = std::move(src.__rules);
763  return *this;
764  }
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:646
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567
+ Here is the call graph for this function:

◆ parents() [1/2]

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

Definition at line 668 of file O3prm.cpp.

References gum::prm::o3prm::O3Attribute::__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
virtualinherited

Definition at line 669 of file O3prm.cpp.

References gum::prm::o3prm::O3Attribute::__parents.

669  {
670  return __parents;
671  }

◆ rules() [1/2]

O3RuleCPT::O3RuleList & gum::prm::o3prm::O3RuleCPT::rules ( )
virtual

Definition at line 766 of file O3prm.cpp.

References __rules.

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

766 { return *__rules; }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567
+ Here is the caller graph for this function:

◆ rules() [2/2]

const O3RuleCPT::O3RuleList & gum::prm::o3prm::O3RuleCPT::rules ( ) const
virtual

Definition at line 767 of file O3prm.cpp.

References __rules.

767 { return *__rules; }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:567

◆ type() [1/2]

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

Definition at line 662 of file O3prm.cpp.

References gum::prm::o3prm::O3Attribute::__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
virtualinherited

Definition at line 663 of file O3prm.cpp.

References gum::prm::o3prm::O3Attribute::__type.

663 { return __type; }

Member Data Documentation

◆ __rules

std::unique_ptr< O3RuleList > gum::prm::o3prm::O3RuleCPT::__rules
private

Definition at line 567 of file O3prm.h.

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


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