changeset 309:5638a94baa25

[project @ 1994-01-19 01:39:52 by jwe]
author jwe
date Wed, 19 Jan 1994 01:39:52 +0000
parents 3916fadea706
children 6ea1ed2d306c
files liboctave/Array.cc
diffstat 1 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/Array.cc	Wed Jan 19 01:29:57 1994 +0000
+++ b/liboctave/Array.cc	Wed Jan 19 01:39:52 1994 +0000
@@ -1,7 +1,7 @@
 // Template array classes                              -*- C++ -*-
 /*
 
-Copyright (C) 1993 John W. Eaton
+Copyright (C) 1993, 1994 John W. Eaton
 
 This file is part of Octave.
 
@@ -985,8 +985,8 @@
     delete old_rep;
 }
 
-#ifdef __GNUG__
-#if defined (OCTAVE_SOURCE) && defined (USE_EXTERNAL_TEMPLATES)
+#if defined (__GNUG__) && defined (USE_EXTERNAL_TEMPLATES)
+#if defined (OCTAVE_SOURCE)
 
 typedef Array<double> array_type_double;
 typedef Array2<double> array2_type_double;
@@ -997,6 +997,20 @@
 typedef Array2<Complex> array2_type_complex;
 typedef DiagArray<Complex> diag_array_type_complex;
 
+#elif defined (USER_TYPEDEFS)
+
+// Users can generate their own .o files with their own types, as many
+// times as they like.  USER_TYPEDEFS should be defined to be the name
+// of an include file that contains typdefs for the desired types.
+//
+// For example, if my-types.h contains typedefs for the Array types
+// you are interested in, you might compile this file with the command
+//
+//   g++ -fexternal-templates -DUSER_EXTERNAL_TEMPLATES \
+//       -DUSER_TYPEDEFS=\"my-types.h\"
+
+#include USER_TYPEDEFS
+
 #endif
 #endif