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

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

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

Public Member Functions

 O3PRM ()
 
 O3PRM (const O3PRM &src)
 
 O3PRM (O3PRM &&src)
 
 ~O3PRM ()
 
O3PRMoperator= (const O3PRM &src)
 
O3PRMoperator= (O3PRM &&src)
 
O3TypeListtypes ()
 
const O3TypeListtypes () const
 
O3IntTypeListint_types ()
 
const O3IntTypeListint_types () const
 
O3RealTypeListreal_types ()
 
const O3RealTypeListreal_types () const
 
O3InterfaceListinterfaces ()
 
const O3InterfaceListinterfaces () const
 
O3ClassListclasses ()
 
const O3ClassListclasses () const
 
O3SystemListsystems ()
 
const O3SystemListsystems () const
 
O3ImportListimports ()
 
const O3ImportListimports () const
 

Public Types

using O3TypeList = std::vector< std::unique_ptr< O3Type > >
 
using O3IntTypeList = std::vector< std::unique_ptr< O3IntType > >
 
using O3RealTypeList = std::vector< std::unique_ptr< O3RealType > >
 
using O3InterfaceList = std::vector< std::unique_ptr< O3Interface > >
 
using O3ClassList = std::vector< std::unique_ptr< O3Class > >
 
using O3SystemList = std::vector< std::unique_ptr< O3System > >
 
using O3ImportList = std::vector< std::unique_ptr< O3Import > >
 

Detailed Description

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

Definition at line 892 of file O3prm.h.

Member Typedef Documentation

◆ O3ClassList

using gum::prm::o3prm::O3PRM::O3ClassList = std::vector< std::unique_ptr< O3Class > >

Definition at line 898 of file O3prm.h.

◆ O3ImportList

using gum::prm::o3prm::O3PRM::O3ImportList = std::vector< std::unique_ptr< O3Import > >

Definition at line 900 of file O3prm.h.

◆ O3InterfaceList

using gum::prm::o3prm::O3PRM::O3InterfaceList = std::vector< std::unique_ptr< O3Interface > >

Definition at line 897 of file O3prm.h.

◆ O3IntTypeList

using gum::prm::o3prm::O3PRM::O3IntTypeList = std::vector< std::unique_ptr< O3IntType > >

Definition at line 895 of file O3prm.h.

◆ O3RealTypeList

using gum::prm::o3prm::O3PRM::O3RealTypeList = std::vector< std::unique_ptr< O3RealType > >

Definition at line 896 of file O3prm.h.

◆ O3SystemList

using gum::prm::o3prm::O3PRM::O3SystemList = std::vector< std::unique_ptr< O3System > >

Definition at line 899 of file O3prm.h.

◆ O3TypeList

using gum::prm::o3prm::O3PRM::O3TypeList = std::vector< std::unique_ptr< O3Type > >

Definition at line 894 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3PRM() [1/3]

gum::prm::o3prm::O3PRM::O3PRM ( )

Definition at line 398 of file O3prm.cpp.

References gum::prm::o3prm::O3RealType::name().

398  {
399  GUM_CONSTRUCTOR(O3PRM);
400  // Creating the boolean type
401  auto name = O3Label(O3Position(), "boolean");
402  auto f = O3Label(O3Position(), "false");
403  auto t = O3Label(O3Position(), "true");
404  auto labels = O3Type::LabelMap();
405  labels.push_back(O3Type::LabelPair(f, O3Label()));
406  labels.push_back(O3Type::LabelPair(t, O3Label()));
407  auto boolean = std::unique_ptr< O3Type >(new O3Type());
408  boolean->name() = std::move(name);
409  boolean->labels() = std::move(labels);
410  __types.push_back(std::move(boolean));
411  }
O3TypeList __types
Definition: O3prm.h:932
std::vector< LabelPair > LabelMap
Definition: O3prm.h:207
std::pair< O3Label, O3Label > LabelPair
Definition: O3prm.h:206
+ Here is the call graph for this function:

◆ O3PRM() [2/3]

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

Definition at line 413 of file O3prm.cpp.

References __classes, __imports, __int_types, __interfaces, __real_types, __systems, __types, and gum::prm::o3prm::O3RealType::O3RealType().

413  {
414  GUM_CONS_CPY(O3PRM);
415  for (const auto& t : src.__types) {
416  __types.emplace_back(new O3Type(*t));
417  }
418  for (const auto& t : src.__int_types) {
419  __int_types.emplace_back(new O3IntType(*t));
420  }
421  for (const auto& t : src.__real_types) {
422  __real_types.emplace_back(new O3RealType(*t));
423  }
424  for (const auto& i : src.__interfaces) {
425  __interfaces.emplace_back(new O3Interface(*i));
426  }
427  for (const auto& c : src.__classes) {
428  __classes.emplace_back(new O3Class(*c));
429  }
430  for (const auto& s : src.__systems) {
431  __systems.emplace_back(new O3System(*s));
432  }
433  for (const auto& i : src.__imports) {
434  __imports.emplace_back(new O3Import(*i));
435  }
436  }
O3SystemList __systems
Definition: O3prm.h:937
O3ClassList __classes
Definition: O3prm.h:936
O3RealTypeList __real_types
Definition: O3prm.h:934
O3IntTypeList __int_types
Definition: O3prm.h:933
O3TypeList __types
Definition: O3prm.h:932
O3InterfaceList __interfaces
Definition: O3prm.h:935
O3ImportList __imports
Definition: O3prm.h:938
+ Here is the call graph for this function:

◆ O3PRM() [3/3]

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

Definition at line 438 of file O3prm.cpp.

438  :
439  __types(std::move(src.__types)), __int_types(std::move(src.__int_types)),
440  __real_types(std::move(src.__real_types)),
441  __interfaces(std::move(src.__interfaces)),
442  __classes(std::move(src.__classes)), __systems(std::move(src.__systems)),
443  __imports(std::move(src.__imports)) {
444  GUM_CONS_MOV(O3PRM);
445  }
O3SystemList __systems
Definition: O3prm.h:937
O3ClassList __classes
Definition: O3prm.h:936
O3RealTypeList __real_types
Definition: O3prm.h:934
O3IntTypeList __int_types
Definition: O3prm.h:933
O3TypeList __types
Definition: O3prm.h:932
O3InterfaceList __interfaces
Definition: O3prm.h:935
O3ImportList __imports
Definition: O3prm.h:938

◆ ~O3PRM()

gum::prm::o3prm::O3PRM::~O3PRM ( )

Definition at line 447 of file O3prm.cpp.

447 { GUM_DESTRUCTOR(O3PRM); }

Member Function Documentation

◆ classes() [1/2]

◆ classes() [2/2]

const O3PRM::O3ClassList & gum::prm::o3prm::O3PRM::classes ( ) const

Definition at line 505 of file O3prm.cpp.

References __classes.

505 { return __classes; }
O3ClassList __classes
Definition: O3prm.h:936

◆ imports() [1/2]

O3PRM::O3ImportList & gum::prm::o3prm::O3PRM::imports ( )

Definition at line 511 of file O3prm.cpp.

References __imports.

511 { return __imports; }
O3ImportList __imports
Definition: O3prm.h:938

◆ imports() [2/2]

const O3PRM::O3ImportList & gum::prm::o3prm::O3PRM::imports ( ) const

Definition at line 513 of file O3prm.cpp.

References __imports.

513 { return __imports; }
O3ImportList __imports
Definition: O3prm.h:938

◆ int_types() [1/2]

O3PRM::O3IntTypeList & gum::prm::o3prm::O3PRM::int_types ( )

Definition at line 490 of file O3prm.cpp.

References __int_types.

Referenced by gum::prm::o3prm::O3TypeFactory< GUM_SCALAR >::__checkDepreactedO3Types(), gum::prm::o3prm::O3TypeFactory< GUM_SCALAR >::__checkO3IntTypes(), and gum::prm::o3prm::O3TypeFactory< GUM_SCALAR >::__checkO3RealTypes().

490 { return __int_types; }
O3IntTypeList __int_types
Definition: O3prm.h:933
+ Here is the caller graph for this function:

◆ int_types() [2/2]

const O3PRM::O3IntTypeList & gum::prm::o3prm::O3PRM::int_types ( ) const

Definition at line 491 of file O3prm.cpp.

References __int_types.

491 { return __int_types; }
O3IntTypeList __int_types
Definition: O3prm.h:933

◆ interfaces() [1/2]

O3PRM::O3InterfaceList & gum::prm::o3prm::O3PRM::interfaces ( )

◆ interfaces() [2/2]

const O3PRM::O3InterfaceList & gum::prm::o3prm::O3PRM::interfaces ( ) const

Definition at line 499 of file O3prm.cpp.

References __interfaces.

499  {
500  return __interfaces;
501  }
O3InterfaceList __interfaces
Definition: O3prm.h:935

◆ operator=() [1/2]

O3PRM & gum::prm::o3prm::O3PRM::operator= ( const O3PRM src)

Definition at line 449 of file O3prm.cpp.

References __classes, __imports, __int_types, __interfaces, __real_types, __systems, and __types.

449  {
450  if (this == &src) { return *this; }
451  for (const auto& t : src.__types) {
452  __types.emplace_back(new O3Type(*t));
453  }
454  for (const auto& t : src.__int_types) {
455  __int_types.emplace_back(new O3IntType(*t));
456  }
457  for (const auto& t : src.__real_types) {
458  __real_types.emplace_back(new O3RealType(*t));
459  }
460  for (const auto& i : src.__interfaces) {
461  __interfaces.emplace_back(new O3Interface(*i));
462  }
463  for (const auto& c : src.__classes) {
464  __classes.emplace_back(new O3Class(*c));
465  }
466  for (const auto& s : src.__systems) {
467  __systems.emplace_back(new O3System(*s));
468  }
469  for (const auto& i : src.__imports) {
470  __imports.emplace_back(new O3Import(*i));
471  }
472  return *this;
473  }
O3SystemList __systems
Definition: O3prm.h:937
O3ClassList __classes
Definition: O3prm.h:936
O3RealTypeList __real_types
Definition: O3prm.h:934
O3IntTypeList __int_types
Definition: O3prm.h:933
O3TypeList __types
Definition: O3prm.h:932
O3InterfaceList __interfaces
Definition: O3prm.h:935
O3ImportList __imports
Definition: O3prm.h:938

◆ operator=() [2/2]

O3PRM & gum::prm::o3prm::O3PRM::operator= ( O3PRM &&  src)

Definition at line 475 of file O3prm.cpp.

References __classes, __imports, __int_types, __interfaces, __real_types, __systems, and __types.

475  {
476  if (this == &src) { return *this; }
477  __types = std::move(src.__types);
478  __int_types = std::move(src.__int_types);
479  __real_types = std::move(src.__real_types);
480  __interfaces = std::move(src.__interfaces);
481  __classes = std::move(src.__classes);
482  __systems = std::move(src.__systems);
483  __imports = std::move(src.__imports);
484  return *this;
485  }
O3SystemList __systems
Definition: O3prm.h:937
O3ClassList __classes
Definition: O3prm.h:936
O3RealTypeList __real_types
Definition: O3prm.h:934
O3IntTypeList __int_types
Definition: O3prm.h:933
O3TypeList __types
Definition: O3prm.h:932
O3InterfaceList __interfaces
Definition: O3prm.h:935
O3ImportList __imports
Definition: O3prm.h:938

◆ real_types() [1/2]

O3PRM::O3RealTypeList & gum::prm::o3prm::O3PRM::real_types ( )

Definition at line 493 of file O3prm.cpp.

References __real_types.

Referenced by gum::prm::o3prm::O3TypeFactory< GUM_SCALAR >::__checkDepreactedO3Types(), and gum::prm::o3prm::O3TypeFactory< GUM_SCALAR >::__checkO3RealTypes().

493 { return __real_types; }
O3RealTypeList __real_types
Definition: O3prm.h:934
+ Here is the caller graph for this function:

◆ real_types() [2/2]

const O3PRM::O3RealTypeList & gum::prm::o3prm::O3PRM::real_types ( ) const

Definition at line 494 of file O3prm.cpp.

References __real_types.

494  {
495  return __real_types;
496  }
O3RealTypeList __real_types
Definition: O3prm.h:934

◆ systems() [1/2]

O3PRM::O3SystemList & gum::prm::o3prm::O3PRM::systems ( )

Definition at line 507 of file O3prm.cpp.

References __systems.

Referenced by gum::prm::o3prm::O3SystemFactory< GUM_SCALAR >::build().

507 { return __systems; }
O3SystemList __systems
Definition: O3prm.h:937
+ Here is the caller graph for this function:

◆ systems() [2/2]

const O3PRM::O3SystemList & gum::prm::o3prm::O3PRM::systems ( ) const

Definition at line 509 of file O3prm.cpp.

References __systems.

509 { return __systems; }
O3SystemList __systems
Definition: O3prm.h:937

◆ types() [1/2]

◆ types() [2/2]

const O3PRM::O3TypeList & gum::prm::o3prm::O3PRM::types ( ) const

Definition at line 488 of file O3prm.cpp.

References __types.

488 { return __types; }
O3TypeList __types
Definition: O3prm.h:932

Member Data Documentation

◆ __classes

O3ClassList gum::prm::o3prm::O3PRM::__classes
private

Definition at line 936 of file O3prm.h.

Referenced by classes(), O3PRM(), and operator=().

◆ __imports

O3ImportList gum::prm::o3prm::O3PRM::__imports
private

Definition at line 938 of file O3prm.h.

Referenced by imports(), O3PRM(), and operator=().

◆ __int_types

O3IntTypeList gum::prm::o3prm::O3PRM::__int_types
private

Definition at line 933 of file O3prm.h.

Referenced by int_types(), O3PRM(), and operator=().

◆ __interfaces

O3InterfaceList gum::prm::o3prm::O3PRM::__interfaces
private

Definition at line 935 of file O3prm.h.

Referenced by interfaces(), O3PRM(), and operator=().

◆ __real_types

O3RealTypeList gum::prm::o3prm::O3PRM::__real_types
private

Definition at line 934 of file O3prm.h.

Referenced by O3PRM(), operator=(), and real_types().

◆ __systems

O3SystemList gum::prm::o3prm::O3PRM::__systems
private

Definition at line 937 of file O3prm.h.

Referenced by O3PRM(), operator=(), and systems().

◆ __types

O3TypeList gum::prm::o3prm::O3PRM::__types
private

Definition at line 932 of file O3prm.h.

Referenced by O3PRM(), operator=(), and types().


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