Static Value-Flow Analysis
Public Member Functions | Private Attributes | Friends | List of all members
SVF::SVFModuleReader Class Reference

#include <SVFFileSystem.h>

Public Member Functions

template<typename SVFTypeCreator , typename SVFTypeFiller , typename SVFValueCreator , typename SVFValueFiller , typename StInfoCreator >
void createObjs (const cJSON *svfModuleJson, SVFTypeCreator typeCreator, SVFTypeFiller typeFiller, SVFValueCreator valueCreator, SVFValueFiller valueFiller, StInfoCreator stInfoCreator)
 
SVFValuegetSVFValuePtr (size_t id) const
 
SVFTypegetSVFTypePtr (size_t id) const
 
StInfogetStInfoPtr (size_t id) const
 
const cJSONgetFieldJson () const
 

Private Attributes

const cJSONsvfModuleFieldJson = nullptr
 
ReaderPtrPool< SVFTypesvfTypePool
 
ReaderPtrPool< StInfostInfoPool
 
ReaderPtrPool< SVFValuesvfValuePool
 

Friends

class SVFIRReader
 

Detailed Description

Definition at line 969 of file SVFFileSystem.h.

Member Function Documentation

◆ createObjs()

template<typename SVFTypeCreator , typename SVFTypeFiller , typename SVFValueCreator , typename SVFValueFiller , typename StInfoCreator >
void SVF::SVFModuleReader::createObjs ( const cJSON svfModuleJson,
SVFTypeCreator  typeCreator,
SVFTypeFiller  typeFiller,
SVFValueCreator  valueCreator,
SVFValueFiller  valueFiller,
StInfoCreator  stInfoCreator 
)
inline

Definition at line 983 of file SVFFileSystem.h.

986  {
987  assert(!svfModuleFieldJson && "SVFModule Already created?");
988  ABORT_IFNOT(jsonIsObject(svfModuleJson),
989  "svfModuleJson not an JSON object?");
990 
991  const cJSON* const allSVFType = svfModuleJson->child;
992  CHECK_JSON_KEY(allSVFType);
993  svfTypePool.createObjs(allSVFType, typeCreator);
994 
995  const cJSON* const allStInfo = allSVFType->next;
996  CHECK_JSON_KEY(allStInfo);
997  stInfoPool.createObjs(allStInfo, stInfoCreator); // Only need SVFType*
998 
999  svfTypePool.fillObjs(typeFiller); // Only need SVFType* & StInfo*
1000 
1001  const cJSON* const allSVFValue = allStInfo->next;
1002  CHECK_JSON_KEY(allSVFValue);
1003  svfValuePool.createObjs(allSVFValue, valueCreator);
1004  svfValuePool.fillObjs(valueFiller); // Need SVFType* & SVFValue*
1005 
1006  svfModuleFieldJson = allSVFValue->next;
1007  }
#define ABORT_IFNOT(condition, reason)
Definition: SVFFileSystem.h:39
#define CHECK_JSON_KEY(obj)
Definition: SVFFileSystem.h:96
ReaderPtrPool< SVFValue > svfValuePool
const cJSON * svfModuleFieldJson
ReaderPtrPool< StInfo > stInfoPool
ReaderPtrPool< SVFType > svfTypePool
bool jsonIsObject(const cJSON *item)
Definition: cJSON.h:104
struct cJSON * child
Definition: cJSON.h:109
struct cJSON * next
Definition: cJSON.h:106

◆ getFieldJson()

const cJSON* SVF::SVFModuleReader::getFieldJson ( ) const
inline

Definition at line 1022 of file SVFFileSystem.h.

1023  {
1024  return svfModuleFieldJson;
1025  }

◆ getStInfoPtr()

StInfo* SVF::SVFModuleReader::getStInfoPtr ( size_t  id) const
inline

Definition at line 1017 of file SVFFileSystem.h.

1018  {
1019  return stInfoPool.getPtr(id);
1020  }

◆ getSVFTypePtr()

SVFType* SVF::SVFModuleReader::getSVFTypePtr ( size_t  id) const
inline

Definition at line 1013 of file SVFFileSystem.h.

1014  {
1015  return svfTypePool.getPtr(id);
1016  }

◆ getSVFValuePtr()

SVFValue* SVF::SVFModuleReader::getSVFValuePtr ( size_t  id) const
inline

Definition at line 1009 of file SVFFileSystem.h.

1010  {
1011  return svfValuePool.getPtr(id);
1012  }

Friends And Related Function Documentation

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 971 of file SVFFileSystem.h.

Member Data Documentation

◆ stInfoPool

ReaderPtrPool<StInfo> SVF::SVFModuleReader::stInfoPool
private

Definition at line 976 of file SVFFileSystem.h.

◆ svfModuleFieldJson

const cJSON* SVF::SVFModuleReader::svfModuleFieldJson = nullptr
private

Definition at line 974 of file SVFFileSystem.h.

◆ svfTypePool

ReaderPtrPool<SVFType> SVF::SVFModuleReader::svfTypePool
private

Definition at line 975 of file SVFFileSystem.h.

◆ svfValuePool

ReaderPtrPool<SVFValue> SVF::SVFModuleReader::svfValuePool
private

Definition at line 977 of file SVFFileSystem.h.


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