Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] INodeFactory and ICPPNodeFactory
  • From: Ming Cheng <chengm349@xxxxxxxxxxx>
  • Date: Thu, 27 Feb 2020 02:16:32 +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=5OLKiZiuPFu49Lh5lmZZqn2+Ab0OVwfwoF8y+e1cwks=; b=drDgxwXczJ4Kw4/UUKcHUzY1T8xGF18nmzi55vTXIsO5FGqLhODCNnXIFhEPegjEsFH4oKEGUb5bGc+QY7EODytHOIAli6qOp0Rqm4aPL/8crfccS2y9NtJp05kPSPkk3uF+4tsSTcfpJYDYr0ROQSbOB+zJU/ifMUTKOuO45zExrIvVzozvBFsY8FLGvrfanlRoqQ/8CcVjgPQOjUCATg3b9ODj1j1WFEBkxeOQjO61voT2dAqqn+Gqzn7045INy1Amewv1w6FpQGZBkDRo4WtYqPJSak1VvRvBCXDlXOqsSQE1tMFCrl1Vbr4Pf8hi0i90WYEtsN0dZJb0Rl4viw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HMMtTW2Fq81didG44LJvEW8WTtsNgoanhIA3kB6Dtq0EByM4LN/fqEhDV3MCcf7m5MAoevac7qjJlKxpvYiwsJFsYiGA06pBZT9TjMgGgzYQjHug+HRAbh7GrEM96QvsLRLRRH1EeWaHDVdwkK3rvLsG7ZMES1GkGc+nbV54RSM4tLD7wnLeucwEfAhFrtFJMf5fp0Qf+hOfK4EGb/fGn8Wda/72P68dnUidGhhG4vLVPpc1/SKuV8xVFweFOm4euRWqCbn6sOiK/O2bLaw6OqWDfgLTRcwTLeBndZnJrTxp4q3MgZmoHKv6uO06Sq0cYoJNevhvMqu3882hxK5etw==
  • 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+8ga2MEGuBRaguTpSa
  • Thread-topic: INodeFactory and ICPPNodeFactory

I know everyone is very busy.

Hope any expert can give some guide.

 

Thank you very much!

 

Sent from Mail for Windows 10

 

From: Ming Cheng
Sent: Wednesday, February 26, 2020 4:52 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] 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