Product breakdown structure (PBS).
More...
#include <JPBS.hh>
|
| JPBS () |
| Default constructor. More...
|
|
| JPBS (const int i0, const int i1=-1, const int i2=-1, const int i3=-1, const int i4=-1, const int i5=-1, const int i6=-1, const int i7=-1, const int i8=-1, const int i9=-1) |
| Constructor. More...
|
|
| JPBS (const std::string &input) |
| Constructor. More...
|
|
const JPBS & | getPBS () const |
| Get PBS. More...
|
|
bool | is_valid () const |
| Check validity. More...
|
|
bool | equals (const JPBS &pbs) const |
| Equality. More...
|
|
|
static const char | DOT = '.' |
| Separator between PBS values. More...
|
|
static const char | SEPARATOR = '/' |
| Separator between PBS and variant. More...
|
|
Product breakdown structure (PBS).
The PBS consists of one (or more) integer value(s), separated by JPBS::DOT.
The ASCII format should therefore read "<int>[.<int>]+"
.
Definition at line 27 of file JPBS.hh.
◆ JPBS() [1/3]
JDATABASE::JPBS::JPBS |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 46 of file JPBS.hh.
◆ JPBS() [2/3]
JDATABASE::JPBS::JPBS |
( |
const int |
i0, |
|
|
const int |
i1 = -1 , |
|
|
const int |
i2 = -1 , |
|
|
const int |
i3 = -1 , |
|
|
const int |
i4 = -1 , |
|
|
const int |
i5 = -1 , |
|
|
const int |
i6 = -1 , |
|
|
const int |
i7 = -1 , |
|
|
const int |
i8 = -1 , |
|
|
const int |
i9 = -1 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
i0 | PBS number |
i1 | PBS number |
i2 | PBS number |
i3 | PBS number |
i4 | PBS number |
i5 | PBS number |
i6 | PBS number |
i7 | PBS number |
i8 | PBS number |
i9 | PBS number |
Definition at line 64 of file JPBS.hh.
75 if (i0 != -1) { push_back(i0); }
76 if (i1 != -1) { push_back(i1); }
77 if (i2 != -1) { push_back(i2); }
78 if (i3 != -1) { push_back(i3); }
79 if (i4 != -1) { push_back(i4); }
80 if (i5 != -1) { push_back(i5); }
81 if (i6 != -1) { push_back(i6); }
82 if (i7 != -1) { push_back(i7); }
83 if (i8 != -1) { push_back(i8); }
84 if (i9 != -1) { push_back(i9); }
◆ JPBS() [3/3]
JDATABASE::JPBS::JPBS |
( |
const std::string & |
input | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 93 of file JPBS.hh.
95 std::istringstream is(input);
◆ getPBS()
const JPBS& JDATABASE::JPBS::getPBS |
( |
| ) |
const |
|
inline |
Get PBS.
- Returns
- PBS
Definition at line 106 of file JPBS.hh.
108 return static_cast<const JPBS&>(*
this);
◆ is_valid()
bool JDATABASE::JPBS::is_valid |
( |
| ) |
const |
|
inline |
Check validity.
- Returns
- true if valid; else false
Definition at line 117 of file JPBS.hh.
119 return !this->empty();
◆ equals()
bool JDATABASE::JPBS::equals |
( |
const JPBS & |
pbs | ) |
const |
|
inline |
Equality.
- Parameters
-
- Returns
- true if PBS is equal; else false
Definition at line 129 of file JPBS.hh.
131 if (this->size() == pbs.size()) {
133 for (const_iterator p = this->begin(), q = pbs.begin(); p != this->end(); ++p, ++q) {
◆ operator<
bool operator< |
( |
const JPBS & |
first, |
|
|
const JPBS & |
second |
|
) |
| |
|
friend |
Less-than operator.
- Parameters
-
first | first PBS |
second | second PBS |
- Returns
- true if first PBS higher in hierarchy; else false
Definition at line 153 of file JPBS.hh.
155 for (const_iterator p = first.begin(), q = second.begin(); p != first.end() && q != second.end(); ++p, ++q) {
161 return first.size() < second.size();
◆ operator>>
std::istream& operator>> |
( |
std::istream & |
in, |
|
|
JPBS & |
object |
|
) |
| |
|
friend |
Read PBS from input stream.
- Parameters
-
- Returns
- input stream
Definition at line 172 of file JPBS.hh.
182 object.push_back(pbs);
185 if (in.ignore() && in >> pbs)
186 object.push_back(pbs);
188 in.setstate(ios::failbit);
193 in.setstate(ios::failbit);
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JPBS & |
object |
|
) |
| |
|
friend |
Write PBS to output stream.
- Parameters
-
out | output stream |
object | PBS |
- Returns
- output stream
Definition at line 207 of file JPBS.hh.
212 if (!
object.empty()) {
214 const_iterator i =
object.begin();
218 while (++i !=
object.end()) {
◆ DOT
const char JDATABASE::JPBS::DOT = '.' |
|
static |
Separator between PBS values.
Definition at line 34 of file JPBS.hh.
◆ SEPARATOR
const char JDATABASE::JPBS::SEPARATOR = '/' |
|
static |
Separator between PBS and variant.
Definition at line 40 of file JPBS.hh.
The documentation for this struct was generated from the following file: