📄 main.h
字号:
virtual TypeBase * FlattenThisType(const TypeBase & parent); virtual BOOL IsChoice() const; virtual BOOL IsParameterizedType() const; virtual BOOL IsPrimitiveType() const; virtual void GenerateCplusplus(ostream & hdr, ostream & cxx); virtual void GenerateForwardDecls(ostream & hdr); virtual void GenerateOperators(ostream & hdr, ostream & cxx, const TypeBase & actualType); virtual const char * GetAncestorClass() const = 0; virtual PString GetTypeName() const; virtual BOOL CanReferenceType() const; virtual BOOL ReferencesType(const TypeBase & type); virtual void SetImportPrefix(const PString &); virtual BOOL IsParameterisedImport() const; BOOL IsGenerated() const { return isGenerated; } void BeginGenerateCplusplus(ostream & hdr, ostream & cxx); void EndGenerateCplusplus(ostream & hdr, ostream & cxx); void GenerateCplusplusConstructor(ostream & hdr, ostream & cxx); void GenerateCplusplusConstraints(const PString & prefix, ostream & hdr, ostream & cxx); protected: TypeBase(unsigned tagNum); TypeBase(TypeBase * copy); void PrintStart(ostream &) const; void PrintFinish(ostream &) const; PString name; PString identifier; Tag tag; Tag defaultTag; ConstraintList constraints; BOOL isOptional; ValueBase * defaultValue; BOOL isGenerated; PStringList parameters; PString templatePrefix; PString classNameString;};class DefinedType : public TypeBase{ PCLASSINFO(DefinedType, TypeBase); public: DefinedType(PString * name, BOOL parameter); DefinedType(TypeBase * refType, TypeBase * bType); DefinedType(TypeBase * refType, const PString & name); DefinedType(TypeBase * refType, const TypeBase & parent); void PrintOn(ostream &) const; virtual BOOL IsChoice() const; virtual BOOL IsParameterizedType() const; virtual void GenerateOperators(ostream & hdr, ostream & cxx, const TypeBase & actualType); virtual const char * GetAncestorClass() const; virtual PString GetTypeName() const; virtual BOOL CanReferenceType() const; virtual BOOL ReferencesType(const TypeBase & type); protected: void ConstructFromType(TypeBase * refType, const PString & name); PString referenceName; TypeBase * baseType; BOOL unresolved;};class ParameterizedType : public DefinedType{ PCLASSINFO(ParameterizedType, DefinedType); public: ParameterizedType(PString * name, TypesList * args); void PrintOn(ostream &) const; virtual BOOL IsParameterizedType() const; virtual PString GetTypeName() const; virtual BOOL ReferencesType(const TypeBase & type); protected: TypesList arguments;};class SelectionType : public TypeBase{ PCLASSINFO(SelectionType, TypeBase); public: SelectionType(PString * name, TypeBase * base); ~SelectionType(); void PrintOn(ostream &) const; virtual void FlattenUsedTypes(); virtual TypeBase * FlattenThisType(const TypeBase & parent); virtual void GenerateCplusplus(ostream & hdr, ostream & cxx); virtual const char * GetAncestorClass() const; virtual BOOL CanReferenceType() const; virtual BOOL ReferencesType(const TypeBase & type); protected: PString selection; TypeBase * baseType;};class BooleanType : public TypeBase{ PCLASSINFO(BooleanType, TypeBase); public: BooleanType(); virtual void GenerateOperators(ostream & hdr, ostream & cxx, const TypeBase & actualType); virtual const char * GetAncestorClass() const;};class IntegerType : public TypeBase{ PCLASSINFO(IntegerType, TypeBase); public: IntegerType(); IntegerType(NamedNumberList *); virtual void GenerateOperators(ostream & hdr, ostream & cxx, const TypeBase & actualType); virtual const char * GetAncestorClass() const; protected: NamedNumberList allowedValues;};class EnumeratedType : public TypeBase{ PCLASSINFO(EnumeratedType, TypeBase); public: EnumeratedType(NamedNumberList * enums, BOOL extend, NamedNumberList * ext); void PrintOn(ostream &) const; virtual TypeBase * FlattenThisType(const TypeBase & parent); virtual void GenerateCplusplus(ostream & hdr, ostream & cxx); virtual void GenerateOperators(ostream & hdr, ostream & cxx, const TypeBase & actualType); virtual const char * GetAncestorClass() const; protected: NamedNumberList enumerations; PINDEX numEnums; BOOL extendable;};class RealType : public TypeBase{ PCLASSINFO(RealType, TypeBase); public: RealType(); virtual const char * GetAncestorClass() const;};class BitStringType : public TypeBase{ PCLASSINFO(BitStringType, TypeBase); public: BitStringType(); BitStringType(NamedNumberList *); virtual int GetIdentifierTokenContext() const; virtual int GetBraceTokenContext() const; virtual const char * GetAncestorClass() const; protected: NamedNumberList allowedBits;};class OctetStringType : public TypeBase{ PCLASSINFO(OctetStringType, TypeBase); public: OctetStringType(); virtual void GenerateOperators(ostream & hdr, ostream & cxx, const TypeBase & actualType); virtual const char * GetAncestorClass() const;};class NullType : public TypeBase{ PCLASSINFO(NullType, TypeBase); public: NullType(); virtual const char * GetAncestorClass() const;};class SequenceType : public TypeBase{ PCLASSINFO(SequenceType, TypeBase); void PrintOn(ostream &) const; public: SequenceType(TypesList * std, BOOL extendable, TypesList * extensions, unsigned tagNum = Tag::UniversalSequence); virtual void FlattenUsedTypes(); virtual TypeBase * FlattenThisType(const TypeBase & parent); virtual BOOL IsPrimitiveType() const; virtual void GenerateCplusplus(ostream & hdr, ostream & cxx); virtual const char * GetAncestorClass() const; virtual BOOL CanReferenceType() const; virtual BOOL ReferencesType(const TypeBase & type); protected: TypesList fields; PINDEX numFields; BOOL extendable;};class SequenceOfType : public TypeBase{ PCLASSINFO(SequenceOfType, TypeBase); public: SequenceOfType(TypeBase * base, Constraint * constraint, unsigned tag = Tag::UniversalSequence); ~SequenceOfType(); void PrintOn(ostream &) const; virtual void FlattenUsedTypes(); virtual TypeBase * FlattenThisType(const TypeBase & parent); virtual BOOL IsPrimitiveType() const; virtual void GenerateCplusplus(ostream & hdr, ostream & cxx); virtual void GenerateForwardDecls(ostream & hdr); virtual const char * GetAncestorClass() const; virtual BOOL CanReferenceType() const; virtual BOOL ReferencesType(const TypeBase & type); protected: TypeBase * baseType;};class SetType : public SequenceType{ PCLASSINFO(SetType, SequenceType); public: SetType(); SetType(SequenceType * seq); virtual const char * GetAncestorClass() const;};class SetOfType : public SequenceOfType{ PCLASSINFO(SetOfType, SequenceOfType); public: SetOfType(TypeBase * base, Constraint * constraint);};class ChoiceType : public SequenceType{ PCLASSINFO(ChoiceType, SequenceType); public: ChoiceType(TypesList * std = NULL, BOOL extendable = FALSE, TypesList * extensions = NULL); virtual void GenerateCplusplus(ostream & hdr, ostream & cxx); virtual void GenerateForwardDecls(ostream & hdr); virtual BOOL IsPrimitiveType() const; virtual BOOL IsChoice() const; virtual const char * GetAncestorClass() const; virtual BOOL ReferencesType(const TypeBase & type);};class EmbeddedPDVType : public TypeBase{ PCLASSINFO(EmbeddedPDVType, TypeBase); public: EmbeddedPDVType(); virtual const char * GetAncestorClass() const;};class ExternalType : public TypeBase{ PCLASSINFO(ExternalType, TypeBase); public: ExternalType(); virtual const char * GetAncestorClass() const;};class AnyType : public TypeBase{ PCLASSINFO(AnyType, TypeBase); public: AnyType(PString * ident); void PrintOn(ostream & strm) const; virtual const char * GetAncestorClass() const; protected: PString identifier;};class StringTypeBase : public TypeBase{ PCLASSINFO(StringTypeBase, TypeBase); public: StringTypeBase(int tag); virtual int GetBraceTokenContext() const; virtual void GenerateOperators(ostream & hdr, ostream & cxx, const TypeBase & actualType);};class BMPStringType : public StringTypeBase{ PCLASSINFO(BMPStringType, StringTypeBase); public: BMPStringType(); virtual const char * GetAncestorClass() const;};class GeneralStringType : public StringTypeBase{ PCLASSINFO(GeneralStringType, StringTypeBase); public: GeneralStringType(); virtual const char * GetAncestorClass() const;};class GraphicStringType : public StringTypeBase{ PCLASSINFO(GraphicStringType, StringTypeBase); public: GraphicStringType(); virtual const char * GetAncestorClass() const;};class IA5StringType : public StringTypeBase{ PCLASSINFO(IA5StringType, StringTypeBase); public: IA5StringType(); virtual const char * GetAncestorClass() const;};class ISO646StringType : public StringTypeBase{ PCLASSINFO(ISO646StringType, StringTypeBase); public: ISO646StringType(); virtual const char * GetAncestorClass() const;};class NumericStringType : public StringTypeBase{ PCLASSINFO(NumericStringType, StringTypeBase); public: NumericStringType(); virtual const char * GetAncestorClass() const;};class PrintableStringType : public StringTypeBase{ PCLASSINFO(PrintableStringType, StringTypeBase); public: PrintableStringType(); virtual const char * GetAncestorClass() const;};class TeletexStringType : public StringTypeBase{ PCLASSINFO(TeletexStringType, StringTypeBase); public: TeletexStringType(); virtual const char * GetAncestorClass() const;};class T61StringType : public StringTypeBase{ PCLASSINFO(T61StringType, StringTypeBase); public: T61StringType(); virtual const char * GetAncestorClass() const;};class UniversalStringType : public StringTypeBase{ PCLASSINFO(UniversalStringType, StringTypeBase); public: UniversalStringType(); virtual const char * GetAncestorClass() const;};class VideotexStringType : public StringTypeBase{ PCLASSINFO(VideotexStringType, StringTypeBase); public: VideotexStringType(); virtual const char * GetAncestorClass() const;};class VisibleStringType : public StringTypeBase{ PCLASSINFO(VisibleStringType, StringTypeBase);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -