#include <string>
#include <vector>
Go to the source code of this file.
|
void | strToUI (const std::string &m, std::vector< unsigned int > &v) |
|
void | UITostr (std::string &n, std::vector< unsigned int >::const_iterator &i, bool bugcompat) |
|
void | bitmapToUI (const std::vector< bool > &m, std::vector< unsigned int > &v) |
|
void | UITobitmap (std::vector< bool > &n, std::vector< unsigned int >::const_iterator &i, bool bugcompat) |
|
◆ bitmapToUI()
void bitmapToUI |
( |
const std::vector< bool > & |
m, |
|
|
std::vector< unsigned int > & |
v |
|
) |
| |
Definition at line 85 of file vectorize.cxx.
86 unsigned short l =
m.size();
100 if(rem!=32)
v.push_back(
t);
◆ strToUI()
void strToUI |
( |
const std::string & |
m, |
|
|
std::vector< unsigned int > & |
v |
|
) |
| |
Definition at line 9 of file vectorize.cxx.
10 unsigned short l = (
unsigned short)
m.size();
11 v.reserve(
v.size() + (
unsigned int)((2. +
l) / 4. + 0.9));
13 unsigned int rem = 16;
16 for (
unsigned int w = 0;
w <
l;
w++)
18 t |=
m[
w] % 255 << (rem - 8);
24 t |=
m[
w] % 255 << rem;
◆ UITobitmap()
void UITobitmap |
( |
std::vector< bool > & |
n, |
|
|
std::vector< unsigned int >::const_iterator & |
i, |
|
|
bool |
bugcompat |
|
) |
| |
Definition at line 103 of file vectorize.cxx.
111 for (
int w=0;
w<
l;
w++){
113 n.push_back((*
i)>>rem & 0
x1);
122 if (bugcompat &&
l > 32 && (
l%32) == 16) {
◆ UITostr()
void UITostr |
( |
std::string & |
n, |
|
|
std::vector< unsigned int >::const_iterator & |
i, |
|
|
bool |
bugcompat |
|
) |
| |
Definition at line 29 of file vectorize.cxx.
40 short o = (*i) >> rem & 0xff;
45 short o = (*i) >> rem & 0xff;
70 if (bugcompat &&
l > 2 && (
l%4) == 2)
73 for (
int j = 0; ok && j < 4; j++) {
75 if (!std::isprint(
c) &&
c !=
'\n' &&
c !=
'\t' &&
c !=
'\r')