Extending Qt Creator Manual | Snapshot

Extending Qt Creator Manual 4.5.2

# Snapshot Class

(QmlJS::Snapshot)

The Snapshot class holds and offers access to a set of Document::Ptr and LibraryInfo instances. More...

Header: | #include <Snapshot>

- List of all members, including inherited members

## Public Types

typedef | const_iterator
typedef | iterator

## Public Functions

| Snapshot()
| Snapshot(const Snapshot &o)
| ~Snapshot()
const_iterator | begin() const
Document::Ptr | document(const QString &fileName) const
Document::MutablePtr | documentFromSource(const QString &code, const QString &fileName, Dialect language) const
QList<Document::Ptr> | documentsInDirectory(const QString &path) const
const_iterator | end() const
const ImportDependencies * | importDependencies() const
ImportDependencies * | importDependencies()
void | insert(const Document::Ptr &document, bool allowInvalid = false)
void | insertLibraryInfo(const QString &path, const LibraryInfo &info)
LibraryInfo | libraryInfo(const QString &path) const
void | remove(const QString &fileName)

## Detailed Description

The Snapshot class holds and offers access to a set of Document::Ptr and LibraryInfo instances.

Usually Snapshots are copies of the snapshot maintained and updated by the ModelManagerInterface that updates its instance as parsing threads finish and new information becomes available.

See also Document and LibraryInfo.

## Member Type Documentation

### typedef Snapshot::const_iterator

### typedef Snapshot::iterator

## Member Function Documentation

### Snapshot::Snapshot()

Default constructs an instance of Snapshot.

### Snapshot::Snapshot(const Snapshot &o)

Copy constructor.

### Snapshot::~Snapshot()

Destroys the instance of Snapshot.

### const_iterator Snapshot::begin() const

### Document::Ptr Snapshot::document(const QString &fileName) const

### Document::MutablePtr Snapshot::documentFromSource(const QString &code, const QString &fileName, Dialect language) const

### QList<Document::Ptr> Snapshot::documentsInDirectory(const QString &path) const

### const_iterator Snapshot::end() const

### const ImportDependencies *Snapshot::importDependencies() const

### ImportDependencies *Snapshot::importDependencies()

### void Snapshot::insert(const Document::Ptr &document, bool allowInvalid = false)

### void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)

### LibraryInfo Snapshot::libraryInfo(const QString &path) const

### void Snapshot::remove(const QString &fileName)