7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_PRIMS_CDSOFFSETS_HPP 26 #define SHARE_PRIMS_CDSOFFSETS_HPP 27 class CDSOffsets: public CHeapObj<mtInternal> { 28 private: 29 char* _name; 30 int _offset; 31 CDSOffsets* _next; 32 static CDSOffsets* _all; // sole list for cds 33 public: 34 CDSOffsets(const char* name, int offset, CDSOffsets* next) { 35 _name = NEW_C_HEAP_ARRAY(char, strlen(name) + 1, mtInternal); 36 strcpy(_name, name); 37 _offset = offset; 38 _next = next; 39 } 40 41 char* get_name() const { return _name; } 42 int get_offset() const { return _offset; } 43 CDSOffsets* next() const { return _next; } 44 void add_end(CDSOffsets* n); 45 46 static int find_offset(const char* name); 47 }; 48 #endif // SHARE_PRIMS_CDSOFFSETS_HPP | 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_PRIMS_CDSOFFSETS_HPP 26 #define SHARE_PRIMS_CDSOFFSETS_HPP 27 28 class CDSOffsets: public CHeapObj<mtInternal> { 29 private: 30 char* _name; 31 int _offset; 32 CDSOffsets* _next; 33 static CDSOffsets* _all; // sole list for cds 34 public: 35 CDSOffsets(const char* name, int offset, CDSOffsets* next); 36 37 char* get_name() const { return _name; } 38 int get_offset() const { return _offset; } 39 CDSOffsets* next() const { return _next; } 40 void add_end(CDSOffsets* n); 41 42 static int find_offset(const char* name); 43 }; 44 45 #endif // SHARE_PRIMS_CDSOFFSETS_HPP |