From: <bl...@us...> - 2003-05-29 09:53:52
|
Update of /cvsroot/cpptool/rfta/src/pyrfta In directory sc8-pr-cvs1:/tmp/cvs-serv21597/src/pyrfta Added Files: ExposeDeclarations.cpp Log Message: * exposed code model declaration and parser --- NEW FILE: ExposeDeclarations.cpp --- #include "Forwards.h" #include <boost/python.hpp> #include <rfta/refactoring/CodeModelDeclarations.h> using namespace boost::python; using namespace Refactoring::CodeModel; void exposeDeclarations() { // void (Expression::*mfAcceptExpressionVisitor)( ExpressionVisitor & ) = &Expression::accept; // class_<Expression, bases<Element>, boost::noncopyable >( "Expression", no_init ) // .def( "accept", mfAcceptExpressionVisitor ) // ; class_<FunctionDeclaration, FunctionDeclarationPtr, bases<Element>, boost::noncopyable >( "FunctionDeclaration", init< TypePtr, FunctionNamePtr, ParametersPtr, optional<CompoundStatementPtr> >() ) .add_property( "functionName", &FunctionDeclaration::getFunctionName ) .def( "hasBody", &FunctionDeclaration::hasBody ) .add_property( "body", &FunctionDeclaration::getBody ) ; class_<Type, TypePtr, bases<Element>, boost::noncopyable>( "Type", init< std::string >() ) .add_property( "typeText", &Type::getTypeText ) ; class_<ArrayTypeSuffix, ArrayTypeSuffixPtr, bases<Element>, boost::noncopyable>( "ArrayTypeSuffix", init< std::string >() ) .add_property( "suffixText", &ArrayTypeSuffix::getSuffixText ) ; class_<FunctionName, FunctionNamePtr, bases<Element>, boost::noncopyable>( "FunctionName", init< std::string >() ) .add_property( "name", &FunctionName::getName ) ; class_<Parameters, ParametersPtr, bases<Element>, boost::noncopyable>( "Parameters" ) ; } |