aGrUM  0.13.2
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 540 of file O3prm.h.

Member Typedef Documentation

Definition at line 543 of file O3prm.h.

Definition at line 542 of file O3prm.h.

Definition at line 544 of file O3prm.h.

Definition at line 545 of file O3prm.h.

Constructor & Destructor Documentation

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

Definition at line 722 of file O3prm.cpp.

Referenced by copy().

722  : O3Attribute(), __rules{new O3RuleList{}} {
723  GUM_CONSTRUCTOR(O3RuleCPT);
724  }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:565
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545

+ Here is the caller graph for this function:

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

Definition at line 726 of file O3prm.cpp.

729  :
731  __rules(std::unique_ptr< O3RuleList >(new O3RuleList(rules))) {
732  GUM_CONSTRUCTOR(O3RuleCPT);
733  }
virtual O3LabelList & parents()
Definition: O3prm.cpp:666
virtual O3RuleList & rules()
Definition: O3prm.cpp:764
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:565
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545
virtual O3Label & type()
Definition: O3prm.cpp:660
virtual O3Label & name()
Definition: O3prm.cpp:663
gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( const O3RuleCPT src)

Definition at line 735 of file O3prm.cpp.

735  :
736  O3Attribute(src),
737  __rules(std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()))) {
738  GUM_CONS_CPY(O3RuleCPT);
739  }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:565
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545
gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( O3RuleCPT &&  src)

Definition at line 741 of file O3prm.cpp.

741  :
742  O3Attribute(src), __rules(std::move(src.__rules)) {
743  GUM_CONS_MOV(O3RuleCPT);
744  }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:565
gum::prm::o3prm::O3RuleCPT::~O3RuleCPT ( )

Definition at line 746 of file O3prm.cpp.

746 { GUM_DESTRUCTOR(O3RuleCPT); }

Member Function Documentation

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

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

Definition at line 767 of file O3prm.cpp.

References O3RuleCPT().

767  {
768  auto copy = new O3RuleCPT(*this);
769  return std::unique_ptr< O3Attribute >(copy);
770  }
virtual std::unique_ptr< O3Attribute > copy() const
Definition: O3prm.cpp:767

+ Here is the call graph for this function:

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

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

663 { return __name; }

+ Here is the caller graph for this function:

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

Definition at line 664 of file O3prm.cpp.

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

664 { return __name; }
O3RuleCPT & gum::prm::o3prm::O3RuleCPT::operator= ( const O3RuleCPT src)
virtual

Definition at line 748 of file O3prm.cpp.

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

748  {
749  if (this == &src) { return *this; }
750 
752  __rules = std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()));
753  return *this;
754  }
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:644
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:565
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545

+ Here is the call graph for this function:

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

Definition at line 756 of file O3prm.cpp.

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

756  {
757  if (this == &src) { return *this; }
758 
760  __rules = std::move(src.__rules);
761  return *this;
762  }
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:644
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:565

+ Here is the call graph for this function:

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

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

666 { return __parents; }

+ Here is the caller graph for this function:

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

Definition at line 667 of file O3prm.cpp.

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

667  {
668  return __parents;
669  }
O3RuleCPT::O3RuleList & gum::prm::o3prm::O3RuleCPT::rules ( )
virtual

Definition at line 764 of file O3prm.cpp.

References __rules.

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

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

+ Here is the caller graph for this function:

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

Definition at line 765 of file O3prm.cpp.

References __rules.

765 { return *__rules; }
std::unique_ptr< O3RuleList > __rules
Definition: O3prm.h:565
O3Label & gum::prm::o3prm::O3Attribute::type ( )
virtualinherited

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

660 { return __type; }

+ Here is the caller graph for this function:

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

Definition at line 661 of file O3prm.cpp.

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

661 { return __type; }

Member Data Documentation

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

Definition at line 565 of file O3prm.h.

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


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