Crossfire Server, Trunk
ScriptFile Class Reference

#include <ScriptFile.h>

+ Inheritance diagram for ScriptFile:
+ Collaboration diagram for ScriptFile:

Public Member Functions

void addHook (HookInformation *hook)
 
virtual QString displayName () const override
 
bool forMap (const CREMapInformation *map) const
 
QList< HookInformation * > hooks () const
 
const QString & path () const
 
bool removeMap (CREMapInformation *map)
 
 ScriptFile (AssetWrapper *parent, const QString &path)
 
virtual ~ScriptFile ()
 
- Public Member Functions inherited from AssetWrapper
 AssetWrapper (AssetWrapper *parent, const QString &panelName="empty")
 
virtual bool canDrag () const
 
virtual bool canDrop (const QMimeData *, int) const
 
virtual AssetWrapperchild (int)
 
virtual int childIndex (AssetWrapper *)
 
virtual int childrenCount () const
 
virtual QIcon displayIcon () const
 
virtual QString displayPanelName () const
 
AssetWrapperdisplayParent () const
 
virtual void drag (QMimeData *) const
 
virtual void drop (const QMimeData *, int)
 
virtual void fillMenu (QMenu *)
 
void markModified (ChangeType change, int extra=0)
 
AssetWrapperself ()
 
void setDisplayParent (AssetWrapper *parent)
 
virtual PossibleUse uses (const AssetWrapper *, std::string &) const
 
virtual ~AssetWrapper () override
 

Private Attributes

QList< HookInformation * > myHooks
 
QString myPath
 

Additional Inherited Members

- Public Types inherited from AssetWrapper
enum  ChangeType {
  AssetUpdated, BeforeChildAdd, AfterChildAdd, BeforeChildRemove,
  AfterChildRemove, BeforeLayoutChange, AfterLayoutChange
}
 
enum  PossibleUse { Uses, ChildrenMayUse, DoesntUse }
 
- Public Slots inherited from AssetWrapper
virtual void removeChild (AssetWrapper *)
 
- Signals inherited from AssetWrapper
void dataModified (AssetWrapper *asset, AssetWrapper::ChangeType type, int extra)
 
void modified ()
 
- Static Public Member Functions inherited from AssetWrapper
static bool compareByDisplayName (const AssetWrapper *left, const AssetWrapper *right)
 
- Static Public Attributes inherited from AssetWrapper
static const char * tipProperty = "_cre_internal"
 
- Protected Member Functions inherited from AssetWrapper
virtual void wasModified (AssetWrapper *asset, ChangeType type, int extra)
 
- Protected Attributes inherited from AssetWrapper
QString myPanelName
 
AssetWrappermyParent
 
- Properties inherited from AssetWrapper
AssetWrapper self
 

Detailed Description

Information about a script file.

Definition at line 48 of file ScriptFile.h.

Constructor & Destructor Documentation

◆ ScriptFile()

ScriptFile::ScriptFile ( AssetWrapper parent,
const QString &  path 
)

Definition at line 16 of file ScriptFile.cpp.

References myPath, and path().

+ Here is the call graph for this function:

◆ ~ScriptFile()

ScriptFile::~ScriptFile ( )
virtual

Definition at line 20 of file ScriptFile.cpp.

References myHooks.

Member Function Documentation

◆ addHook()

void ScriptFile::addHook ( HookInformation hook)

Definition at line 25 of file ScriptFile.cpp.

References myHooks.

Referenced by ScriptFileManager::addHook().

+ Here is the caller graph for this function:

◆ displayName()

virtual QString ScriptFile::displayName ( ) const
inlineoverridevirtual

Implements AssetWrapper.

Definition at line 53 of file ScriptFile.h.

References myPath.

◆ forMap()

bool ScriptFile::forMap ( const CREMapInformation map) const

Definition at line 30 of file ScriptFile.cpp.

References disinfect::map, HookInformation::map(), and myHooks.

Referenced by ScriptFileManager::scriptsForMap(), and CREMapInformation::uses().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hooks()

QList< HookInformation * > ScriptFile::hooks ( ) const

Definition at line 42 of file ScriptFile.cpp.

References myHooks.

Referenced by CREMapInformationManager::storeCache(), and CREMapPanel::updateItem().

+ Here is the caller graph for this function:

◆ path()

const QString & ScriptFile::path ( ) const

Definition at line 47 of file ScriptFile.cpp.

References myPath.

Referenced by ScriptFile(), CREMapInformationManager::storeCache(), and CREMapPanel::updateItem().

+ Here is the caller graph for this function:

◆ removeMap()

bool ScriptFile::removeMap ( CREMapInformation map)

Remove hooks linked to a map.

Parameters
mapmap to remove scripts of.
Returns
true if this script has no more hooks, false else.

Definition at line 52 of file ScriptFile.cpp.

References disinfect::map, and myHooks.

Field Documentation

◆ myHooks

QList<HookInformation*> ScriptFile::myHooks
private

Definition at line 68 of file ScriptFile.h.

Referenced by addHook(), forMap(), hooks(), removeMap(), and ~ScriptFile().

◆ myPath

QString ScriptFile::myPath
private

Definition at line 67 of file ScriptFile.h.

Referenced by displayName(), path(), and ScriptFile().


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