#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include <memory>
#include "cetlib/LibraryManager.h"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 24 of file liblist.cxx.
25 const string myname =
"listlibs";
27 string libtype =
"tool";
31 if ( arg ==
"-h" ) help =
true;
36 if ( arg ==
"-h" ) help =
true;
40 cout <<
"Usage: " <<
argv[0] <<
" [type] [pattern]" <<
endl;
41 cout <<
" Lists plugin libraries of a specified type." <<
endl;
42 cout <<
" type [tool] - library type (tool, service, module, ...)" <<
endl;
43 cout <<
" pattern [] - pattern in library name" <<
endl;
49 unsigned int nlib = libmgr.getLoadableLibraries(libnames);
50 if ( pattern.size() ) {
52 for (
string libname : libnames ) {
53 if ( libname.find(pattern) != string::npos ) newnames.push_back(libname);
57 unsigned int nsel = libnames.size();
58 if ( pattern.size() && nlib > 0 ) cout <<
"Selected " << nsel <<
" of ";
59 else cout <<
"Found ";
60 cout << nlib <<
" " << libtype <<
" librar";
61 cout << (nlib==1 ?
"y" :
"ies");
62 cout << (nsel ?
":" :
".");
63 for (
string libname : libnames ) {
64 cout <<
"\n " << libname;
QTextStream & endl(QTextStream &s)
std::vector< std::string > NameList