Subversion Repositories HomeAutomation

Rev

Rev 1596 | Rev 1598 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1596 Rev 1597
Line 34... Line 34...
34
    this->Clear();
34
    this->Clear();
35
}
35
}
36
 
36
 
37
Byteset::Byteset(const Byteset& set)
37
Byteset::Byteset(const Byteset& set)
38
{
38
{
39
    this->max_size_ = set.max_size_;
39
    this->max_size_ = set.size_;
40
    this->size_ = this->max_size_;
40
    this->size_ = this->max_size_;
41
    this->bytes_ = new unsigned char[this->max_size_];
41
    this->bytes_ = new unsigned char[this->max_size_];
42
 
42
 
43
    memcpy(this->bytes_, set.bytes_, this->max_size_);
43
    memcpy(this->bytes_, set.bytes_, this->max_size_);
44
}
44
}
Line 58... Line 58...
58
}
58
}
59
 
59
 
60
unsigned char* Byteset::Get() const
60
unsigned char* Byteset::Get() const
61
{
61
{
62
    return this->bytes_;
62
    return this->bytes_;
-
 
63
}
-
 
64
 
-
 
65
std::string Byteset::ToCharString()
-
 
66
{
-
 
67
    return std::string((char*)this->bytes_, this->size_);
63
}
68
}
64
 
69
 
65
unsigned char& Byteset::operator[](unsigned int index)
70
unsigned char& Byteset::operator[](unsigned int index)
66
{
71
{
67
    return this->bytes_[index];
72
    return this->bytes_[index];