Esempio n. 1
0
File: RoseToTerm.C Progetto: 8l/rose
/**
 * class: SgClassDefinition
 * term: class_scope(name,type)
 * arg name: qualified name of class scope
 * arg type: class type enum
 */
PrologCompTerm* 
RoseToTerm::getClassScopeName(SgClassDefinition* def) {
  ROSE_ASSERT(def != NULL);
  /* get qualified name of scope and type of class declaration*/
  SgClassDeclaration* decl = def->get_declaration();
  ROSE_ASSERT(decl != NULL);
  string qname = decl->get_qualified_name().getString();
  /* create a PrologCompTerm*/
  return new PrologCompTerm("class_scope", //3,
			    new PrologAtom(qname),
			    getEnum(decl->get_class_type(), re.class_types),
			    PPI(def));
}
Esempio n. 2
0
File: RoseToTerm.C Progetto: 8l/rose
/**
 * class: SgConstructorInitializer
 * term: constructor_initializer_annotiation(name)
 * arg name: qualified class name
 */
PrologCompTerm* 
RoseToTerm::getConstructorInitializerSpecific(SgConstructorInitializer* ci) {
  ROSE_ASSERT(ci != NULL);
  /* get name from class declaration*/
  SgClassDeclaration* dec = ci->get_class_decl();
  ROSE_ASSERT(dec != NULL);
  return new PrologCompTerm
    ("constructor_initializer_annotation",
     new PrologAtom(dec->get_qualified_name().getString()),
     getTypeSpecific(ci->get_expression_type()),
     makeFlag(ci->get_need_name(), "need_name"),
     makeFlag(ci->get_need_qualifier(), "need_qualifier"),
     makeFlag(ci->get_need_parenthesis_after_name(), "need_parenthesis_after_name"),
     makeFlag(ci->get_associated_class_unknown(), "associated_class_unknown"),
     PPI(ci));
}