Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

code_attribute.hpp

00001 /*
00002  * Copyright (c) 2003, Raymond Bosman
00003  * Copyright (c) 2003, Frederik Holljen
00004  * All Rights Reserved.
00005  *
00006  * See COPYING for licensing.
00007  */
00008 
00009 
00010 #ifndef CODEATTRIBUTE_HPP
00011 #define CODEATTRIBUTE_HPP
00012 
00013 #include <fstream>
00014 #include "attribute_info.hpp"
00015 #include "bytecode.hpp"
00016 
00017 namespace ClassEncoder
00018 {
00019 
00020 class ConstantPool;
00021 
00023 
00027 class code_attribute : public attribute_info
00028 {
00029 public:
00030     code_attribute( ConstantPool *pool );
00031     virtual ~code_attribute();
00032 
00033     virtual void write( std::ofstream &stream );
00034     virtual unsigned int size();
00036 
00040     ByteCode *code() { return Code; }
00041 
00043 
00053     unsigned int addLocal() { return max_locals++; }
00054 
00055 private:
00057 
00060     code_attribute() {}
00061 
00062 private:
00063     ConstantPool *ConstantPoolEntries;
00064     ByteCode *Code;
00065     u2 max_locals;
00066 };
00067 
00068 } // end of namespace
00069 #endif // CODEATTRIBUTE_HPP

Generated on Mon Dec 1 14:26:27 2003 for Ck by doxygen 1.3.3