Package gavo :: Module rscdesc :: Class RDParseContext
[frames] | no frames]

Class RDParseContext

source code

                    object --+    
                             |    
base.parsecontext.ParseContext --+
                                 |
                                RDParseContext

is a parse context for RDs.

It defines a couple of attributes that structures can ask for (however, it's good practice not to rely on their presence in case someone wants to parse XML snippets with a standard parse context, so use getattr(ctx, "doQueries", True) or somesuch.

Instance Methods
 
__init__(self, doQueries=True, restricted=False, forRD=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from base.parsecontext.ParseContext: addExitFunc, getById, getQualifiedId, registerId, replaying, resolveId, runExitFuncs, setEventSource, setPositionOn

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
fromContext(cls, ctx, forRD=None)
a constructor that makes a context with the parameters taken from the RDParseContext ctx.
source code
Properties
  failuresAreCacheable
returns true if failures produced with this context should be cached.

Inherited from base.parsecontext.ParseContext: pos

Inherited from object: __class__

Method Details

__init__(self, doQueries=True, restricted=False, forRD=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

Property Details

failuresAreCacheable

returns true if failures produced with this context should be cached.

This is not the case with restricted parses.

Get Method:
unreachable.failuresAreCacheable(self) - returns true if failures produced with this context should be cached.