Cppcheck
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 Tokenizer *tokenizer, 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)
 

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 113 of file checkbufferoverrun.h.

Constructor & Destructor Documentation

CheckBufferOverrun::ArrayInfo::ArrayInfo ( )

Definition at line 1630 of file checkbufferoverrun.cpp.

CheckBufferOverrun::ArrayInfo::ArrayInfo ( const Variable var,
const Tokenizer tokenizer,
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 1654 of file checkbufferoverrun.cpp.

References _num.

Member Function Documentation

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

Definition at line 164 of file checkbufferoverrun.h.

MathLib::bigint CheckBufferOverrun::ArrayInfo::element_size ( ) const
inline
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 1660 of file checkbufferoverrun.cpp.

Referenced by CheckBufferOverrun::checkFunctionCall().

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

array size

Definition at line 148 of file checkbufferoverrun.h.

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

Definition at line 151 of file checkbufferoverrun.h.

const std::string& CheckBufferOverrun::ArrayInfo::varname ( ) const
inline
void CheckBufferOverrun::ArrayInfo::varname ( const std::string &  name)
inline

Definition at line 172 of file checkbufferoverrun.h.

Member Data Documentation

unsigned int CheckBufferOverrun::ArrayInfo::_declarationId
private

declaration id

Definition at line 125 of file checkbufferoverrun.h.

MathLib::bigint CheckBufferOverrun::ArrayInfo::_element_size
private

size of each element in array

Definition at line 122 of file checkbufferoverrun.h.

Referenced by ArrayInfo().

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

number of elements of array

Definition at line 116 of file checkbufferoverrun.h.

Referenced by ArrayInfo().

std::string CheckBufferOverrun::ArrayInfo::_varname
private

full name of variable as pattern

Definition at line 119 of file checkbufferoverrun.h.


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