aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
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

◆ O3FormulaList

Definition at line 543 of file O3prm.h.

◆ O3LabelList

Definition at line 542 of file O3prm.h.

◆ O3Rule

Definition at line 544 of file O3prm.h.

◆ O3RuleList

Definition at line 545 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3RuleCPT() [1/4]

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

Definition at line 752 of file O3prm.cpp.

752  : O3Attribute(), _rules_{new O3RuleList{}} {
753  GUM_CONSTRUCTOR(O3RuleCPT);
754  }
std::unique_ptr< O3RuleList > _rules_
Definition: O3prm.h:565
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545

◆ O3RuleCPT() [2/4]

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

Definition at line 756 of file O3prm.cpp.

759  :
761  _rules_(std::unique_ptr< O3RuleList >(new O3RuleList(rules))) {
762  GUM_CONSTRUCTOR(O3RuleCPT);
763  }
std::unique_ptr< O3RuleList > _rules_
Definition: O3prm.h:565
virtual O3LabelList & parents()
Definition: O3prm.cpp:696
virtual O3RuleList & rules()
Definition: O3prm.cpp:795
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545
virtual O3Label & type()
Definition: O3prm.cpp:690
virtual O3Label & name()
Definition: O3prm.cpp:693

◆ O3RuleCPT() [3/4]

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

Definition at line 765 of file O3prm.cpp.

765  :
766  O3Attribute(src), _rules_(std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()))) {
767  GUM_CONS_CPY(O3RuleCPT);
768  }
std::unique_ptr< O3RuleList > _rules_
Definition: O3prm.h:565
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545

◆ O3RuleCPT() [4/4]

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

Definition at line 770 of file O3prm.cpp.

770  : O3Attribute(src), _rules_(std::move(src._rules_)) {
771  GUM_CONS_MOV(O3RuleCPT);
772  }
std::unique_ptr< O3RuleList > _rules_
Definition: O3prm.h:565

◆ ~O3RuleCPT()

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

Definition at line 774 of file O3prm.cpp.

774  {
775  GUM_DESTRUCTOR(O3RuleCPT);
776  ;
777  }

Member Function Documentation

◆ copy()

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

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

Definition at line 798 of file O3prm.cpp.

798  {
799  auto copy = new O3RuleCPT(*this);
800  return std::unique_ptr< O3Attribute >(copy);
801  }
virtual std::unique_ptr< O3Attribute > copy() const
Definition: O3prm.cpp:798

◆ name() [1/2]

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

Definition at line 693 of file O3prm.cpp.

693 { return _name_; }

◆ name() [2/2]

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

Definition at line 694 of file O3prm.cpp.

694 { return _name_; }

◆ operator=() [1/2]

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

Definition at line 779 of file O3prm.cpp.

779  {
780  if (this == &src) { return *this; }
781 
783  _rules_ = std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()));
784  return *this;
785  }
std::unique_ptr< O3RuleList > _rules_
Definition: O3prm.h:565
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:674
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:545

◆ operator=() [2/2]

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

Definition at line 787 of file O3prm.cpp.

787  {
788  if (this == &src) { return *this; }
789 
791  _rules_ = std::move(src._rules_);
792  return *this;
793  }
std::unique_ptr< O3RuleList > _rules_
Definition: O3prm.h:565
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:674

◆ parents() [1/2]

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

Definition at line 696 of file O3prm.cpp.

696 { return _parents_; }

◆ parents() [2/2]

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

Definition at line 697 of file O3prm.cpp.

697 { return _parents_; }

◆ rules() [1/2]

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

Definition at line 795 of file O3prm.cpp.

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

◆ rules() [2/2]

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

Definition at line 796 of file O3prm.cpp.

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

◆ type() [1/2]

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

Definition at line 690 of file O3prm.cpp.

690 { return _type_; }

◆ type() [2/2]

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

Definition at line 691 of file O3prm.cpp.

691 { return _type_; }

Member Data Documentation

◆ _rules_

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

Definition at line 565 of file O3prm.h.


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