packtype.hpp
来自「开放源码的编译器open watcom 1.6.0版的源代码」· HPP 代码 · 共 1,349 行 · 第 1/3 页
HPP
1,349 行
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFMFunction& dc( const LFLeafStruct& t ) const {
return ( const LFMFunction& ) t;
}
ct_mfunction _mFunction;
};
class LFVtShape : public LFLeafStruct {
public :
LFVtShape( const lf_vtshape& vtShape,
const char* var,
const uint varLen )
: LFLeafStruct( vtShape.common.code, var, varLen ),
_vtShape( vtShape.f ) { }
virtual ~LFVtShape() {}
static LFLeafStruct* Construct( const char*, const uint );
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFVtShape& dc( const LFLeafStruct& t ) const {
return ( const LFVtShape& ) t;
}
ct_vtshape _vtShape;
};
class LFCobol0 : public LFLeafStruct {
public :
LFCobol0( const lf_cobol0& cobol0,
const char* var,
const uint varLen )
: LFLeafStruct( cobol0.common.code, var, varLen ),
_cobol0( cobol0.f ) { }
virtual ~LFCobol0() {}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFCobol0& dc( const LFLeafStruct& t ) const {
return ( const LFCobol0& ) t;
}
ct_cobol0 _cobol0;
};
class LFCobol1 : public LFLeafStruct {
public :
LFCobol1( const lf_cobol1& cobol1,
const char* var,
const uint varLen )
: LFLeafStruct( cobol1.common.code, var, varLen ),
_cobol1( cobol1.f ) { }
virtual ~LFCobol1() {}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
private :
const LFCobol1& dc( const LFLeafStruct& t ) const {
return ( const LFCobol1& ) t;
}
// Note: defn in cv4f.h does not conform to spec.
ct_cobol1 _cobol1;
};
class LFBArray : public LFLeafStruct {
public :
LFBArray( const lf_barray& bArray,
const char* var,
const uint varLen )
: LFLeafStruct( bArray.common.code, var, varLen ),
_bArray( bArray.f ) { }
virtual ~LFBArray() {}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFBArray& dc( const LFLeafStruct& t ) const {
return ( const LFBArray& ) t;
}
ct_barray _bArray;
};
class LFLabel : public LFLeafStruct {
public :
LFLabel( const lf_label& label,
const char* var,
const uint varLen )
: LFLeafStruct( label.common.code, var, varLen ),
_label( label.f ) { }
virtual ~LFLabel() {}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFLabel& dc( const LFLeafStruct& t ) const {
return ( const LFLabel& ) t;
}
ct_label _label;
};
class LFDimArray : public LFLeafStruct {
public :
LFDimArray( const lf_dimarray& dimArray,
const char* var,
const uint varLen )
: LFLeafStruct( dimArray.common.code, var, varLen ),
_dimArray( dimArray.f ) { }
virtual ~LFDimArray() {}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFDimArray& dc( const LFLeafStruct& t ) const {
return ( const LFDimArray& ) t;
}
ct_dimarray _dimArray;
};
class LFVftPath : public LFLeafStruct {
public :
LFVftPath( const lf_vftpath& vftPath,
const char* var,
const uint varLen,
type_index* bases )
: LFLeafStruct( vftPath.common.code, var, varLen ),
_vftPath( vftPath.f ),
_bases( bases ) { }
virtual ~LFVftPath() {
delete [] _bases;
}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFVftPath& dc( const LFLeafStruct& t ) const {
return ( const LFVftPath& ) t;
}
ct_vftpath _vftPath;
type_index* _bases;
};
class LFArgList : public LFLeafStruct {
public :
LFArgList( const lf_arglist& argList,
const char* var,
const uint varLen,
type_index* indices )
: LFLeafStruct( argList.common.code, var, varLen ),
_argList( argList.f ),
_indices( indices ) { }
virtual ~LFArgList() {
delete [] _indices;
}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFArgList& dc( const LFLeafStruct& t ) const {
return ( const LFArgList& ) t;
}
ct_arglist _argList;
type_index* _indices;
};
class LFDefArg : public LFLeafStruct {
public :
LFDefArg( const lf_defarg& defArg,
const char* var,
const uint varLen )
: LFLeafStruct( defArg.common.code, var, varLen ),
_defArg( defArg.f ) { }
virtual ~LFDefArg() {}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFDefArg& dc( const LFLeafStruct& t ) const {
return ( const LFDefArg& ) t;
}
ct_defarg _defArg;
};
typedef LFSubField* (*PSF)( const char* );
class LFFieldList : public LFLeafStruct {
public :
LFFieldList( const char*, const uint);
virtual ~LFFieldList() {
_subFieldList.clearAndDestroy();
}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFFieldList& dc( const LFLeafStruct& t ) const {
return ( const LFFieldList& ) t;
}
static uint ConvertIndex( const leaf_index );
WCPtrSList<LFSubField> _subFieldList;
static PSF _subFieldConstructorTable[];
};
class LFDerived : public LFLeafStruct {
public :
LFDerived( const lf_derived& derived,
const char* var,
const uint varLen,
type_index* indices )
: LFLeafStruct( derived.common.code, var, varLen ),
_derived( derived.f ),
_indices( indices ) { }
virtual ~LFDerived() {
delete [] _indices;
}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFDerived& dc( const LFLeafStruct& t ) const {
return ( const LFDerived& ) t;
}
ct_derived _derived;
type_index* _indices;
};
class LFBitField : public LFLeafStruct {
public :
LFBitField( const lf_bitfield& bitField,
const char* var,
const uint varLen )
: LFLeafStruct( bitField.common.code, var, varLen ),
_bitField( bitField.f ) { }
virtual ~LFBitField() {}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFBitField& dc( const LFLeafStruct& t ) const {
return ( const LFBitField& ) t;
}
ct_bitfield _bitField;
};
// for the sake of putting it in lists in C++ class library.
struct my_ct_mlist {
cv_fldattr attr;
u2 type;
u4 vtab;
my_ct_mlist() { }
~my_ct_mlist() { }
bool operator == ( const my_ct_mlist& ) const;
};
class LFMethodList : public LFLeafStruct {
public :
LFMethodList( const leaf_index leaf,
WCPtrSList<my_ct_mlist>* recList )
: LFLeafStruct( leaf ),
_mList( recList ) { }
virtual ~LFMethodList() {
_mList -> clearAndDestroy();
delete _mList;
}
static LFLeafStruct* Construct( const char*, const uint );
void FixTypeIndex();
protected :
virtual void DerivedPut( ExeMaker& ) const;
bool IsEqual( const LFLeafStruct& ) const;
private :
const LFMethodList& dc( const LFLeafStruct& t ) const {
return ( const LFMethodList& ) t;
}
WCPtrSList<my_ct_mlist>* _mList;
};
class LFDimConu : public LFLeafStruct {
public :
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?