1 |
// -*- C++ -*- |
2 |
// AID-GENERATED |
3 |
// ========================================================================= |
4 |
// This class was generated by AID - Abstract Interface Definition |
5 |
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. |
6 |
// ========================================================================= |
7 |
#ifndef AIDA_IFUNCTIONCATALOG_H |
8 |
#define AIDA_IFUNCTIONCATALOG_H 1 |
9 |
|
10 |
// This file is part of the AIDA library |
11 |
// Copyright (C) 2002 by the AIDA team. All rights reserved. |
12 |
// This library is free software and under the terms of the |
13 |
// GNU Library General Public License described in the LGPL.txt |
14 |
|
15 |
#include <string> |
16 |
#include <vector> |
17 |
|
18 |
namespace AIDA { |
19 |
|
20 |
class IFunction; |
21 |
|
22 |
/** @interface |
23 |
* |
24 |
* Function catalog. |
25 |
* |
26 |
* @author The AIDA team (http://aida.freehep.org/) |
27 |
* |
28 |
*/ |
29 |
|
30 |
class IFunctionCatalog { |
31 |
|
32 |
public: |
33 |
/// Destructor. |
34 |
virtual ~IFunctionCatalog() { /* nop */; } |
35 |
|
36 |
/** |
37 |
* Remember persistently definition (code!) of a function under a name. |
38 |
* Scripted function created by the user may be automatically available |
39 |
* in the subsequent analysis sessions. This is also a way to create |
40 |
* new names for combinations of exisiting model functions ("G+G+E+P5"). |
41 |
* Last but not least, system may be easily extended with model functions |
42 |
* developed in the programming language directly. |
43 |
* Predefined functions: "G","E","Pn". |
44 |
*/ |
45 |
virtual bool add(std::string nameId, IFunction * f) = 0; |
46 |
|
47 |
virtual bool add(std::string nameId, const std::string & codelet) = 0; |
48 |
|
49 |
/* |
50 |
* Get a list of all available functions. |
51 |
*/ |
52 |
virtual std::vector<std::string> list() = 0; |
53 |
|
54 |
/* |
55 |
* Remove function from the catalog. |
56 |
*/ |
57 |
virtual void remove(const std::string & nameId) = 0; |
58 |
|
59 |
/* |
60 |
* Write contents of the catalog to disk. |
61 |
* We have to agree on the format here, or define and XML |
62 |
* entry for IFunctionCatalog! |
63 |
*/ |
64 |
virtual bool storeAll(const std::string & nameOnDisk) = 0; |
65 |
|
66 |
/* |
67 |
* Load contents of the catalog from disk |
68 |
* We have to agree on the format here, or define and XML |
69 |
* entry for IFunctionCatalog! |
70 |
*/ |
71 |
virtual bool loadAll(const std::string & nameOnDisk) = 0; |
72 |
}; // class |
73 |
} // namespace AIDA |
74 |
#endif /* ifndef AIDA_IFUNCTIONCATALOG_H */ |