aGrUM  0.20.2
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 546 of file O3prm.h.

Member Typedef Documentation

◆ O3FormulaList

Definition at line 549 of file O3prm.h.

◆ O3LabelList

Definition at line 548 of file O3prm.h.

◆ O3Rule

Definition at line 550 of file O3prm.h.

◆ O3RuleList

Definition at line 551 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3RuleCPT() [1/4]

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

Definition at line 723 of file O3prm.cpp.

723  : O3Attribute(), rules__{new O3RuleList{}} {
724  GUM_CONSTRUCTOR(O3RuleCPT);
725  }
std::unique_ptr< O3RuleList > rules__
Definition: O3prm.h:571
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:551

◆ O3RuleCPT() [2/4]

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

Definition at line 727 of file O3prm.cpp.

730  :
732  rules__(std::unique_ptr< O3RuleList >(new O3RuleList(rules))) {
733  GUM_CONSTRUCTOR(O3RuleCPT);
734  }
virtual O3LabelList & parents()
Definition: O3prm.cpp:667
virtual O3RuleList & rules()
Definition: O3prm.cpp:765
std::unique_ptr< O3RuleList > rules__
Definition: O3prm.h:571
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:551
virtual O3Label & type()
Definition: O3prm.cpp:661
virtual O3Label & name()
Definition: O3prm.cpp:664

◆ O3RuleCPT() [3/4]

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

Definition at line 736 of file O3prm.cpp.

736  :
737  O3Attribute(src),
738  rules__(std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()))) {
739  GUM_CONS_CPY(O3RuleCPT);
740  }
std::unique_ptr< O3RuleList > rules__
Definition: O3prm.h:571
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:551

◆ O3RuleCPT() [4/4]

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

Definition at line 742 of file O3prm.cpp.

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

◆ ~O3RuleCPT()

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

Definition at line 747 of file O3prm.cpp.

747 { 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 768 of file O3prm.cpp.

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

◆ name() [1/2]

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

Definition at line 664 of file O3prm.cpp.

664 { return name__; }

◆ name() [2/2]

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

Definition at line 665 of file O3prm.cpp.

665 { return name__; }

◆ operator=() [1/2]

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

Definition at line 749 of file O3prm.cpp.

749  {
750  if (this == &src) { return *this; }
751 
753  rules__ = std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()));
754  return *this;
755  }
std::unique_ptr< O3RuleList > rules__
Definition: O3prm.h:571
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:645
std::vector< O3Rule > O3RuleList
Definition: O3prm.h:551

◆ operator=() [2/2]

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

Definition at line 757 of file O3prm.cpp.

757  {
758  if (this == &src) { return *this; }
759 
761  rules__ = std::move(src.rules__);
762  return *this;
763  }
std::unique_ptr< O3RuleList > rules__
Definition: O3prm.h:571
virtual O3Attribute & operator=(const O3Attribute &src)
Definition: O3prm.cpp:645

◆ parents() [1/2]

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

Definition at line 667 of file O3prm.cpp.

667 { return parents__; }

◆ parents() [2/2]

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

Definition at line 668 of file O3prm.cpp.

668  {
669  return parents__;
670  }

◆ rules() [1/2]

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

Definition at line 765 of file O3prm.cpp.

765 { return *rules__; }
std::unique_ptr< O3RuleList > rules__
Definition: O3prm.h:571

◆ rules() [2/2]

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

Definition at line 766 of file O3prm.cpp.

766 { return *rules__; }
std::unique_ptr< O3RuleList > rules__
Definition: O3prm.h:571

◆ type() [1/2]

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

Definition at line 661 of file O3prm.cpp.

661 { return type__; }

◆ type() [2/2]

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

Definition at line 662 of file O3prm.cpp.

662 { return type__; }

Member Data Documentation

◆ rules__

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

Definition at line 571 of file O3prm.h.


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