Re: Several rootcint questions [please don't ignore!]

From: Terrence Brannon (brannon@quake.usc.edu)
Date: Tue Jun 10 1997 - 22:36:27 MEST


For some reason, my problems posted to roottalk about using rootcint
to install my classes to take advantage of automated documentation are
being ignored. Is there a reason for this? 

Terrence Brannon <brannon@quake.usc.edu> writes:

> 
> >  There is a way to deal with pointer to funciton is a compiler environment
> >  I picked up related part from ny Book draft for English. Example code is 
> >  in the cint source code package demo/makecint/p2f/ directory.
> 
> I have a completely working tree of source code that compiles under
> g++2.7. I want to document my source using the root/cint automatic
> documentation. 
> 
> -2: Is this part of the source code for ROOT? If not, where does one
> obtain it? 
> -1: Where does the ROOT FAQ exist?
> 0: Must I go about using the rootcint program on my source tree in a
> particular order?
> 1: how does one specify a +P or -p option to rootcint?
> 2: I am having lots of errors when I naively try to follow the example
> program. That class is self-contained with no references to other
> include files. My class hierarchy is multi-leveled. Can CINT handle
> such complexity?
> 3: What is the meaning of 
>   "Warning: Link requested for undefined class param.Vec  FILE: LINE:0" 
> 4: should I really be typing "rootcint mydict.C -c param.Vec.h" or
> should I be typing rootcint mydict.h -c param.Vec.h  
> 5: builtin.h is in /usr/lib/g++-include++. How can I tell rootcint to look
> there? The same goes for "String.h"
> 6: Could someone please tell me what causes the following Errors,
> Notes, and Warnings and how to remedy them?
> 
> brannon@palm ~/rs/VisionMagick/terry : rootcint mydict.C -c param.Vec.h 
> Error: source file "builtin.h" cannot open  FILE:param.Vec.h LINE:27
> Error: source file "String.h" cannot open  FILE:param.defs.h LINE:26
> Error: No symbol Stringname in current scope  FILE:param.defs.h LINE:29
> Error: No symbol Stringval_strings[2] in current scope  FILE:param.defs.h LINE:30
> Error: No symbol one_arg_error_handler_tparamVec_error_handler in current scope  FILE:param.Vec.h LINE:84
> Note: operator new() masked c
> Note: operator delete() masked c
> Warning: Link requested for undefined class param.Vec  FILE: LINE:0
> brannon@palm ~/rs/VisionMagick/terry :
> 
> // param.Vec.h
> // This may look like C code, but it is really -*- C++ -*-
> /* 
> Copyright (C) 1988 Free Software Foundation
>     written by Doug Lea (dl@rocky.oswego.edu)
> 
> This file is part of the GNU C++ Library.  This library is free
> software; you can redistribute it and/or modify it under the terms of
> the GNU Library General Public License as published by the Free
> Software Foundation; either version 2 of the License, or (at your
> option) any later version.  This library is distributed in the hope
> that it will be useful, but WITHOUT ANY WARRANTY; without even the
> implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.  See the GNU Library General Public License for more details.
> You should have received a copy of the GNU Library General Public
> License along with this library; if not, write to the Free Software
> Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
> */
> 
> 
> #ifndef _paramVec_h
> #ifdef __GNUG__
> #pragma interface
> #endif
> #define _paramVec_h 1
> 
> #include <builtin.h>
> #include "param.defs.h"
> 
> #ifndef _param_typedefs
> #define _param_typedefs 1
> typedef void (*paramProcedure)(param&);
> typedef param  (*paramMapper)(param&);
> typedef param  (*paramCombiner)(param&, param&);
> typedef int  (*paramPredicate)(param&);
> typedef int  (*paramComparator)(param&, param&);
> #endif
> 
> 
> class paramVec 
> {
> protected:      
>   int                   len;
>   param                   *s;                  
> 
>                         paramVec(int l, param* d);
> public:
>                         paramVec ();
>                         paramVec (int l);
>                         paramVec (int l, param& fill_value);
>                         paramVec (const paramVec&);
>                         ~paramVec ();
> 
>   paramVec &              operator = (const paramVec & a);
>   paramVec                at(int from = 0, int n = -1);
> 
>   int                   capacity() const;
>   void                  resize(int newlen);                        
> 
>   param&                  operator [] (int n);
>   param&                  elem(int n);
> 
>   friend paramVec         concat(paramVec & a, paramVec & b);
>   friend paramVec         map(paramMapper f, paramVec & a);
>   friend paramVec         merge(paramVec & a, paramVec & b, paramComparator f);
>   friend paramVec         combine(paramCombiner f, paramVec & a, paramVec & b);
>   friend paramVec         reverse(paramVec & a);
> 
>   void                  reverse();
>   void                  sort(paramComparator f);
>   void                  fill(param& val, int from = 0, int n = -1);
> 
>   void                  apply(paramProcedure f);
>   param                   reduce(paramCombiner f, param& base);
>   int                   index(param& targ);
> 
>   friend int            operator == (paramVec& a, paramVec& b);
>   friend int            operator != (paramVec& a, paramVec& b);
> 
>   void                  error(const char* msg);
>   void                  range_error();
> };
> 
> extern void default_paramVec_error_handler(const char*);
> extern one_arg_error_handler_t paramVec_error_handler;
> 
> extern one_arg_error_handler_t 
>         set_paramVec_error_handler(one_arg_error_handler_t f);
> 
> 
> inline paramVec::paramVec()
> {
>   len = 0; s = 0;
> }
> 
> inline paramVec::paramVec(int l)
> {
>   s = new param [len = l];
> }
> 
> 
> inline paramVec::paramVec(int l, param* d) :len(l), s(d) {}
> 
> 
> inline paramVec::~paramVec()
> {
>   delete [] s;
> }
> 
> 
> inline param& paramVec::operator [] (int n)
> {
>   if ((unsigned)n >= (unsigned)len)
>     range_error();
>   return s[n];
> }
> 
> inline param& paramVec::elem(int n)
> {
>   return s[n];
> }
> 
> 
> inline int paramVec::capacity() const
> {
>   return len;
> }
> 
> 
> 
> inline int operator != (paramVec& a, paramVec& b)
> {
>   return !(a == b);
> }
> 
> #endif
> 

-- 
Terrence Brannon * brannon@quake.usc.edu * http://quake.usc.edu/~brannon

  *** This message was produced with 100% recycled electrons! ***



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:19 MET