"Fossies" - the Fresh Open Source Software Archive

Member "RPerl-5.002000/lib/RPerl/Algorithm.h.CPPOPS_DUALTYPES" (30 Aug 2019, 5288 Bytes) of package /linux/misc/RPerl-5.002000.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Algorithm.h.CPPOPS_DUALTYPES": 4.002000_vs_5.000000.

    1 // [[[ HEADER ]]]
    2 using std::cout;  using std::cerr;  using std::endl;
    3 
    4 #ifndef __CPP__INCLUDED__RPerl__Algorithm_h
    5 #define __CPP__INCLUDED__RPerl__Algorithm_h 0.010_000
    6 
    7 // [[[ INCLUDES & OO INHERITANCE INCLUDES ]]]
    8 #include <RPerl.cpp>  // -> RPerl.h -> (rperltypes_mode.h; rperloperations.h; rperltypes.h; HelperFunctions.cpp)
    9 #include <RPerl/CompileUnit/Module/Class.cpp> // no non-system inheritance, only inherit from base class
   10 
   11 # ifdef __PERL__TYPES
   12 
   13 // [[[<<< BEGIN PERL TYPES >>>]]]
   14 // [[[<<< BEGIN PERL TYPES >>>]]]
   15 // [[[<<< BEGIN PERL TYPES >>>]]]
   16 
   17 // [[[ CONSTANTS ]]]
   18 const SV* RPerl__Algorithm__TIME_BEST = (const SV*) newSVpv("<<< UNKNOWN >>>", 0);
   19 const SV* RPerl__Algorithm__TIME_AVERAGE = (const SV*) newSVpv("<<< UNKNOWN >>>", 0);
   20 const SV* RPerl__Algorithm__TIME_WORST = (const SV*) newSVpv("<<< UNKNOWN >>>", 0);
   21 const SV* RPerl__Algorithm__SPACE_WORST = (const SV*) newSVpv("<<< UNKNOWN >>>", 0);
   22 
   23 // [[[ OO INHERITANCE ]]]
   24 class RPerl__Algorithm : public RPerl__CompileUnit__Module__Class__CPP {
   25 public:
   26     // [[[ OO PROPERTIES ]]]
   27     SV* foo = newSVpv("<<< DEFAULT, ALGORITHM >>>", 0);
   28 
   29     // [[[ OO METHODS ]]]
   30 
   31     // <<< OO PROPERTIES, ACCESSORS & MUTATORS >>>
   32     SV* get_foo() { return SvREFCNT_inc(this->foo); }
   33     void set_foo(SV* foo_new) { this->foo = foo_new; }
   34 
   35     // <<< CONSTRUCTOR & DESTRUCTOR >>>
   36     RPerl__Algorithm() {}
   37     ~RPerl__Algorithm() {}
   38 
   39     // <<< CLASS NAME REPORTER >>>
   40     virtual SV* myclassname() { return newSVpv("RPerl::Algorithm", 0); }
   41 
   42     // <<< CONSTANTS, SHIMS >>>
   43     SV* TIME_BEST() { return RPerl__Algorithm__TIME_BEST; }
   44     SV* TIME_AVERAGE() { return RPerl__Algorithm__TIME_AVERAGE; }
   45     SV* TIME_WORST() { return RPerl__Algorithm__TIME_WORST; }
   46     SV* SPACE_WORST() { return RPerl__Algorithm__SPACE_WORST; }
   47 
   48     // <<< USER-DEFINED METHODS >>>
   49     void inherited_Algorithm(SV* person);
   50     SV* inherited_Algorithm_foo_get();
   51     void inherited_Algorithm_foo_set(SV* foo_new);
   52 };  // end of class
   53 
   54 // [[[ OO SUBCLASSES ]]]
   55 #define RPerl__Algorithm_rawptr RPerl__Algorithm*
   56 typedef std::unique_ptr<RPerl__Algorithm> RPerl__Algorithm_ptr;
   57 typedef std::vector<RPerl__Algorithm_ptr> RPerl__Algorithm_arrayref;
   58 typedef std::unordered_map<string, RPerl__Algorithm_ptr> RPerl__Algorithm_hashref;
   59 typedef std::unordered_map<string, RPerl__Algorithm_ptr>::iterator RPerl__Algorithm_hashref_iterator;
   60 
   61 // [[[ SUBROUTINES ]]]
   62 SV* RPerl__Algorithm__uninherited_Algorithm(SV* person);
   63 
   64 // <<< SHIM MACROS >>>
   65 #define uninherited_Algorithm(person) RPerl__Algorithm__uninherited_Algorithm(person)
   66 
   67 // <<< OPERATIONS & DATA TYPES REPORTER >>>
   68 SV* RPerl__Algorithm__MODE_ID() { return newSViv(1); }  // CPPOPS_PERLTYPES is 1
   69 
   70 // [[[<<< END PERL TYPES >>>]]]
   71 // [[[<<< END PERL TYPES >>>]]]
   72 // [[[<<< END PERL TYPES >>>]]]
   73 
   74 # elif defined __CPP__TYPES
   75 
   76 // [[[<<< BEGIN CPP TYPES >>>]]]
   77 // [[[<<< BEGIN CPP TYPES >>>]]]
   78 // [[[<<< BEGIN CPP TYPES >>>]]]
   79 
   80 // [[[ CONSTANTS ]]]
   81 const string RPerl__Algorithm__TIME_BEST = (const string) "<<< UNKNOWN >>>";
   82 const string RPerl__Algorithm__TIME_AVERAGE = (const string) "<<< UNKNOWN >>>";
   83 const string RPerl__Algorithm__TIME_WORST = (const string) "<<< UNKNOWN >>>";
   84 const string RPerl__Algorithm__SPACE_WORST = (const string) "<<< UNKNOWN >>>";
   85 
   86 // [[[ OO INHERITANCE ]]]
   87 class RPerl__Algorithm : public RPerl__CompileUnit__Module__Class__CPP {
   88 public:
   89     // [[[ OO PROPERTIES ]]]
   90     string foo = "<<< DEFAULT, ALGORITHM >>>";
   91 
   92     // [[[ OO METHODS ]]]
   93 
   94     // <<< OO PROPERTIES, ACCESSORS & MUTATORS >>>
   95     string get_foo() { return this->foo; }
   96     void set_foo(string foo_new) { this->foo = foo_new; }
   97 
   98     // <<< CONSTRUCTOR & DESTRUCTOR >>>
   99     RPerl__Algorithm() {}
  100     ~RPerl__Algorithm() {}
  101 
  102     // <<< CLASS NAME REPORTER >>>
  103     virtual string myclassname() { return (const string) "RPerl::Algorithm"; }
  104 
  105     // <<< CONSTANTS, SHIMS >>>
  106     string TIME_BEST() { return RPerl__Algorithm__TIME_BEST; }
  107     string TIME_AVERAGE() { return RPerl__Algorithm__TIME_AVERAGE; }
  108     string TIME_WORST() { return RPerl__Algorithm__TIME_WORST; }
  109     string SPACE_WORST() { return RPerl__Algorithm__SPACE_WORST; }
  110 
  111     // <<< USER-DEFINED METHODS >>>
  112     void inherited_Algorithm(string person);
  113     string inherited_Algorithm_foo_get();
  114     void inherited_Algorithm_foo_set(string foo_new);
  115 };  // end of class
  116 
  117 // [[[ OO SUBCLASSES ]]]
  118 #define RPerl__Algorithm_rawptr RPerl__Algorithm*
  119 typedef std::unique_ptr<RPerl__Algorithm> RPerl__Algorithm_ptr;
  120 typedef std::vector<RPerl__Algorithm_ptr> RPerl__Algorithm_arrayref;
  121 typedef std::unordered_map<string, RPerl__Algorithm_ptr> RPerl__Algorithm_hashref;
  122 typedef std::unordered_map<string, RPerl__Algorithm_ptr>::iterator RPerl__Algorithm_hashref_iterator;
  123 
  124 // [[[ SUBROUTINES ]]]
  125 string RPerl__Algorithm__uninherited_Algorithm(string person);
  126 
  127 // <<< SHIM MACROS >>>
  128 #define uninherited_Algorithm(person) RPerl__Algorithm__uninherited_Algorithm(person)
  129 
  130 // <<< OPERATIONS & DATA TYPES REPORTER >>>
  131 integer RPerl__Algorithm__MODE_ID() { return 2; }  // CPPOPS_CPPTYPES is 2
  132 
  133 // [[[<<< END CPP TYPES >>>]]]
  134 // [[[<<< END CPP TYPES >>>]]]
  135 // [[[<<< END CPP TYPES >>>]]]
  136 
  137 # else
  138 
  139 Purposefully_die_from_a_compile-time_error,_due_to_neither___PERL__TYPES_nor___CPP__TYPES_being_defined.__We_need_to_define_exactly_one!
  140 
  141 # endif
  142 
  143 #endif