[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/docbook/GNUeModuleGuide/chapters businesso...
From: |
Neil Tiffin |
Subject: |
gnue/docbook/GNUeModuleGuide/chapters businesso... |
Date: |
Fri, 04 May 2001 13:31:51 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Neil Tiffin <address@hidden> 01/05/04 13:31:50
Modified files:
docbook/GNUeModuleGuide/chapters: businessobjects.sgml
Log message:
Add date, time, and datetime types. Clean up example formats and
syntax to match coding standards.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml.diff?cvsroot=OldCVS&tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml
diff -u gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml:1.10
gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml:1.11
--- gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml:1.10 Mon Apr
2 16:52:46 2001
+++ gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml Fri May 4
13:31:50 2001
@@ -7,7 +7,7 @@
Introduction
</title>
<para>
- This chapter is $Id: businessobjects.sgml,v 1.10
2001/04/02 23:52:46 ntiffin Exp $.
+ This chapter is $Id: businessobjects.sgml,v 1.11
2001/05/04 20:31:50 ntiffin Exp $.
</para>
<sect2>
<title>
@@ -146,7 +146,7 @@
#
# This file originally written by Neil Tiffin (address@hidden).
#
-# $Revision: 1.10 $ $Date: 2001/04/02 23:52:46 $ $Author: ntiffin $
+# $Revision: 1.11 $ $Date: 2001/05/04 20:31:50 $ $Author: ntiffin $
#
module person {
@@ -196,27 +196,27 @@
</para>
<programlisting>
-MODULE module_name
-{
-CLASS class_name
-{
- # class body goes here.
-};
-};
+ MODULE module_name
+ {
+ CLASS class_name
+ {
+ # class body goes here.
+ };
+ };
Where:
- module_name - the name of the module (or name space).
- class_name - the name of the class (or business object).
-
+ module_name - the name of the module (or name space).
+ class_name - the name of the class (or business object).
+
</programlisting>
<para>
To reference a class in a different module or
from a different class in the same module you must use the fully qualified name
syntax:
</para>
<programlisting>
+
+ module_name::class_name
- module_name::class_name
-
</programlisting>
</sect2>
<sect2>
@@ -296,8 +296,9 @@
</para>
<programlisting>
+Syntax:
<![CDATA[
- type field_name<size> = default_value NOT NULL;
+ type field_name<size> = default_value NOT NULL;
]]>
</programlisting>
@@ -313,7 +314,7 @@
</listitem>
<listitem>
<para>
- type - is one of INT, TEXT, FLOAT, or CHAR.
+ type - is one of INT, TEXT, FLOAT, DATE, TIME, DATETIME or CHAR.
</para>
</listitem>
<listitem>
@@ -340,14 +341,12 @@
<programlisting>
<![CDATA[
- MODULE location
- {
+ MODULE location
+ {
CLASS address
{
CHAR street1<25>;
CHAR street2<25>;
- CHAR room<10>; # also called suite
- CHAR floor<10>;
CHAR city<15>;
CHAR county<15>;
CHAR state_code<8>;
@@ -356,7 +355,9 @@
TEXT my_notes;
FLOAT latitude;
FLOAT longitude;
- INT some_number;
+ INT some_number;
+ DATE today;
+ TIME now;
};
};
@@ -377,9 +378,15 @@
of 1 if not specified. Any trailing space (ASCII 32) characters are
removed.
</para>
+<para>
+ INT - Integer number currently implemented in 32 bits.
+</para>
<para>
- INT - are currently implemented as 32 bit integers.
+ DATE - Date formatted for the underlaying sql database.
</para>
+<para>
+ TIME - Time formatted for the underlaying sql database.
+</para>
</sect2>
<sect2>
<title>
@@ -393,8 +400,10 @@
<programlisting>
<![CDATA[
- TYPE type_name
- {
+Syntax:
+
+ TYPE type_name
+ {
};
@@ -425,7 +434,7 @@
<![CDATA[
CLASS item
- {
+ {
int cost_amount;
char cost_currency<25>;
char desc<25>;
@@ -447,7 +456,8 @@
<programlisting>
<![CDATA[
- TYPE new_type = base_type<size>; (NOT IMPLEMENTED YET)
+Syntax:
+ TYPE new_type = base_type<size>; (NOT IMPLEMENTED YET)
]]>
Where:
@@ -473,8 +483,8 @@
<programlisting>
<![CDATA[
- MODULE inventory
-
+ MODULE inventory
+
TYPE product_code = char<25>;
TYPE product_class = char<8>;
@@ -509,7 +519,7 @@
To reference types from another module use the fully qualified name.
For example:
</para>
<programlisting>
- inventory::product_code
+ inventory::product_code
</programlisting>
</sect2>
@@ -531,9 +541,9 @@
can be defined where a field is defined in the class definition.
</para>
<programlisting>
- The syntax is:
-
-LOOKUP new_fld_name : src_class(src_fld).src_data = comp_field;
+Syntax:
+
+ LOOKUP new_fld_name : src_class(src_fld).src_data = comp_field;
Where:
new_fld_name - is the new field name for reference in the class. It
@@ -562,7 +572,7 @@
syntax is nearly the same as LOOKUP.
</para>
<programlisting>
- REFERENCE new_fld_name : src_class(src_field) = comp_field;
+ REFERENCE new_fld_name : src_class(src_field) = comp_field;
Where:
new_fld_name - is the new field name for reference in the class. It
@@ -622,7 +632,7 @@
</para>
<programlisting>
- LIST new_fld_name : src_class(src_field) = comp_field;
+ LIST new_fld_name : src_class(src_field) = comp_field;
Where:
new_fld_name - is the new field name for reference in the class. It
@@ -680,8 +690,8 @@
</para>
<programlisting>
- return_type method_name(arg_type arg_name);
-
+ return_type method_name(arg_type arg_name);
+
Where:
return_type - the type (CHAR, INT, FLOAT) of the returned value,
if any. The only type currently working is CHAR.
@@ -701,8 +711,9 @@
</para>
<programlisting>
- class test {
- char callme( int a , int b );
+ class test
+ {
+ char callme( int a , int b );
};
@@ -759,7 +770,8 @@
</para>
<programlisting>
- CLASS class_name : parent1_class, parent2_class {
+ CLASS class_name : parent1_class, parent2_class
+ {
};
- gnue/docbook/GNUeModuleGuide/chapters businesso...,
Neil Tiffin <=
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/07
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/19
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/19
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/19
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/24
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/27
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/31