MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / Scope

Class Scope

addons/cppcheckdata.py:548–624  ·  view source on GitHub ↗

Scope. Information about global scope, function scopes, class scopes, inner scopes, etc. C++ class: https://cppcheck.sourceforge.io/devinfo/doxyoutput/classScope.html Attributes bodyStart The { Token for this scope bodyEnd The } Token for this scope

Source from the content-addressed store, hash-verified

546 return None
547
548class Scope:
549 """
550 Scope. Information about global scope, function scopes, class scopes, inner scopes, etc.
551 C++ class: https://cppcheck.sourceforge.io/devinfo/doxyoutput/classScope.html
552
553 Attributes
554 bodyStart The { Token for this scope
555 bodyEnd The } Token for this scope
556 className Name of this scope.
557 For a function scope, this is the function name;
558 For a class scope, this is the class name.
559 function If this scope belongs at a function call, this attribute
560 has the Function information. See the Function class.
561 functions if this is a Class type, it may have functions defined
562 nestedIn
563 type Type of scope: Function, If/Else/For/While/Switch/Global/Enum/Struct/Namespace/Class/Constructor/Destructor
564 isExecutable True when the type is: Function/If/Else/For/While/Do/Switch/Try/Catch/Unconditional/Lambda
565 definedType
566 """
567 #symboldatabase.cpp/SymbolDatabase::printXml
568
569 Id = None
570 bodyStartId = None
571 bodyStart = None
572 bodyEndId = None
573 bodyEnd = None
574 className = None
575 functionId = None
576 function = None
577 nestedInId = None
578 nestedIn = None
579 nestedList = None
580 type = None
581 isExecutable = None
582 varlistId = None
583 varlist = None
584
585 def __init__(self, element):
586 self.Id = element.get('id')
587 self.className = element.get('className')
588 self.functionId = element.get('function')
589 self.function = None
590 self.functions = []
591 self.bodyStartId = element.get('bodyStart')
592 self.bodyStart = None
593 self.bodyEndId = element.get('bodyEnd')
594 self.bodyEnd = None
595 self.nestedInId = element.get('nestedIn')
596 self.nestedIn = None
597 self.nestedList = []
598 self.type = element.get('type')
599 self.definedType = element.get('definedType')
600 self.isExecutable = (self.type in ('Function', 'If', 'Else', 'For', 'While', 'Do',
601 'Switch', 'Try', 'Catch', 'Unconditional', 'Lambda'))
602
603 self.varlistId = []
604 self.varlist = []
605

Callers 1

iterconfigurationsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected