#include <CoWLibrary.h>
Definition at line 16 of file CoWLibrary.h.
◆ CoWLibrary() [1/2]
| CoWTools::CoWLibrary::CoWLibrary |
( |
bool | Summary = true | ) |
|
|
inline |
◆ CoWLibrary() [2/2]
| CoWTools::CoWLibrary::CoWLibrary |
( |
const std::string & | n, |
|
|
bool | Summary = true ) |
|
inline |
◆ fromRecord()
| std::shared_ptr< CoWLibrary > CoWTools::CoWLibrary::fromRecord |
( |
std::istream & | in, |
|
|
bool | summary ) |
|
static |
Definition at line 23 of file CoWLibrary.cxx.
23 {
24 std::string libLine;
25 if(std::getline(in,libLine).eof()){
26
27 std::cerr<<"Returning 0"<<std::endl;
28 return 0;
29 }
30 int len=0;
32 std::string
libName=
"Anonymous";
34
35 sscanf(libLine.c_str(),"%*s %*s %*s %*s %*s%n",
36 &len
37 );
38 if(libLine.size()>(
uint)(len+1)){
39 nfields=sscanf(libLine.substr(len+1).c_str(),
"%2047s",buff);
40 if(nfields>0){
42
43 }
44 }else{
46 }
47 auto lib=std::make_shared<CoWTools::CoWLibrary>(libName,summary);
48 CoWRecordStats
r(summary);
51 return lib;
52 }
◆ operator bool()
| CoWTools::CoWLibrary::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Definition at line 38 of file CoWLibrary.h.
38 {
41 for(
int i=0;
i<11;
i++){
42 if(vals[i])return true;
43 }
44 return false;
45 }else{
47 if(*(
i.second))
return true;
48 }
49 return false;
50 }
51 }
◆ operator+=()
Definition at line 67 of file CoWLibrary.h.
67 {
69 std::cerr<<"Warning trying to add different libraries. Ignoring"<<std::endl;
70 return *this;
71 }
72 for(auto i:rhs.m_records){
75 *(
l->second)+=*(
i.second);
76 }else{
77 m_records.insert(std::make_pair(
i.first,std::make_shared<CoWRecord>(*(
i.second))));
78 }
79 }
81 return *this;
82 }
l
Printing final latex table to .tex output file.
◆ operator-()
| CoWLibrary CoWTools::CoWLibrary::operator- |
( |
| ) |
const |
|
inline |
◆ operator-=()
Definition at line 84 of file CoWLibrary.h.
84 {
86 std::cerr<<"Warning trying to subtract different libraries. Ignoring"<<std::endl;
87 return *this;
88 }
89 for(auto i:rhs.m_records){
92 *(
l->second)-=*(
i.second);
93 }else{
94 m_records.insert(std::make_pair(
i.first,std::make_shared<CoWRecord>(-*(
i.second))));
95 }
96 }
98 return *this;
99 }
◆ parseRecord()
| void CoWTools::CoWLibrary::parseRecord |
( |
std::istream & | in | ) |
|
◆ operator+
Definition at line 53 of file CoWLibrary.h.
53 {
54 if(lhs.m_libName!=rhs.m_libName){
55 std::cerr<<"Warning trying to add different libraries. Ignoring"<<std::endl;
56 return lhs;
57 }
58 return lhs+=rhs;
59 }
◆ operator-
Definition at line 30 of file CoWLibrary.h.
30 {
31 if(lhs.m_libName!=rhs.m_libName){
32 std::cerr<<"Warning trying to subtract different libraries. Ignoring"<<std::endl;
33 return lhs;
34 }
35 return lhs-=rhs;
36 }
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const CoWLibrary & | l ) |
|
friend |
Definition at line 54 of file CoWLibrary.cxx.
54 {
55
56
57
58
59
60 os<<
" Lib= "<<
l.m_libName<<
" "<<
l.m_ms;
62 }
◆ m_libName
| std::string CoWTools::CoWLibrary::m_libName |
◆ m_ms
◆ m_records
| std::unordered_map<std::string,std::shared_ptr<CoWRecord> > CoWTools::CoWLibrary::m_records |
◆ m_summary
| bool CoWTools::CoWLibrary::m_summary |
|
private |
The documentation for this class was generated from the following files: