<commit_before>// @(#)root/reflex:$Name:  $:$Id: TypeBase.h,v 1.7 2006/03/13 15:49:50 roiser Exp $
// Author: <NAME> 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 ROOT_Reflex_TypeBase
#define ROOT_Reflex_TypeBase

// Include files
#include "Reflex/Kernel.h"
#include "Reflex/Scope.h"
#include "Reflex/PropertyList.h"
#include <vector>
#include <typeinfo>

namespace ROOT {
   namespace Reflex {

      // forward declarations
      class Fundamental;
      class Function;
      class Array;
      class Class;
      class Base;
      class Enum;
      class Typedef;
      class Pointer;
      class ClassTemplateInstance;
      class FunctionMemberTemplateInstance;
      class Type;
      class TypeName;
      class Object;
      class Member;
      class MemberTemplate;
      class TypeTemplate;

      /**
       * @class TypeBase TypeBase.h Reflex/TypeBase.h
       * @author <NAME>
       * @date 24/11/2003
       * @ingroup Ref
       */
      class RFLX_API TypeBase {

      public:

         /** default constructor */
         TypeBase( const char *           nam, 
                   size_t                 size, 
                   TYPE                   typeTyp,
                   const std::type_info & ti);


         /** destructor */
         virtual ~TypeBase();


         /**
          * operator Scope will return the corresponding scope of this type if
          * applicable (i.e. if the Type is also a Scope e.g. Class, Union, Enum)
          */                                       
         operator Scope() const;


         /**
          * operator Type will return the corresponding Type object
          * @return Type corresponding to this TypeBase
          */
         operator Type() const;


         /**
          * Allocate will reserve memory for the size of the object
          * @return pointer to allocated memory
          */
         void * Allocate() const;


         /**
          * nthBase will return the nth BaseAt class information
          * @param  nth nth BaseAt class
          * @return pointer to BaseAt class information
          */
         virtual Base BaseAt( size_t nth ) const;


         /**
          * BaseSize will return the number of BaseAt classes
          * @return number of BaseAt classes
          */
         virtual size_t BaseSize() const;


         virtual Base_Iterator Base_Begin() const;
         virtual Base_Iterator Base_End() const;
         virtual Reverse_Base_Iterator Base_RBegin() const;
         virtual Reverse_Base_Iterator Base_REnd() const;


         /**
          * CastObject an object from this class At to another one
          * @param  to is the class At to cast into
          * @param  obj the memory AddressGet of the object to be casted
          */
         virtual Object CastObject( const Type & to, 
                                    const Object & obj ) const;


         /**
          * Construct will call the constructor of a given At and Allocate the
          * memory for it
          * @param  signature of the constructor
          * @param  values for parameters of the constructor
          * @param  mem place in memory for implicit construction
          * @return pointer to new instance
          */
         /*
           virtual Object Construct( const Type & signature,
           std::vector < Object > values,
           void * mem) const;*/
         virtual Object Construct( const Type & signature,
                                   std::vector < void * > values,
                                   void * mem) const;
      
         /**
          * DataMemberAt will return the nth data MemberAt of the At
          * @param  nth data MemberAt
          * @return pointer to data MemberAt
          */
         virtual Member DataMemberAt( size_t nth ) const;


         /**
          * DataMemberByName will return the MemberAt with Name
          * @param  Name of data MemberAt
          * @return data MemberAt
          */
         virtual Member DataMemberByName( const std::string & nam ) const;


         /**
          * DataMemberSize will return the number of data members of this At
          * @return number of data members
          */
         virtual size_t DataMemberSize() const;


         virtual Member_Iterator DataMember_Begin() const;
         virtual Member_Iterator DataMember_End() const;
         virtual Reverse_Member_Iterator DataMember_RBegin() const;
         virtual Reverse_Member_Iterator DataMember_REnd() const;<commit_msg>fix function signature<commit_after>// @(#)root/reflex:$Name:  $:$Id: TypeBase.h,v 1.8 2006/04/12 10:21:11 roiser Exp $
// Author: <NAME> 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 ROOT_Reflex_TypeBase
#define ROOT_Reflex_TypeBase

// Include files
#include "Reflex/Kernel.h"
#include "Reflex/Scope.h"
#include "Reflex/PropertyList.h"
#include <vector>
#include <typeinfo>

namespace ROOT {
   namespace Reflex {

      // forward declarations
      class Fundamental;
      class Function;
      class Array;
      class Class;
      class Base;
      class Enum;
      class Typedef;
      class Pointer;
      class ClassTemplateInstance;
      class FunctionMemberTemplateInstance;
      class Type;
      class TypeName;
      class Object;
      class Member;
      class MemberTemplate;
      class TypeTemplate;

      /**
       * @class TypeBase TypeBase.h Reflex/TypeBase.h
       * @author <NAME>
       * @date 24/11/2003
       * @ingroup Ref
       */
      class RFLX_API TypeBase {

      public:

         /** default constructor */
         TypeBase( const char *           nam, 
                   size_t                 size, 
                   TYPE                   typeTyp,
                   const std::type_info & ti);


         /** destructor */
         virtual ~TypeBase();


         /**
          * operator Scope will return the corresponding scope of this type if
          * applicable (i.e. if the Type is also a Scope e.g. Class, Union, Enum)
          */                                       
         operator Scope() const;


         /**
          * operator Type will return the corresponding Type object
          * @return Type corresponding to this TypeBase
          */
         operator Type() const;


         /**
          * Allocate will reserve memory for the size of the object
          * @return pointer to allocated memory
          */
         void * Allocate() const;


         /**
          * nthBase will return the nth BaseAt class information
          * @param  nth nth BaseAt class
          * @return pointer to BaseAt class information
          */
         virtual Base BaseAt( size_t nth ) const;


         /**
          * BaseSize will return the number of BaseAt classes
          * @return number of BaseAt classes
          */
         virtual size_t BaseSize() const;


         virtual Base_Iterator Base_Begin() const;
         virtual Base_Iterator Base_End() const;
         virtual Reverse_Base_Iterator Base_RBegin() const;
         virtual Reverse_Base_Iterator Base_REnd() const;


         /**
          * CastObject an object from this class At to another one
          * @param  to is the class At to cast into
          * @param  obj the memory AddressGet of the object to be casted
          */
         virtual Object CastObject( const Type & to, 
                                    const Object & obj ) const;


         /**
          * Construct will call the constructor of a given At and Allocate the
          * memory for it
          * @param  signature of the constructor
          * @param  values for parameters of the constructor
          * @param  mem place in memory for implicit construction
          * @return pointer to new instance
          */
         /*
           virtual Object Construct( const Type & signature,
           std::vector < Object > values,
           void * mem) const;*/
         virtual Object Construct( const Type & signature,
                                   const std::vector < void * > & values,
                                   void * mem) const;
      
         /**
          * DataMemberAt will return the nth data MemberAt of the At
          * @param  nth data MemberAt
          * @return pointer to data MemberAt
          */
         virtual Member DataMemberAt( size_t nth ) const;


         /**
          * DataMemberByName will return the MemberAt with Name
          * @param  Name of data MemberAt
          * @return data MemberAt
          */
         virtual Member DataMemberByName( const std::string & nam ) const;


         /**
          * DataMemberSize will return the number of data members of this At
          * @return number of data members
          */
         virtual size_t DataMemberSize() const;


         virtual Member_Iterator DataMember_Begin() const;
         virtual Member_Iterator DataMember_End() const;
         virtual Reverse_Member_Iterator DataMember_RBegin() const;
         virtual Reverse_Member_Iterator DataMember_REnd() const;
{'fraction_non_alphanumeric': 0.06946021261224068, 'fraction_numerical': 0.008669625348333161, 'mean_word_length': 1.7120067170445004, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1526947', 'n_tokens_mistral': 2485, 'n_tokens_neox': 2315, 'n_words': 908}