All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
CheckBufferOverrun::ArrayInfo Class Reference

Information about N-dimensional array. More...

#include <checkbufferoverrun.h>

Public Member Functions

 ArrayInfo ()
 ArrayInfo (const Variable *var, const SymbolDatabase *symbolDatabase, const unsigned int forcedeclid=0)
 ArrayInfo (unsigned int id, const std::string &name, MathLib::bigint size1, MathLib::bigint n)
 Create array info with specified data The intention is that this is only a temporary solution. More...
ArrayInfo limit (MathLib::bigint value) const
 Create a copy ArrayInfo where the number of elements have been limited by a value. More...
const std::vector
< MathLib::bigint > & 
num () const
 array sizes More...
MathLib::bigint num (std::size_t index) const
 array size More...
void num (std::size_t index, MathLib::bigint number)
MathLib::bigint element_size () const
 size of each element More...
unsigned int declarationId () const
 Variable name. More...
void declarationId (unsigned int id)
const std::string & varname () const
 Variable name. More...
void varname (const std::string &name)
MathLib::bigint numberOfElements () const
MathLib::bigint totalIndex (const std::vector< ValueFlow::Value > &indexes) const

Private Attributes

std::vector< MathLib::bigint_num
 number of elements of array More...
std::string _varname
 full name of variable as pattern More...
MathLib::bigint _element_size
 size of each element in array More...
unsigned int _declarationId
 declaration id More...

Detailed Description

Information about N-dimensional array.

Definition at line 114 of file checkbufferoverrun.h.

Constructor & Destructor Documentation

CheckBufferOverrun::ArrayInfo::ArrayInfo ( )

Definition at line 1784 of file checkbufferoverrun.cpp.

CheckBufferOverrun::ArrayInfo::ArrayInfo ( const Variable var,
const SymbolDatabase symbolDatabase,
const unsigned int  forcedeclid = 0 
CheckBufferOverrun::ArrayInfo::ArrayInfo ( unsigned int  id,
const std::string &  name,
MathLib::bigint  size1,
MathLib::bigint  n 

Create array info with specified data The intention is that this is only a temporary solution.

. all checking should be based on ArrayInfo from the start and then this will not be needed as the declare can be used instead.

Definition at line 1809 of file checkbufferoverrun.cpp.

References _num.

Member Function Documentation

unsigned int CheckBufferOverrun::ArrayInfo::declarationId ( ) const
void CheckBufferOverrun::ArrayInfo::declarationId ( unsigned int  id)

Definition at line 165 of file checkbufferoverrun.h.

MathLib::bigint CheckBufferOverrun::ArrayInfo::element_size ( ) const
CheckBufferOverrun::ArrayInfo CheckBufferOverrun::ArrayInfo::limit ( MathLib::bigint  value) const

Create a copy ArrayInfo where the number of elements have been limited by a value.

Definition at line 1815 of file checkbufferoverrun.cpp.

Referenced by CheckBufferOverrun::checkFunctionCall().

const std::vector<MathLib::bigint>& CheckBufferOverrun::ArrayInfo::num ( ) const
MathLib::bigint CheckBufferOverrun::ArrayInfo::num ( std::size_t  index) const

array size

Definition at line 149 of file checkbufferoverrun.h.

void CheckBufferOverrun::ArrayInfo::num ( std::size_t  index,
MathLib::bigint  number 

Definition at line 152 of file checkbufferoverrun.h.

MathLib::bigint CheckBufferOverrun::ArrayInfo::numberOfElements ( ) const
MathLib::bigint CheckBufferOverrun::ArrayInfo::totalIndex ( const std::vector< ValueFlow::Value > &  indexes) const
const std::string& CheckBufferOverrun::ArrayInfo::varname ( ) const
void CheckBufferOverrun::ArrayInfo::varname ( const std::string &  name)

Definition at line 173 of file checkbufferoverrun.h.

Member Data Documentation

unsigned int CheckBufferOverrun::ArrayInfo::_declarationId

declaration id

Definition at line 126 of file checkbufferoverrun.h.

MathLib::bigint CheckBufferOverrun::ArrayInfo::_element_size

size of each element in array

Definition at line 123 of file checkbufferoverrun.h.

Referenced by ArrayInfo().

std::vector<MathLib::bigint> CheckBufferOverrun::ArrayInfo::_num

number of elements of array

Definition at line 117 of file checkbufferoverrun.h.

Referenced by ArrayInfo().

std::string CheckBufferOverrun::ArrayInfo::_varname

full name of variable as pattern

Definition at line 120 of file checkbufferoverrun.h.

The documentation for this class was generated from the following files: