winIDEA SDK
CUtil.h File Reference

Description

This contains utility functions and typedefs for C++ containers used in isystem.connect.

Containers are mapped to other language in a way to make their usage as close to destination language as possible. For example, StrStrMap wrapper class in Python supports overloaded operators, iterators, and easy conversion between C++ and Python objects. For example:

m = {'a': 'r', 'b': 'q'}
sm = isystem.connect.StrStrMap(m)   # Python mapping to StrStrMap.
m2 = dict(sm)                       # m2 is Python mapping
sm['x'] = 'y'                       # overloaded []
#include "BB_CRT/AddressDefs.h"
#include <string>
#include <vector>
#include <map>
#include <set>

Typedefs

typedef std::map< std::string, std::string > iconnect::StrStrMap
 Map of [string, string] pairs.
 
typedef StrStrMap::iterator iconnect::StrStrMapIter
 StrStrMap iterator.
 
typedef StrStrMap::const_iterator iconnect::StrStrMapConstIter
 StrStrMap const iterator.
 
typedef std::vector< std::string > iconnect::StrVector
 Vector of strings.
 
typedef StrVector::iterator iconnect::StrVectorIter
 StrVector iterator.
 
typedef StrVector::const_iterator iconnect::StrVectorConstIter
 StrVector const iterator.
 
typedef std::set< std::string > iconnect::StrSet
 Set of strings.
 
typedef std::vector< int > iconnect::IntVector
 Vector of integers.
 
typedef IntVector::iterator iconnect::IntVectorIter
 IntVector iterator.
 
typedef IntVector::const_iterator iconnect::IntVectorConstIter
 IntVector const iterator.
 
typedef std::vector< unsigned char > iconnect::ByteVector
 Vector of unsigned bytes.
 
typedef ByteVector::iterator iconnect::ByteVectorIter
 ByteVector iterator.
 
typedef ByteVector::const_iterator iconnect::ByteVectorConstIter
 ByteVector const iterator.
 
typedef std::vector< uint32_t > iconnect::DWordVector
 Vector of unsigned 32-bit integers.
 
typedef DWordVector::iterator iconnect::DWordVectorIter
 DWordVector iterator.
 
typedef DWordVector::const_iterator iconnect::DWordVectorConstIter
 DWordVector const iterator.
 
typedef std::vector< uint64_t > iconnect::DQordVector
 Vector of unsigned 32-bit integers.
 
typedef std::vector< ADDRESS_64 > iconnect::AddressVector
 Vector of addresses.
 

Enumerations

enum  iconnect::ETristate
 This enum is used for boolean values, which may be defined as false or true, or are not defined in which case the default value is used.
 

Functions

void iconnect::putStrStrMap (StrStrMap &container, const std::string &key, const std::string &value)
 
std::string iconnect::getModuleVersion ()
 This function returns version of current isystem.connect module in format: {<major>. More...
 
void iconnect::requires_SDK (const uint8_t nMajor, const uint8_t nMinor, const uint16_t nBuild, uint16_t nSubBuild=0xFFFF, uint32_t nSccBuild=0xFFFFFFFF)
 Checks if current version is older than specified in parameters and throws exception if that is the case. More...
 
int iconnect::readChar ()
 Reads a single character from stdin, if available. More...
 
std::string iconnect::getUID ()
 Returns string unique for this process. More...
 

Function Documentation

◆ getModuleVersion()

std::string iconnect::getModuleVersion ( )

This function returns version of current isystem.connect module in format: {<major>.

<minor>.<build>.<sub_build>}, for example '9.12.184.0'. Use this function if you want to print version only, otherwise usage of getSdkVersion() is preferred.

See also
getSDKVersion()

◆ getUID()

std::string iconnect::getUID ( )

Returns string unique for this process.

This function is not reentrant. The string may contain numbers and letters.

◆ putStrStrMap()

void iconnect::putStrStrMap ( StrStrMap container,
const std::string &  key,
const std::string &  value 
)
Deprecated:
SWIG generates wrappers for C++ std containers, so new items can be added with Python syntax, for example: ‘smap['x’] = 'y'`.

Utility method for adding (key, value) pairs to StrStrMap. Intended to be used from Python and Java code.

◆ readChar()

int iconnect::readChar ( )

Reads a single character from stdin, if available.

If the character is not available, 0 is returned.

◆ requires_SDK()

void iconnect::requires_SDK ( const uint8_t  nMajor,
const uint8_t  nMinor,
const uint16_t  nBuild,
uint16_t  nSubBuild = 0xFFFF,
uint32_t  nSccBuild = 0xFFFFFFFF 
)

Checks if current version is older than specified in parameters and throws exception if that is the case.

Parameters
nMajormajor version number
nMinorminor version number
nBuildbuild number
nSubBuildsub-build number, optional
nSccBuildsource control revision number, optional