|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
OKS method class. More...
#include <method.hpp>
Public Member Functions | |
| OksMethod (const std::string &name, OksClass *p=nullptr) | |
| OKS method constructor. | |
| OksMethod (const std::string &name, const std::string &description, OksClass *p=nullptr) | |
| OKS method constructor. | |
| ~OksMethod () | |
| bool | operator== (const class OksMethod &) const |
| const std::string & | get_name () const noexcept |
| void | set_name (const std::string &name) |
| Set method name. | |
| const std::string & | get_description () const noexcept |
| void | set_description (const std::string &description) |
| Set method description. | |
| const std::list< OksMethodImplementation * > * | implementations () const noexcept |
| OksMethodImplementation * | find_implementation (const std::string &language) const |
| Find method implementation. | |
| void | add_implementation (const std::string &language, const std::string &prototype, const std::string &body) |
| Add method implementation. | |
| void | remove_implementation (const std::string &language) |
| Remove method implementation. | |
Private Member Functions | |
| OksMethod (OksXmlInputStream &, OksClass *) | |
| void | save (OksXmlOutputStream &) const |
Private Attributes | |
| OksClass * | p_class |
| std::string | p_name |
| std::string | p_description |
| std::list< OksMethodImplementation * > * | p_implementations |
Static Private Attributes | |
| static const char | method_xml_tag [] = "method" |
| static const char | name_xml_attr [] = "name" |
| static const char | description_xml_attr [] = "description" |
Friends | |
| class | OksKernel |
| class | OksClass |
| class | OksMethodImplementation |
| std::ostream & | operator<< (std::ostream &s, const OksMethod &m) |
OKS method class.
The class implements OKS method that is a part of OKS class. It has name, description and implementations.
Methods can be used in generated Data Access Libraries (DAL). This allows to insert user-defined methods (also known as "DAL algorithms") into generated DAL classes. In such case the method should have appropriate implementations for c++ and/or Java languages. For more information on DAL generation see oksdalgen User's Guide.
Definition at line 152 of file method.hpp.
| dunedaq::oks::OksMethod::OksMethod | ( | const std::string & | name, |
| OksClass * | p = nullptr ) |
OKS method constructor.
Create new OKS method providing name.
The parameter is:
| name | name of the method |
Definition at line 108 of file method.cpp.
| dunedaq::oks::OksMethod::OksMethod | ( | const std::string & | name, |
| const std::string & | description, | ||
| OksClass * | p = nullptr ) |
OKS method constructor.
Create new OKS method providing name and descriptions.
The parameter is:
| name | name of the method (max 128 bytes, see #s_max_name_length variable) |
| description | description of the method (max 2000 bytes, see #s_max_description_length variable) |
| oks::exception | is thrown in case of problems. |
Definition at line 121 of file method.cpp.
| dunedaq::oks::OksMethod::~OksMethod | ( | ) |
Definition at line 130 of file method.cpp.
|
private |
Definition at line 229 of file method.cpp.
| void dunedaq::oks::OksMethod::add_implementation | ( | const std::string & | language, |
| const std::string & | prototype, | ||
| const std::string & | body ) |
Add method implementation.
Add new method implementation. Implementations linked with method shall have different languages.
| language | language of method implementation |
| prototype | prototype of method implementation |
| body | body of method implementation |
In case of problems the oks::exception is thrown.
Definition at line 365 of file method.cpp.
| OksMethodImplementation * dunedaq::oks::OksMethod::find_implementation | ( | const std::string & | language | ) | const |
Find method implementation.
Find method implementation by language.
| language | language of method implementation |
Definition at line 354 of file method.cpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 145 of file method.cpp.
| void dunedaq::oks::OksMethod::remove_implementation | ( | const std::string & | language | ) |
Remove method implementation.
Remove method implementation by language.
| language | language of method implementation |
In case of problems the oks::exception is thrown.
Definition at line 388 of file method.cpp.
|
private |
Definition at line 204 of file method.cpp.
| void dunedaq::oks::OksMethod::set_description | ( | const std::string & | description | ) |
Set method description.
| description | new description of method (max 2000 bytes, see #s_max_description_length variable) |
| oks::exception | is thrown in case of problems. |
Definition at line 412 of file method.cpp.
| void dunedaq::oks::OksMethod::set_name | ( | const std::string & | name | ) |
Set method name.
Methods linked with the same class shall have different names.
| name | new name of method (max 128 bytes, see #s_max_name_length variable) |
| oks::exception | is thrown in case of problems. |
Definition at line 298 of file method.cpp.
|
friend |
Definition at line 155 of file method.hpp.
|
friend |
Definition at line 154 of file method.hpp.
|
friend |
Definition at line 156 of file method.hpp.
|
friend |
Definition at line 184 of file method.cpp.
|
staticprivate |
Definition at line 293 of file method.hpp.
|
staticprivate |
Definition at line 291 of file method.hpp.
|
staticprivate |
Definition at line 292 of file method.hpp.
|
private |
Definition at line 277 of file method.hpp.
|
private |
Definition at line 279 of file method.hpp.
|
private |
Definition at line 280 of file method.hpp.
|
private |
Definition at line 278 of file method.hpp.