Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] INodeFactory and ICPPNodeFactory
  • From: Ming Cheng <chengm349@xxxxxxxxxxx>
  • Date: Wed, 26 Feb 2020 08:52:15 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VSgatDR4yovH6VgcS4QP2QUieWsEWNjEj5gmg+rrME8=; b=JZnIMYvQjWPbRAjvluIZgsvJElIEqKAPrFLFez8ckdFavNFSF2IdNMCa2iujUO1EhB/3MuxabqhFP2EbuiHC5LTSfc6ugXcxclTOGOp7+cC+vK1QZqpdcJH9xESRimu9lU7x+YPR1489menl8joz3flhoAGDMf3kSZQurBlASHatt4ZrDdbTvuidOS51XyjjHlttqZm29TkIZ5EA67AcPy8tGBq1FqR3V/TbLjmvFVtu0nDm08usn7Uc51ioxIJsEB7noTki6hENY8kQaoOsYJhMOKpyIgMNguAjPaT7Xz3RwG9hqTHcWYW5EeeU79zba+oSJxlKxUpyBqTulE97tQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DdKkz9xz6OrPJTm5Gp/TuIGM2yIum2KLnIMV8I7r4LIdCk+FIrUQQIXlM9MY45+4lPjp/mTeZFTA4rPN6hSElltiIrvKv0KIOFju4ZOpLcGS/e0xu7vmzefNjOftZmNyigl2g1FiKG+XOCGIMw0GOJR7uq2nISCewzyFQyBez801dHzqzHW6DYsss3HfYSqaKOeEI5ssTqnk/R0RWSsbJ/Zj0niXcR/3WIpdZuwvFCyq//ZNu5IAJ90RDjAa4ZWwPpcB7dcEhD9KmX0p/LFZWUUSCfGPQJvJq/ufvrKcLaZbHjpAz66qEagZKPXEYq5C0AzSypiQlK5inJ6oyztwTw==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/cdt-dev>
  • List-help: <mailto:cdt-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHV7IBhDeL+/QVjdk+8ga2MEGuBRQ==
  • Thread-topic: INodeFactory and ICPPNodeFactory

Hi,


IASTTranslationUnit ast = CurrentGui.getInstance().getGui().getAST(file);
ASTRewrite r = ASTRewrite.create( ast );
addIncludeDirectives(ast, r, className + ".h");

 INodeFactory factory = ast.getASTNodeFactory();

I have ast, is there a way to get ICPPNodeFactory? I want to "new" a class declaration as simple and natural as possible. For example I don't want ASTRewrite's createLiteralNode to get a IASTNode.  Then to add some class's elements. I prefer to get a IASTSimpleDeclaration with ICPPASTCompositeTypeSpecifier.k_class .

Rgds.
Ming Cheng

Back to the top