Wt examples
3.2.0
|
Git object Id. More...
#include <Git.h>
Public Member Functions | |
ObjectId () | |
Default constructor. | |
ObjectId (const std::string &id) | |
Construct from a 40-digit hexadecimal number. | |
std::string | toString () const |
Print as a 40-digit hexadecimal number. |
Git object Id.
Class for compactly storing a 20-byte SHA1 digest.
Git::ObjectId::ObjectId | ( | const std::string & | id | ) | [explicit] |
Construct from a 40-digit hexadecimal number.
Exception | : if the id does not represent a valid SHA1 digest. |
Definition at line 154 of file Git.C.
{ if (id.length() != 40) throw Git::Exception("Git: not a valid SHA1 id: " + id); for (int i = 0; i < 20; ++i) (*this)[i] = fromHex(id[2 * i], id[2 * i + 1]); }
std::string Git::ObjectId::toString | ( | ) | const |