language/duchain
KDevelop::ParsingEnvironmentFile Class Reference
This represents all information about a specific parsed file that is needed to match the file to a parsing-environment. More...
#include <parsingenvironment.h>

Public Types | |
| enum | { Identity = 11 } |
Public Member Functions | |
| ParsingEnvironmentFile (ParsingEnvironmentFileData &data) | |
| ParsingEnvironmentFile (ParsingEnvironmentFileData &data, const IndexedString &url) | |
| ParsingEnvironmentFile (const IndexedString &url) | |
| void | addModificationRevision (const IndexedString &url, const ModificationRevision &revision) |
| void | addModificationRevisions (const ModificationRevisionSet &) |
| const ModificationRevisionSet & | allModificationRevisions () const |
| void | clearModificationRevisions () |
| TopDUContext::Features | features () const |
| bool | featuresSatisfied (TopDUContext::Features minimumFeatures) |
| QList< KSharedPtr < ParsingEnvironmentFile > > | importers () |
| QList< KSharedPtr < ParsingEnvironmentFile > > | imports () |
| KDevelop::IndexedTopDUContext | indexedTopContext () const |
| bool | isProxyContext () const |
| IndexedString | language () const |
| virtual bool | matchEnvironment (const ParsingEnvironment *environment) const |
| KDevelop::ModificationRevision | modificationRevision () const |
| virtual bool | needsUpdate (const ParsingEnvironment *environment=0) const |
| void | setIsProxyContext (bool) |
| void | setLanguage (IndexedString language) |
| void | setModificationRevision (const KDevelop::ModificationRevision &rev) |
| void | setTopContext (KDevelop::IndexedTopDUContext context) |
| TopDUContext * | topContext () const |
| virtual int | type () const |
| KDevelop::IndexedString | url () const |
Detailed Description
This represents all information about a specific parsed file that is needed to match the file to a parsing-environment.
It is KShared because it is embedded into top-du-contexts and at the same time references may be held by ParsingEnvironmentManager.
- Warning:
- Access to this class must be serialized through du-chain locking
Definition at line 114 of file parsingenvironment.h.
Member Function Documentation
| void KDevelop::ParsingEnvironmentFile::clearModificationRevisions | ( | ) |
Clears the modification times of all dependencies.
Definition at line 229 of file parsingenvironment.cpp.
| TopDUContext::Features KDevelop::ParsingEnvironmentFile::features | ( | ) | const |
The features of the attached top-context.
They are automatically replicated here by the top-context, so they are accessible even without the top-context loaded.
Definition at line 37 of file parsingenvironment.cpp.
| bool KDevelop::ParsingEnvironmentFile::featuresSatisfied | ( | TopDUContext::Features | minimumFeatures | ) |
Returns true if this top-context satisfies at least the given minimum features.
If there is static minimum features set up in ParseJob, this also checks against those.
Definition at line 221 of file parsingenvironment.cpp.
| QList< KSharedPtr< ParsingEnvironmentFile > > KDevelop::ParsingEnvironmentFile::importers | ( | ) |
Returns the parsing-environment information of all importers of the coupled TopDUContext.
This is more efficient than loading the top-context and finding out, because when a top-context is loaded, also all its recursive imports are loaded
Definition at line 168 of file parsingenvironment.cpp.
| QList< KSharedPtr< ParsingEnvironmentFile > > KDevelop::ParsingEnvironmentFile::imports | ( | ) |
Returns the parsing-environment information of all imports of the coupled TopDUContext.
This is more efficient than loading the top-context and finding out
Definition at line 143 of file parsingenvironment.cpp.
| bool KDevelop::ParsingEnvironmentFile::isProxyContext | ( | ) | const |
A language-specific flag used by C++ to mark one context as a proxy of another.
If this flag is set on a context, the first imported context should be used for any computations like searches, listing, etc. instead of using this context.
The problems should be stored within the proxy-contexts, and optionally there may be any count of imported proxy-contexts imported behind the content-context(This can be used for tracking problems)
Note: This flag does not directly change the behavior of the language-independent du-chain.
Definition at line 133 of file parsingenvironment.cpp.
| IndexedString KDevelop::ParsingEnvironmentFile::language | ( | ) | const |
Returns the language for this top-context. If the string is empty, the language is unknown.
Definition at line 273 of file parsingenvironment.cpp.
| bool KDevelop::ParsingEnvironmentFile::matchEnvironment | ( | const ParsingEnvironment * | environment | ) | const [virtual] |
Should return whether this file matches into the given environment. The default-implementation always returns true.
Definition at line 66 of file parsingenvironment.cpp.
| bool KDevelop::ParsingEnvironmentFile::needsUpdate | ( | const ParsingEnvironment * | environment = 0 |
) | const [virtual] |
Can additionally use language-specific information to decide whether the top-context that has this data attached needs to be reparsed.
The standard-implementation checks the modification-time of this file stored using setModificationRevision, and all other modification-times stored with addModificationRevision(..).
Definition at line 61 of file parsingenvironment.cpp.
| void KDevelop::ParsingEnvironmentFile::setIsProxyContext | ( | bool | is | ) |
Sets the flag.
Definition at line 138 of file parsingenvironment.cpp.
| void KDevelop::ParsingEnvironmentFile::setLanguage | ( | IndexedString | language | ) |
Sets the language for this top-context.
Each top-context should get the language assigned that can by used in order to load the language using ILanguageController.
Definition at line 277 of file parsingenvironment.cpp.
| void KDevelop::ParsingEnvironmentFile::setModificationRevision | ( | const KDevelop::ModificationRevision & | rev | ) |
Should return a correctly filled ModificationRevision of the source it was created from.
Definition at line 247 of file parsingenvironment.cpp.
| TopDUContext * KDevelop::ParsingEnvironmentFile::topContext | ( | ) | const [virtual] |
Convenience-function that returns the top-context.
Reimplemented from KDevelop::DUChainBase.
Definition at line 111 of file parsingenvironment.cpp.
| int KDevelop::ParsingEnvironmentFile::type | ( | ) | const [virtual] |
- See also:
- ParsingEnvironmentType
Definition at line 128 of file parsingenvironment.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference