DataBlock.hh (11042:d34a75cb3646) | DataBlock.hh (11049:dfb0aa3f0649) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 53 unchanged lines hidden (view full) --- 62 void setData(const uint8_t *data, int offset, int len); 63 void copyPartial(const DataBlock & dblk, int offset, int len); 64 bool equal(const DataBlock& obj) const; 65 void print(std::ostream& out) const; 66 67 private: 68 void alloc(); 69 uint8_t *m_data; | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 53 unchanged lines hidden (view full) --- 62 void setData(const uint8_t *data, int offset, int len); 63 void copyPartial(const DataBlock & dblk, int offset, int len); 64 bool equal(const DataBlock& obj) const; 65 void print(std::ostream& out) const; 66 67 private: 68 void alloc(); 69 uint8_t *m_data; |
70 //! true if this DataBlock is responsible for deleting m_data, 71 //! false otherwise. | |
72 bool m_alloc; 73}; 74 75inline void 76DataBlock::assign(uint8_t *data) 77{ 78 assert(data != NULL); 79 if (m_alloc) { --- 39 unchanged lines hidden --- | 70 bool m_alloc; 71}; 72 73inline void 74DataBlock::assign(uint8_t *data) 75{ 76 assert(data != NULL); 77 if (m_alloc) { --- 39 unchanged lines hidden --- |