@Andrii It can be done from the code. For now, we do not have docs/help web-pages for each of the SAMSON Elements, but it is in our plans to have them generated automatically for the exposed functionality.
To get UUID and the class name of an Element from which you want to use functionality, you can open the Log (Edit menu -> Show log), then you can search for the Element and check its UUID and the class name:
0_1541585623122_LogViewer-CheckUUIDAndNameOfSAMSONElement.png
Now, in your code, you can do the following to print the exposed functionality of the Element:
// Create a class proxy
SBProxy* classProxy = SAMSON::getProxy("PDBDownload", SBUUID("6F5D45C5-E76E-CDC8-52D5-D2821C128BE8"));
// Print class constructors
classProxy->print();
// Prints the interface
classProxy->getInterface()->print();
It will print the exposed functionality (constructor factory, interface functions, attributes) in the terminal (std::cout stream), like this:
Class proxy:
Name :PDBDownload
UUID :23E5619D-CF88-CD8D-C516-725286102AF8
Element :PDBDownload
Type :10
Factory:
PDBDownload()
Interface:
download(std::string, std::string)
downloadPdb(std::string)
downloadPdb1(std::string)
Attributes:
You might need to allow the terminal with "--logconsole" flag when running SAMSON.
If you have some problems with std::cout not printing to your terminal, you might print it yourself into std::cerr:
// Print interface
std::cerr << "Interface:\n";
auto functionMap = classProxy->getInterface()->getFunctionMap();
for (auto i = functionMap.begin(); i != functionMap.end(); ++i)
std::cerr << i->getKey() << "\n";
// Print attributes
std::cerr << "Attributes:\n";
auto attributeMap = classProxy->getInterface()->getAttributeMap();
for (auto i = attributeMap.begin(); i != attributeMap.end(); ++i)
std::cerr << i->getKey() << "\n";