コード例 #1
0
        public ICXXConstructExpr CreateCXXConstructExpr(string str, IDeclaration decl)
        {
            var ret = new CppSharp.AST.CXXConstructExpr();

            ret.String = str;
            return(ret);
        }
コード例 #2
0
ファイル: Expression.cs プロジェクト: CloudIDEaaS/hydra
        public override Expression Clone()
        {
            var clone = new CXXConstructExpr
            {
                DebugText   = this.DebugText,
                Declaration = this.Declaration,
                String      = this.String
            };

            clone.Arguments.AddRange(Arguments.Select(a => a.Clone()));
            return(clone);
        }
コード例 #3
0
        public IExpression CreateExpression(string str, StatementClass Class, IDeclaration decl)
        {
            IExpression ret = null;

            switch (Class)
            {
            /*case StatementClass.BinaryOperator:
             *      ret = new CppSharp.AST.BinaryOperator();
             *      break;*/
            case StatementClass.DeclarationReference:
                ret       = new CppSharp.AST.BuiltinTypeExpression();
                ret.Class = StatementClass.DeclarationReference;
                break;

            case StatementClass.Call:
                ret = new CppSharp.AST.CallExpr();
                break;

            case StatementClass.ConstructorReference:
                ret = new CppSharp.AST.CXXConstructExpr();
                break;

            case StatementClass.CXXOperatorCall:
                ret       = new CppSharp.AST.BuiltinTypeExpression();
                ret.Class = StatementClass.CXXOperatorCall;
                break;

            case StatementClass.ImplicitCast:
                ret = new CppSharp.AST.CallExpr();
                break;

            case StatementClass.ExplicitCast:
                ret = new CppSharp.AST.CallExpr();
                break;

            case StatementClass.InitList:
                ret = new CppSharp.AST.InitListExpr();
                break;

            case StatementClass.SubStmt:
                ret = new CppSharp.AST.SubStmtExpr();
                break;

            default:
                throw new NotImplementedException();
            }
            ret.String      = str;
            ret.Declaration = decl;

            return(ret);
        }