SymbolDatabase: Improve doxygen comments

This commit is contained in:
Daniel Marjamäki 2018-04-24 13:03:32 +02:00
parent 86d54c63c6
commit b94d8fd686
1 changed files with 30 additions and 30 deletions

View File

@ -53,16 +53,16 @@ enum AccessControl { Public, Protected, Private, Global, Namespace, Argument, Lo
struct Dimension { struct Dimension {
Dimension() : start(nullptr), end(nullptr), num(0), known(true) { } Dimension() : start(nullptr), end(nullptr), num(0), known(true) { }
const Token *start; // size start token const Token *start; ///< size start token
const Token *end; // size end token const Token *end; ///< size end token
MathLib::bigint num; // (assumed) dimension length when size is a number, 0 if not known MathLib::bigint num; ///< (assumed) dimension length when size is a number, 0 if not known
bool known; // Known size bool known; ///< Known size
}; };
/** @brief Information about a class type. */ /** @brief Information about a class type. */
class CPPCHECKLIB Type { class CPPCHECKLIB Type {
public: public:
const Token* classDef; // Points to "class" token const Token* classDef; ///< Points to "class" token
const Scope* classScope; const Scope* classScope;
const Scope* enclosingScope; const Scope* enclosingScope;
enum NeedInitialization { enum NeedInitialization {
@ -867,20 +867,20 @@ public:
setFlag(fIsVariadic, state); setFlag(fIsVariadic, state);
} }
const Token *tokenDef; // function name token in class definition const Token *tokenDef; ///< function name token in class definition
const Token *argDef; // function argument start '(' in class definition const Token *argDef; ///< function argument start '(' in class definition
const Token *token; // function name token in implementation const Token *token; ///< function name token in implementation
const Token *arg; // function argument start '(' const Token *arg; ///< function argument start '('
const Token *retDef; // function return type token const Token *retDef; ///< function return type token
const ::Type *retType; // function return type const ::Type *retType; ///< function return type
const Scope *functionScope; // scope of function body const Scope *functionScope; ///< scope of function body
const Scope* nestedIn; // Scope the function is declared in const Scope* nestedIn; ///< Scope the function is declared in
std::list<Variable> argumentList; // argument list std::list<Variable> argumentList; ///< argument list
unsigned int initArgCount; // number of args with default values unsigned int initArgCount; ///< number of args with default values
Type type; // constructor, destructor, ... Type type; ///< constructor, destructor, ...
AccessControl access; // public/protected/private AccessControl access; ///< public/protected/private
const Token *noexceptArg; const Token *noexceptArg; ///< noexcept token
const Token *throwArg; const Token *throwArg; ///< throw token
static bool argsMatch(const Scope *scope, const Token *first, const Token *second, const std::string &path, unsigned int depth); static bool argsMatch(const Scope *scope, const Token *first, const Token *second, const std::string &path, unsigned int depth);
@ -913,9 +913,9 @@ public:
const SymbolDatabase *check; const SymbolDatabase *check;
std::string className; std::string className;
const Token *classDef; // class/struct/union/namespace token const Token *classDef; ///< class/struct/union/namespace token
const Token *classStart; // '{' token const Token *classStart; ///< '{' token
const Token *classEnd; // '}' token const Token *classEnd; ///< '}' token
std::list<Function> functionList; std::list<Function> functionList;
std::multimap<std::string, const Function *> functionMap; std::multimap<std::string, const Function *> functionMap;
std::list<Variable> varlist; std::list<Variable> varlist;
@ -929,8 +929,8 @@ public:
std::map<std::string, Type*> definedTypesMap; std::map<std::string, Type*> definedTypesMap;
// function specific fields // function specific fields
const Scope *functionOf; // scope this function belongs to const Scope *functionOf; ///< scope this function belongs to
Function *function; // function info for this function Function *function; ///< function info for this function
// enum specific fields // enum specific fields
const Token * enumType; const Token * enumType;
@ -1063,12 +1063,12 @@ private:
public: public:
enum Sign { UNKNOWN_SIGN, SIGNED, UNSIGNED } sign; enum Sign { UNKNOWN_SIGN, SIGNED, UNSIGNED } sign;
enum Type { UNKNOWN_TYPE, NONSTD, RECORD, CONTAINER, ITERATOR, VOID, BOOL, CHAR, SHORT, INT, LONG, LONGLONG, UNKNOWN_INT, FLOAT, DOUBLE, LONGDOUBLE } type; enum Type { UNKNOWN_TYPE, NONSTD, RECORD, CONTAINER, ITERATOR, VOID, BOOL, CHAR, SHORT, INT, LONG, LONGLONG, UNKNOWN_INT, FLOAT, DOUBLE, LONGDOUBLE } type;
unsigned int pointer; // 0=>not pointer, 1=>*, 2=>**, 3=>***, etc unsigned int pointer; ///< 0=>not pointer, 1=>*, 2=>**, 3=>***, etc
unsigned int constness; // bit 0=data, bit 1=*, bit 2=** unsigned int constness; ///< bit 0=data, bit 1=*, bit 2=**
const Scope *typeScope; const Scope *typeScope; ///< if the type definition is seen this point out the type scope
const Library::Container *container; const Library::Container *container; ///< If the type is a container defined in a cfg file, this is the used container
const Token *containerTypeToken; const Token *containerTypeToken; ///< The container type token. the template argument token that defines the container element type.
std::string originalTypeName; std::string originalTypeName; ///< original type name as written in the source code. eg. this might be "uint8_t" when type is CHAR.
ValueType() : sign(UNKNOWN_SIGN), type(UNKNOWN_TYPE), pointer(0U), constness(0U), typeScope(nullptr), container(nullptr), containerTypeToken(nullptr) {} ValueType() : sign(UNKNOWN_SIGN), type(UNKNOWN_TYPE), pointer(0U), constness(0U), typeScope(nullptr), container(nullptr), containerTypeToken(nullptr) {}
ValueType(const ValueType &vt) : sign(vt.sign), type(vt.type), pointer(vt.pointer), constness(vt.constness), typeScope(vt.typeScope), container(vt.container), containerTypeToken(vt.containerTypeToken), originalTypeName(vt.originalTypeName) {} ValueType(const ValueType &vt) : sign(vt.sign), type(vt.type), pointer(vt.pointer), constness(vt.constness), typeScope(vt.typeScope), container(vt.container), containerTypeToken(vt.containerTypeToken), originalTypeName(vt.originalTypeName) {}