Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> [Q] static data-members (C++) and "static" rows (Oracle)?

[Q] static data-members (C++) and "static" rows (Oracle)?

From: Alex Vinokur <alexander.vinokur_at_telrad.co.il>
Date: Wed, 23 Jun 1999 11:30:30 GMT
Message-ID: <7kqggn$4bt$1@nnrp1.deja.com>

Hi,

Is there in Oracle tables something like

        static data-members in C++ classes?

Example.
Here is a C++ class.

//===================================

#include <string>
class AAA
{
        private :
                int             a1;
                string          a2;
                static int      a3;
                static string   a4;

        public :
                AAA (int a1_i, const string& a2_i)

{
a1 = a1_i; a2 = a2_i; } static void set_a3 (int a3_i)
{
a3 = a3_i; } static void set_a4 (const string& a4_i)
{
a4 = a4_i; } // omitted }; int AAA::a1 (0);

string AAA::a2;

int main ()
{

AAA i1 (100, "Paris");
AAA i2 (50, "London");
AAA i2 (123, "Madrid");
AAA i4 (100, "London");

        AAA::set_a3 (222);
        AAA::set_a4 ("USA");


};
// omitted

//===================================

Using Pro*C/C++ Precompiler I would like to create table that contains
        data of all instances of the AAA class and
        data of all static data-members.

I can to create the following table :

        Table "AAA-instances"



| a1 | a2 | a3 | a4 |
|    100 | Paris  | 222    | USA    |
|     50 | London | 222    | USA    |
|    123 | Madrid | 222    | USA    |
|    100 | London | 222    | USA    |
-------------------------------------

But values in a3 and a4 columns are the same values in all tables (because a3 and a5 are static data members of the AAA class).

Is there any possibility in Oracle

        not to store static data
        in each row of the "AAA-instances" table?

=================================

Server : Oracle8
Development Platform : Pro*C/C++
        Thanks in advance,
                Alex









Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Jun 23 1999 - 06:30:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US