Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="info">Invokation Info</param>
        public BehaviorCrossReferenceInfo(InvokationInfo info)
        {
            this.ID = info.ID;

            this.Type = "Call";

            this.Definition = info.Definition;

            this.Location = info.Location;
        }
Пример #2
0
            /// <summary>
            /// Analyse Invokation Info
            /// </summary>
            /// <param name="cursor">Clang Cursor</param>
            private void AnalyseInvokationInfo(ClangCursor cursor)
            {
                switch (cursor.Kind)
                {
                case CursorKind.TranslationUnit:
                    this.CurrentTranslationUnit = new TranslationUnitInfo(cursor);
                    this.TranslationUnitMap.Add(this.CurrentTranslationUnit);
                    break;

                case CursorKind.Constructor:
                    this.CurrentBehavior = BehaviorInfoFactory.Create(cursor);
                    this.CurrentTranslationUnit.AddBehavior(this.CurrentBehavior);
                    break;

                case CursorKind.Destructor:
                    this.CurrentBehavior = BehaviorInfoFactory.Create(cursor);
                    this.CurrentTranslationUnit.AddBehavior(this.CurrentBehavior);
                    break;

                case CursorKind.FunctionDeclaration:
                    this.CurrentBehavior = BehaviorInfoFactory.Create(cursor);
                    this.CurrentTranslationUnit.AddBehavior(this.CurrentBehavior);
                    break;

                case CursorKind.CXXMethod:
                    this.CurrentBehavior = BehaviorInfoFactory.Create(cursor);
                    this.CurrentTranslationUnit.AddBehavior(this.CurrentBehavior);
                    break;

                case CursorKind.CallExpression:
                    var invokation_info = new InvokationInfo(cursor);
                    this.CurrentBehavior.AddInvokation(invokation_info);
                    break;

                default:
                    break;
                }
            }
Пример #3
0
 /// <summary>
 /// Add Invokation Info
 /// </summary>
 /// <param name="invokation_info">Invokation Info</param>
 public void AddInvokation(InvokationInfo invokation_info)
 {
     this.Invokations.Add(invokation_info);
 }