git-svn-id: svn://db.shs.com.ru/pip@591 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
C++ code info structs
|
||||
Copyright (C) 2017 Ivan Pelipenko peri4ko@yandex.ru
|
||||
Copyright (C) 2018 Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -40,10 +40,12 @@ enum TypeFlag {
|
||||
};
|
||||
|
||||
typedef PIFlags<PICodeInfo::TypeFlag> TypeFlags;
|
||||
typedef PIMap<PIString, PIString> MetaMap;
|
||||
|
||||
struct TypeInfo {
|
||||
TypeInfo(const PIString & n = PIString(), const PIString & t = PIString(), PICodeInfo::TypeFlags f = 0, int b = -1) {name = n; type = t; flags = f; bits = b;}
|
||||
const bool isBitfield() const {return bits > 0;}
|
||||
MetaMap meta;
|
||||
PIString name;
|
||||
PIString type;
|
||||
PICodeInfo::TypeFlags flags;
|
||||
@@ -51,6 +53,7 @@ struct TypeInfo {
|
||||
};
|
||||
|
||||
struct FunctionInfo {
|
||||
MetaMap meta;
|
||||
PIString name;
|
||||
TypeInfo return_type;
|
||||
PIVector<PICodeInfo::TypeInfo> arguments;
|
||||
@@ -58,6 +61,7 @@ struct FunctionInfo {
|
||||
|
||||
struct ClassInfo {
|
||||
ClassInfo() {has_name = true;}
|
||||
MetaMap meta;
|
||||
bool has_name;
|
||||
PIString type;
|
||||
PIString name;
|
||||
@@ -69,6 +73,7 @@ struct ClassInfo {
|
||||
|
||||
struct EnumeratorInfo {
|
||||
EnumeratorInfo(const PIString & n = PIString(), int v = 0) {name = n; value = v;}
|
||||
MetaMap meta;
|
||||
PIString name;
|
||||
int value;
|
||||
};
|
||||
@@ -76,6 +81,7 @@ struct EnumeratorInfo {
|
||||
struct EnumInfo {
|
||||
PIString memberName(int value) const;
|
||||
int memberValue(const PIString & name) const;
|
||||
MetaMap meta;
|
||||
PIString name;
|
||||
PIVector<PICodeInfo::EnumeratorInfo> members;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user