Loading...
Searching...
No Matches
FileContext

Detailed Description

Classes

class  FileContext
 

Class Documentation

◆ FileContext

class FileContext

Public Member Functions

 FileContext (FileMetadataRef file, BinaryViewRef rawData, const QString &filename=QString(), bool isValidSaveName=false, bool createViews=true)
 
virtual ~FileContext ()
 
void registerReference (QObject *widget)
 
void unregisterReference (QObject *widget)
 
void close ()
 
BinaryViewRef getRawData () const
 
FileMetadataRef getMetadata () const
 
QString getFilename () const
 
void setFilename (QString newName)
 
ViewFramegetCurrentViewFrame () const
 
QString getTabName (QWidget *widget)
 
QString getShortFileName (QWidget *widget)
 
bool isValidSaveFilename () const
 
void markAsSaved (const QString &filename)
 
bool isModified ()
 
BinaryViewRef createDataView (const QString &type)
 
BinaryViewRef getDataView (const QString &type, bool createView=false)
 
std::vector< BinaryViewRefgetAllDataViews ()
 
void refreshDataViewCache ()
 
void setCurrentViewFrame (ViewFrame *view)
 
virtual std::string GetCurrentView () override
 
virtual uint64_t GetCurrentOffset () override
 
virtual bool Navigate (const std::string &view, uint64_t offset) override
 
QString getBestType ()
 
std::vector< QString > getAvailableTypes ()
 
bool isTypeAvailable (const QString &type)
 
bool resolveType (const QString &type, ViewType *&viewType, BinaryViewTypeRef &data)
 
bool resolveTypeAndData (const QString &type, ViewType *&viewType, BinaryViewRef &data)
 
void updateAnalysis ()
 
SyncGroupnewSyncGroup ()
 
SyncGroupsyncGroupById (int id)
 
void deleteSyncGroup (SyncGroup *syncGroup)
 
SyncGroupsyncGroupForFrame (ViewFrame *frame)
 
void removeFrame (ViewFrame *frame)
 
const std::vector< SyncGroup * > & allSyncGroups () const
 
void forceLocationSyncForFrame (ViewFrame *frame)
 
bool syncLocation (ViewFrame *frame, View *view, const ViewLocation &location)
 
void suspendSync ()
 
void resumeSync ()
 
- Public Member Functions inherited from FileContextBase
 FileContextBase ()
 

Static Public Member Functions

static void closeAllOpenFiles ()
 
static FileContextnewFile ()
 
static FileContextnewMappedFile (PlatformRef platform)
 
static FileContextopenFilename (const QString &path)
 
static const std::set< FileContext * > & getOpenFileContexts ()
 

Constructor & Destructor Documentation

◆ FileContext()

FileContext::FileContext ( FileMetadataRef file,
BinaryViewRef rawData,
const QString & filename = QString(),
bool isValidSaveName = false,
bool createViews = true )

◆ ~FileContext()

virtual FileContext::~FileContext ( )
virtual

Member Function Documentation

◆ registerReference()

void FileContext::registerReference ( QObject * widget)

◆ unregisterReference()

void FileContext::unregisterReference ( QObject * widget)

◆ close()

void FileContext::close ( )

◆ closeAllOpenFiles()

static void FileContext::closeAllOpenFiles ( )
static

◆ getRawData()

BinaryViewRef FileContext::getRawData ( ) const
inline

◆ getMetadata()

FileMetadataRef FileContext::getMetadata ( ) const
inline

◆ getFilename()

QString FileContext::getFilename ( ) const
inline

◆ setFilename()

void FileContext::setFilename ( QString newName)
inline

◆ getCurrentViewFrame()

ViewFrame * FileContext::getCurrentViewFrame ( ) const
inline

◆ getTabName()

QString FileContext::getTabName ( QWidget * widget)

◆ getShortFileName()

QString FileContext::getShortFileName ( QWidget * widget)

◆ isValidSaveFilename()

bool FileContext::isValidSaveFilename ( ) const
inline

◆ markAsSaved()

void FileContext::markAsSaved ( const QString & filename)

◆ isModified()

bool FileContext::isModified ( )

◆ createDataView()

BinaryViewRef FileContext::createDataView ( const QString & type)

◆ getDataView()

BinaryViewRef FileContext::getDataView ( const QString & type,
bool createView = false )

◆ getAllDataViews()

std::vector< BinaryViewRef > FileContext::getAllDataViews ( )

◆ refreshDataViewCache()

void FileContext::refreshDataViewCache ( )

◆ setCurrentViewFrame()

void FileContext::setCurrentViewFrame ( ViewFrame * view)

◆ GetCurrentView()

virtual std::string FileContext::GetCurrentView ( )
overridevirtual

◆ GetCurrentOffset()

virtual uint64_t FileContext::GetCurrentOffset ( )
overridevirtual

◆ Navigate()

virtual bool FileContext::Navigate ( const std::string & view,
uint64_t offset )
overridevirtual

◆ getBestType()

QString FileContext::getBestType ( )

◆ getAvailableTypes()

std::vector< QString > FileContext::getAvailableTypes ( )

◆ isTypeAvailable()

bool FileContext::isTypeAvailable ( const QString & type)

◆ resolveType()

bool FileContext::resolveType ( const QString & type,
ViewType *& viewType,
BinaryViewTypeRef & data )

◆ resolveTypeAndData()

bool FileContext::resolveTypeAndData ( const QString & type,
ViewType *& viewType,
BinaryViewRef & data )

◆ updateAnalysis()

void FileContext::updateAnalysis ( )

◆ newSyncGroup()

SyncGroup * FileContext::newSyncGroup ( )

◆ syncGroupById()

SyncGroup * FileContext::syncGroupById ( int id)

◆ deleteSyncGroup()

void FileContext::deleteSyncGroup ( SyncGroup * syncGroup)

◆ syncGroupForFrame()

SyncGroup * FileContext::syncGroupForFrame ( ViewFrame * frame)

◆ removeFrame()

void FileContext::removeFrame ( ViewFrame * frame)

◆ allSyncGroups()

const std::vector< SyncGroup * > & FileContext::allSyncGroups ( ) const
inline

◆ forceLocationSyncForFrame()

void FileContext::forceLocationSyncForFrame ( ViewFrame * frame)

◆ syncLocation()

bool FileContext::syncLocation ( ViewFrame * frame,
View * view,
const ViewLocation & location )

◆ suspendSync()

void FileContext::suspendSync ( )
inline

◆ resumeSync()

void FileContext::resumeSync ( )
inline

◆ newFile()

static FileContext * FileContext::newFile ( )
static

◆ newMappedFile()

static FileContext * FileContext::newMappedFile ( PlatformRef platform)
static

◆ openFilename()

static FileContext * FileContext::openFilename ( const QString & path)
static

◆ getOpenFileContexts()

static const std::set< FileContext * > & FileContext::getOpenFileContexts ( )
static