Revision e93001231ffa36013c5ba4e95c7eaf7cd9ba0726 authored by Fons Rademakers on 27 September 2006, 08:49:14 UTC, committed by Fons Rademakers on 27 September 2006, 08:49:14 UTC
Use TRefArray for storing per-point object ids; provide custom Streamer to write-out the referenced objects in case they're owned by the TPointSet3D. git-svn-id: http://root.cern.ch/svn/root/trunk@16355 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 6637700
Function.cxx
// @(#)root/reflex:$Name: $:$Id: Function.cxx,v 1.11 2006/08/02 14:14:49 roiser Exp $
// Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
//
// Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives.
//
// This software is provided "as is" without express or implied warranty.
#ifndef REFLEX_BUILD
#define REFLEX_BUILD
#endif
#include "Function.h"
#include "Reflex/Tools.h"
#include "Reflex/internal/OwnedMember.h"
//-------------------------------------------------------------------------------
ROOT::Reflex::Function::Function( const Type & retType,
const std::vector< Type > & parameters,
const std::type_info & ti,
TYPE functionType)
//-------------------------------------------------------------------------------
// Default constructor for a function type.
: TypeBase( BuildTypeName(retType, parameters, QUALIFIED | SCOPED).c_str(), 0, functionType, ti ),
fParameters(parameters),
fReturnType(retType),
fModifiers(0) { }
//-------------------------------------------------------------------------------
std::string ROOT::Reflex::Function::Name( unsigned int mod ) const {
//-------------------------------------------------------------------------------
// Return the name of the function type.
return BuildTypeName( fReturnType, fParameters, mod );
}
//-------------------------------------------------------------------------------
std::string ROOT::Reflex::Function::BuildTypeName( const Type & ret,
const std::vector< Type > & pars,
unsigned int mod ) {
//-------------------------------------------------------------------------------
// Build the name of the function type in the form <returntype><space>(<param>*)
std::string tyname = ret.Name( mod )+ " (";
if ( pars.size() > 0 ) {
std::vector< Type >::const_iterator it;
for ( it = pars.begin(); it != pars.end(); ) {
tyname += it->Name( mod );
if ( ++it != pars.end() ) tyname += ", ";
}
}
else {
tyname += "void";
}
tyname += ")";
return tyname;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...