Encapsulates a string representing an HP chain.
More...
#include <hpchain.h>
|
| HPChain () |
| Creates an empty HP chain. More...
|
|
| HPChain (const char *chain) |
| Creates an HP chain with the given string representation, which is copied internally. More...
|
|
| HPChain (std::string chain) |
| Creates an HP chain with the given string representation, which is copied internally. More...
|
|
std::string & | get_chain () |
| Reference to the internal string. More...
|
|
int | length () const |
| Length of the chain. More...
|
|
bool | validate () |
| Validates the internal HP chain. More...
|
|
char | operator[] (unsigned int i) const |
| Returns the i-th bead type. More...
|
|
Encapsulates a string representing an HP chain.
◆ HPChain() [1/3]
Creates an empty HP chain.
◆ HPChain() [2/3]
HPChain::HPChain |
( |
const char * |
chain | ) |
|
|
inline |
Creates an HP chain with the given string representation, which is copied internally.
◆ HPChain() [3/3]
HPChain::HPChain |
( |
std::string |
chain | ) |
|
|
inline |
Creates an HP chain with the given string representation, which is copied internally.
◆ get_chain()
std::string& HPChain::get_chain |
( |
| ) |
|
|
inline |
Reference to the internal string.
◆ length()
int HPChain::length |
( |
| ) |
const |
|
inline |
◆ operator[]()
char HPChain::operator[] |
( |
unsigned int |
i | ) |
const |
|
inline |
Returns the i-th bead type.
- Returns
- Either 'P' or 'H', the i-th bead's type.
◆ validate()
bool HPChain::validate |
( |
| ) |
|
Validates the internal HP chain.
Returns 'true' if the internal string contains only 'H' and 'P' characters.
◆ dChain
std::string HPChain::dChain |
|
private |
The HPChain is represented by this string of characters 'H' and 'P'.
The documentation for this class was generated from the following files: