Represents a class.
More...
#include <ArtifactModel.h>
Represents a class.
Definition at line 597 of file ArtifactModel.h.
◆ ArtifactClass()
nnc::ArtifactClass::ArtifactClass |
( |
const std::string & |
class_name | ) |
|
|
inlineexplicit |
◆ accept()
◆ func()
std::shared_ptr< ArtifactClassFunction > nnc::ArtifactClass::func |
( |
bool |
is_public, |
|
|
const std::string & |
ret_type_name, |
|
|
const std::string & |
func_name, |
|
|
const std::list< std::shared_ptr< ArtifactVariable > > & |
params = {} |
|
) |
| |
|
inline |
Creates a class member function.
- Parameters
-
is_public | - if the created function be public. |
ret_type_name | |
func_name | |
params | |
- Returns
Definition at line 644 of file ArtifactModel.h.
645 {})
646 {
647 if (is_public)
648 {
649 auto func = std::make_shared<ArtifactClassFunction>(
this, ret_type_name, func_name, params);
650 _publicFunctions.push_back(
func);
652 }
653 else
654 {
655 auto func = std::make_shared<ArtifactClassFunction>(
this, ret_type_name, func_name, params);
656 _privateFunctions.push_back(
func);
658 }
659 }
std::shared_ptr< ArtifactClassFunction > func(bool is_public, const std::string &ret_type_name, const std::string &func_name, const std::list< std::shared_ptr< ArtifactVariable > > ¶ms={})
Creates a class member function.
Referenced by TEST().
◆ getConstrBlock() [1/2]
◆ getConstrBlock() [2/2]
const ArtifactBlock * nnc::ArtifactClass::getConstrBlock |
( |
| ) |
const |
|
inline |
◆ privateFunctions()
const std::list< std::shared_ptr< ArtifactClassFunction > > & nnc::ArtifactClass::privateFunctions |
( |
| ) |
const |
|
inline |
◆ privateVariables()
const std::list< std::shared_ptr< ArtifactClassVariable > > & nnc::ArtifactClass::privateVariables |
( |
| ) |
const |
|
inline |
◆ publicFunctions()
const std::list< std::shared_ptr< ArtifactClassFunction > > & nnc::ArtifactClass::publicFunctions |
( |
| ) |
const |
|
inline |
◆ publicVariables()
const std::list< std::shared_ptr< ArtifactClassVariable > > & nnc::ArtifactClass::publicVariables |
( |
| ) |
const |
|
inline |
◆ var()
std::shared_ptr< ArtifactClassVariable > nnc::ArtifactClass::var |
( |
bool |
is_public, |
|
|
const std::string & |
type_name, |
|
|
const std::string & |
var_name, |
|
|
const std::list< std::shared_ptr< ArtifactExpr > > & |
dimensions = {} , |
|
|
const std::list< std::shared_ptr< ArtifactExpr > > & |
initializers = {} |
|
) |
| |
|
inline |
Creates a class member variable.
- Parameters
-
is_public | - if the created variable be public. |
type_name | |
var_name | |
dimensions | |
initializer | |
constructors | |
- Returns
Definition at line 615 of file ArtifactModel.h.
616 {},
617 const std::list<std::shared_ptr<ArtifactExpr>> &initializers = {})
618 {
619 if (is_public)
620 {
621 auto var = std::make_shared<ArtifactClassVariable>(
this, type_name, var_name, dimensions,
622 initializers);
623 _publicVariables.push_back(
var);
625 }
626 else
627 {
628 auto var = std::make_shared<ArtifactClassVariable>(
this, type_name, var_name, dimensions,
629 initializers);
630 _privateVariables.push_back(
var);
632 }
633 }
std::shared_ptr< ArtifactClassVariable > var(bool is_public, const std::string &type_name, const std::string &var_name, const std::list< std::shared_ptr< ArtifactExpr > > &dimensions={}, const std::list< std::shared_ptr< ArtifactExpr > > &initializers={})
Creates a class member variable.
The documentation for this class was generated from the following file: