class DfcColumn : public DfcColumnInterface


Inheritance:


Public Methods

void addImplementation (int tableId, int columnId)
DfcColumn* clone (void)
void deselect (void)
DfcColumn ( const DfcColumnInterface::TYPE type, const RWString &newName, int numRows, DFC_BOOL regularlySampled )
DfcColumn ( const DfcColumnInterface::TYPE type, const RWString &name, const DFC_EXPRESSION &expr, int numRows, DFC_BOOL onTheFly = DFC_TRUE )
DfcColumn ( DfcColumnInterface *other )
DfcColumn ( const DfcColumn &other )
DfcColumn (void)
char getAsChar (int whichElement = 0)
DfcCoordSys getAsCoordSys (int whichElement = 0)
double getAsDouble (int whichElement = 0)
double getAsDouble ( const DfcVector<int> &position )
DfcEnumerated getAsEnumerated (int whichElement = 0)
float getAsFloat (int whichElement = 0)
DfcFrameRef getAsFrameRef (int whichElement = 0)
int getAsInt (int whichElement = 0)
long getAsLong ( const DfcVector<int> &position )
long getAsLong (int whichElement = 0)
short getAsShort (int whichElement = 0)
RWString getAsString (int whichElement = 0)
DfcTableRef getAsTableRef (int whichElement = 0)
DfcTarget getAsTarget (int whichElement = 0)
DfcTime getAsTime (int whichElement = 0)
unsigned char getAsUchar (int whichElement = 0)
DfcVector <int> getDimensions (void)
DfcKeyword* getKeywords (void)
RWString getName (void)
char getNullValueAsChar (void)
DfcCoordSys getNullValueAsCoordSys (void)
double getNullValueAsDouble (void)
DfcEnumerated getNullValueAsEnumerated (void)
DfcFrameRef getNullValueAsFrameRef (void)
RWString getNullValueAsString (void)
DfcTableRef getNullValueAsTableRef (void)
DfcTarget getNullValueAsTarget (void)
DfcTime getNullValueAsTime (void)
int getNumPoints (void)
int getNumRows (void)
DfcColumn* getSafeInterface (void)
DfcColumnInterface::TYPE getType (void)
DFC_BOOL isNullValueSet (void)
DFC_BOOL isSelected (void)
DFC_BOOL openForRead (void)
DFC_BOOL openForUpdate (void)
DfcVector <DFC_BOOL> operator!= (double value)
DfcVector <DFC_BOOL> operator!= (const DfcCoordSysInterface &value)
DfcVector <DFC_BOOL> operator!= (DfcTableRef &value)
DfcVector <DFC_BOOL> operator!= (const DfcTargetInterface &value)
DfcVector <DFC_BOOL> operator!= (const DfcTimeInterface &value)
DfcVector <DFC_BOOL> operator!= (const DfcEnumeratedInterface &value)
DfcVector <DFC_BOOL> operator!= (DfcFrameRef &value)
DFC_BOOL operator!= (const DfcColumn &other)
DfcVector <DFC_BOOL> operator!= (char value)
DfcVector <DFC_BOOL> operator!= (const RWString &value)
DfcVector <DFC_BOOL> operator< (const DfcCoordSysInterface &value)
DfcVector <DFC_BOOL> operator< (const RWString &value)
DfcVector <DFC_BOOL> operator< (const DfcEnumeratedInterface &value)
DfcVector <DFC_BOOL> operator< (const DfcTimeInterface &value)
DfcVector <DFC_BOOL> operator< (DfcFrameRef &value)
DfcVector <DFC_BOOL> operator< (const DfcTargetInterface &value)
DfcVector <DFC_BOOL> operator< (DfcTableRef &value)
DfcVector <DFC_BOOL> operator< (double value)
DfcVector <DFC_BOOL> operator< (char value)
DfcVector <DFC_BOOL> operator<= (const DfcTimeInterface &value)
DfcVector <DFC_BOOL> operator<= (DfcFrameRef &value)
DfcVector <DFC_BOOL> operator<= (const DfcCoordSysInterface &value)
DfcVector <DFC_BOOL> operator<= (double value)
DfcVector <DFC_BOOL> operator<= (const DfcEnumeratedInterface &value)
DfcVector <DFC_BOOL> operator<= (const DfcTargetInterface &value)
DfcVector <DFC_BOOL> operator<= (char value)
DfcVector <DFC_BOOL> operator<= (DfcTableRef &value)
DfcVector <DFC_BOOL> operator<= (const RWString &value)
DfcColumn& operator= (const DfcColumnInterface &other)
DfcVector <DFC_BOOL> operator== (const DfcTargetInterface &value)
DfcVector <DFC_BOOL> operator== (const RWString &value)
DfcVector <DFC_BOOL> operator== (const DfcEnumeratedInterface &value)
DfcVector <DFC_BOOL> operator== (DfcFrameRef &value)
DfcVector <DFC_BOOL> operator== (DfcTableRef &value)
DfcVector <DFC_BOOL> operator== (char value)
DfcVector <DFC_BOOL> operator== (const DfcTimeInterface &value)
DfcVector <DFC_BOOL> operator== (const DfcCoordSysInterface &value)
DfcVector <DFC_BOOL> operator== (double value)
DfcVector <DFC_BOOL> operator> (DfcTableRef &value)
DfcVector <DFC_BOOL> operator> (const DfcTargetInterface &value)
DfcVector <DFC_BOOL> operator> (double value)
DfcVector <DFC_BOOL> operator> (const RWString &value)
DfcVector <DFC_BOOL> operator> (const DfcTimeInterface &value)
DfcVector <DFC_BOOL> operator> (const DfcEnumeratedInterface &value)
DfcVector <DFC_BOOL> operator> (const DfcCoordSysInterface &value)
DfcVector <DFC_BOOL> operator> (char value)
DfcVector <DFC_BOOL> operator> (DfcFrameRef &value)
DfcVector <DFC_BOOL> operator>= (char value)
DfcVector <DFC_BOOL> operator>= (const DfcTimeInterface &value)
DfcVector <DFC_BOOL> operator>= (const RWString &value)
DfcVector <DFC_BOOL> operator>= (DfcFrameRef &value)
DfcVector <DFC_BOOL> operator>= (const DfcCoordSysInterface &value)
DfcVector <DFC_BOOL> operator>= (DfcTableRef &value)
DfcVector <DFC_BOOL> operator>= (double value)
DfcVector <DFC_BOOL> operator>= (const DfcTargetInterface &value)
DfcVector <DFC_BOOL> operator>= (const DfcEnumeratedInterface &value)
void proxyIsDead (void)
DFC_BOOL save (void)
void saveAsMidas (int fileId)
void select (void)
void set ( const DfcVector<int> &position, long newVal )
void set (long newValue, int whichElement = 0)
void set ( int whichPosition, long newVal )
void set (short newValue, int whichElement = 0)
void set (float newValue, int whichElement = 0)
void set (double newValue, int whichElement = 0)
void set ( const DfcVector<int> &position, double newVal )
void set (unsigned char newValue, int whichElement = 0)
void set ( int whichPosition, double newVal )
void set (int newValue, int whichElement = 0)
void setAsChar (char newValue, int whichElement = 0)
void setAsCoordSys (const DfcCoordSysInterface &newValue, int whichElement = 0)
virtual void setAsEnumerated (const DfcEnumeratedInterface &newValue, int whichElement = 0)
void setAsFrameRef (DfcFrameRef &newValue, int whichElement = 0)
void setAsString (const RWString &newValue, int whichElement = 0)
void setAsTableRef (DfcTableRef &newValue, int whichElement = 0)
void setAsTarget (const DfcTargetInterface &newValue, int whichElement = 0)
void setAsTime (const DfcTimeInterface &newValue, int whichElement = 0)
void setName ( const RWString &newName )
void setNullValueAsChar (char newValue)
void setNullValueAsCoordSys (const DfcCoordSysInterface &newValue)
void setNullValueAsDouble ( double newValue )
void setNullValueAsEnumerated (const DfcEnumeratedInterface &newValue)
void setNullValueAsFrameRef (DfcFrameRef &newValue)
void setNullValueAsString (const RWString &newValue)
void setNullValueAsTableRef (DfcTableRef &newValue)
void setNullValueAsTarget (const DfcTargetInterface &newValue)
void setNullValueAsTime (const DfcTimeInterface &newValue)
void unsetNullValue (void)
virtual ~DfcColumn ()
Dtor. Free memory

Public


Purpose
Greater than operator for Columns of ints against a single int value

Purpose
TEMPORARY METHOD added to assist in the Midas implementation

Purpose
Copy constructor

Purpose
Copy constructor

Purpose
Constructor for DfcScalarColumn

Purpose
Constructor

Purpose
Returns the dimensions of the thing we are dealing with

Purpose
Obtain the number of rows in the Column

Purpose
Sets the representation of the Null Value for this Column

Purpose
Returns the Columns internal representation for a Null Value

Purpose
Remove any current setting of the null value for this Column

Purpose
Indicates whether the null value representation has been set and is being used or not

Purpose
Returns the status of the Column, whether it is currently selected or not

Purpose
A Column can be either selected or not

Purpose
A Column can be either Selcted or not

Purpose
Accessor for the name of the Column;

Returns
Returns a copy of the name of the Column


Purpose
Sets the name for the Column

Exceptions

  • DfcAlreadyExistsExc - this Column is part of a table and the new name already exists in that table

Purpose
Accessor method for the type of data that is held in the Column

Purpose
Less than operator for Columns of Type against a single value

VLT On-line Data Flow, Subsystem: df-core
$Id: DfcColumn

Purpose
Comparison operator for Columns of ints against a single int value

Purpose
Comparison operator for Columns of ints against a single int value

Purpose
Comparison operator for Columns of ints against a single int value

Purpose
Comparison operator for Columns of ints against a single int value

Another temporary measure made necessary by the use of the nullColumn in DfcTable

Purpose
Obtain a data value as double

Purpose
Obtain a data value as int

Purpose
Set a data value as double

Purpose
Set a data value as an int

Purpose
Return the Keywords associated with this Column

Purpose
Make a copy of this object

Purpose
Perform a shallow copy of the Column

Purpose
In a distributed system this method will load the Column object that has been created on the local machine with the information from the Image Repository

Purpose
Intended to be used when the classes go distributed

Purpose
One of the methods that will be used when the classes are distributed

Purpose
Return a pointer to the actual object that this object refers to, if it is a proxy

Protected


Purpose
Default constructor

Purpose
Tells the column to save itself

Private Fields


The real object that this proxy referes to
DfcColumnInterface* realOne
Purpose
Informs this object that its proxy object has been deleted

Documentation

VLT On-line Data Flow, Subsystem: df-core
$Id: DfcColumn.h,v 1.1 1997/05/15 07:45:31 dataflow Exp $

DESCRIPTION
A Column contains an ordered sequence of data. The data in a single Column should all be of a single type.
DfcColumn is actually a proxy class in order to make the complexity of the implementation details less obvious to the user.
CAUTIONS

EXAMPLES

    DfcColumn mycol = myTable.getColumn(2); 
  
  try 
  { 
        for (int loop = 0; loop < mycol.getNumRows(); loop++) 
    { 
      cout << myCol.DELETEME(loop) << endl;  
    } 
  } 
  catch(DfcTypeExc e) 
  { 
    cerr << "Column does not hold scalar values\n"; 
  } 

          {
    myTable.select(myTable.getColumn("observer") == "bob");
  }
  catch (DfcTypeExc e)
  {
    cerr << "Column doesn't contain string data\n";
  }
  try
  {
    for (int loop = 0; loop < myCol.getNumRows(); loop++)
    {
      if (myTable.isRowSelected(loop))
      {
        cout << myCol.DELETEME(loop) << endl;
      }
    }
  }
  catch(DfcTypeExc e)
  {
    cerr << "Column does not hold scalar values\n";
  }
  
    try
  {
    DfcCoordSysInterfaceZPA coordObject = myColumn.getAsCoordSys();
                    DfcCoordSysInterfaceTAN tanProjection = myColumn.getAsCoordSys();
  } 
  catch(DfcTypeExce e) 
  { 
    cerr << "Column doesn't contain DfcCoordSysInterface objects\n"; 
  } 
  

DESIGN DECISIONS
DfcColumn contains a fat interface, meaning all the methods of all subclasses are defined whether they are relevant or not. For example we have get() methods for every type of Column that can exist. Of course, this may not be possible in some cases. For example if we have a Column of integers and we invoke getAsCoord(). This method will then throw an exception. This is not an ideal situation as it probably means a LOT of code for checking types or, if a lazy programmer starts to use it, very unsafe code. However, there is no way around it given the requirements - the nature of the objects is not service oriented, it is data oriented.
One nice touch that minimises the concern over types is by allowing conversions where possible between types. For example, if we have a Column that contains Time objects, we can disregard the actual type of Time object by conerting between them and providing the user with whatever type they require. See the examples for more info.
Unfortunately now that we are not dealing with parameterised types explicitly through the use of proxy classes as in the previous design, there is a need to make all the operators explicit in the base class. It can be seen that there are a horrific number of operators now, a set for each type of Column.
Various compromises have been attempted in the course of this rewoek of the design for example, only access methods are provided in this class. To access the rest of the functionality the user must cast down to the appropriate type. Then a proxy class should be reintroduced to make the casting safe. Then we are dealing with template classes again, which was frowned upon. So I would have to create inmstantiations ofthe proxy class - basically just typedef it. Then the user has to use the Info class and the data class again like in the previous design. However, in my mind this seperation doesn't stand up any more when data can be accessed from the base class, it doesn't make sense to have to downcast in the hierarchy in order to be able to access certain methods. So I have completely abandoned this idea and instead opted for the full set of methods in the base class. The implications of this are:
1 - the interface is very large as can be seen. This makes it difficult to find a method that you suspect should be there.
2 - maintenance is therefore harder, even though the methods are very simple, the organisational aspect of the classes is more difficult especially if we ever wish to add in more Column types.
3 - exceptions will have to be generated when the user attempts to use inappropriately typed methods for a class eg if we select all rows where the contents of the row is less than 5, but the contents are actually Frame References. There's either going to be a lot of exception processing (and the current iplementation of exceptions in g++ seems dodgy) or there's going to be a lot of non-OO switch-on-type style code written by the users.

Also it should be noted that for scalar types it is not possible to do transparent overloading because of the following problem: eg
DFC_BOOL operator<(float value) const;
DFC_BOOL operator<(double value) const;
..because if we port to an architecture where 64 bit reals are not supported we would have to make double a 32 bit real ie the same as float which then means the code won't compile as we are trying to declare a method twice.
Therefore all operators involving scalar data will be done to double precision only which may lead to some ugly casting in the user code.

DfcColumn( const DfcColumn &other )

Purpose
Copy constructor. Only perform a shallow copy, in this case it means that the actual data will be shared between the original and the new copy, in effect pretty useless really.

Exceptions

  • DfcMemoryExc - there wasn't enough memory on the local machine to make a copy.
  • DfcAlreadyOpenExc - the Column is already opened for update and therefore a copy can't be made.

Arguments

DfcColumn( DfcColumnInterface *other )

Purpose
Copy constructor. Only perform a shallow copy, in this case it means that the actual data will be shared between the original and the new copy, in effect pretty useless really.

Exceptions

  • DfcMemoryExc - there wasn't enough memory on the local machine to make a copy.
  • DfcAlreadyOpenExc - the Column is already opened for update and therefore a copy can't be made.

Arguments

DfcColumn( const DfcColumnInterface::TYPE type, const RWString &newName, int numRows, DFC_BOOL regularlySampled )

Purpose
Constructor for DfcScalarColumn.

Exceptions

  • DfcMemoryExc - there wasn't enough memory to create this column with the desired space.

Arguments

DfcColumn( const DfcColumnInterface::TYPE type, const RWString &name, const DFC_EXPRESSION &expr, int numRows, DFC_BOOL onTheFly = DFC_TRUE )

Purpose
Constructor. Creates values for the Column entries based upon the provided ewxpression. The values can either be constructed all at once or on the fly. If they are created on the fly and an attempt is made to write to the Column then the column will be made into a regularly sampled column, transparently to the user.

Exceptions

  • DfcMemoryExc - there wasn't enough memory to create this column with the desired space.
  • DfcInvalidExpExc - the provided expression was not valid.

Arguments

virtual ~DfcColumn()
Dtor. Free memory

DfcVector <int> getDimensions(void)

Purpose
Returns the dimensions of the thing we are dealing with. Implements part of the interface inherited from DfcNumericalInterface

Returns
The dimensions of the structure. Rather than raise an exception if something non-numeric is being accessed (ie a KeywordStructure, or a Column of Frames, the Dimensions returned will be zero.

int getNumPoints(void)

void set( int whichPosition, double newVal )

void set( int whichPosition, long newVal )

int getNumRows(void)

Purpose
Obtain the number of rows in the Column

void setNullValueAsDouble( double newValue )

Purpose
Sets the representation of the Null Value for this Column. Note that this is particularly dangerous for Columns of scalars. If the internal representation of data is of type int, and we set a null value that is a double, we lose a lot of accuracy and the null value then covers more range than perhaps was desired.

Exceptions


  • DfcTypeExc - the actual data contained in the Column is such that it does not make sense to have a null value that is a double.

Arguments

double getNullValueAsDouble(void)

Purpose
Returns the Columns internal representation for a Null Value. I have decided not to throw an exception if a get() is made on a Null value as this will encourage people to use exceptions for flow control rather than for error handling.

Returns
The current representation of the Null value.

Exceptions

  • DfcTypeExc - it is not possible to express the type of the Column as a double.

void setNullValueAsCoordSys(const DfcCoordSysInterface &newValue)

DfcCoordSys getNullValueAsCoordSys(void)

void setNullValueAsTime(const DfcTimeInterface &newValue)

DfcTime getNullValueAsTime(void)

void setNullValueAsFrameRef(DfcFrameRef &newValue)

DfcFrameRef getNullValueAsFrameRef(void)

void setNullValueAsString(const RWString &newValue)

RWString getNullValueAsString(void)

void setNullValueAsTableRef(DfcTableRef &newValue)

DfcTableRef getNullValueAsTableRef(void)

void setNullValueAsChar(char newValue)

char getNullValueAsChar(void)

void setNullValueAsEnumerated(const DfcEnumeratedInterface &newValue)

DfcEnumerated getNullValueAsEnumerated(void)

void setNullValueAsTarget(const DfcTargetInterface &newValue)

DfcTarget getNullValueAsTarget(void)

void unsetNullValue(void)

Purpose
Remove any current setting of the null value for this Column

DFC_BOOL isNullValueSet(void)

Purpose
Indicates whether the null value representation has been set and is being used or not. It may be concievable in some situations that it isn't desirable to waste a possibly valid value on a null representation.

Returns
A Boolean stating whether the Null value representation has been set or not.

DFC_BOOL isSelected(void)

Purpose
Returns the status of the Column, whether it is currently selected or not.

Returns
Status of the Column, selected or not.

void select(void)

Purpose
A Column can be either selected or not. This method tells a Column that it is selected. A Column is not selected by default.

void deselect(void)

Purpose
A Column can be either Selcted or not. This method informs the Column that it is not selected. A Column is not selected by default.

RWString getName(void)

Purpose
Accessor for the name of the Column;

Returns
Returns a copy of the name of the Column. Actually copies the name rather than returning a reference in order to make sure we don't have any dangling pointers or references later.

void setName( const RWString &newName )

Purpose
Sets the name for the Column

Exceptions

  • DfcAlreadyExistsExc - this Column is part of a table and the new name already exists in that table. If this exception is raised then the name of the Column stays as it was.

Arguments

DfcColumnInterface::TYPE getType(void)

Purpose
Accessor method for the type of data that is held in the Column.

Returns
Returns an indication of the type of data that is held in the Columns.

DfcVector <DFC_BOOL> operator<(double value)

Purpose
Less than operator for Columns of Type against a single value. The Column will perform the comparison against every single value contained in the Column returning a boolean value for every entry indicating whether the coimparison was true or false.

Arguments

  • value - the value to compare each entry in the column against.

Returns
A vector of booleans. The length of this vector is the same as the Column. Each entry in the vector indicates whether the corresponding entry in the Column passed the comparison or not.

Exceptions

  • DfcTypeExc - the type presented as an argument cannot be compared against the actual type of the Column.

DfcVector <DFC_BOOL> operator>(double value)

Purpose
Greater than operator for Columns of ints against a single int value. The Column will perform the comparison against every single int contained in the Column returning a boolean value for every entry indicating whether the coimparison was true or false.

Arguments

  • value - the integer value to compare each entry in the column against.

Returns
A vector of booleans. The length of this vector is the same as the Column. Each entry in the vector indicates whether the corresponding entry in the Column passed the comparison or not.

Exceptions

  • DfcTypeExc - the type presented as an argument cannot be compared against the actual type of the Column.

DfcVector <DFC_BOOL> operator>=(double value)

Purpose
Comparison operator for Columns of ints against a single int value. The Column will perform the comparison against every single int contained in the Column returning a boolean value for every entry indicating whether the coimparison was true or false.

Arguments

  • value - the integer value to compare each entry in the column against.

Returns
A vector of booleans. The length of this vector is the same as the Column. Each entry in the vector indicates whether the corresponding entry in the Column passed the comparison or not.

Exceptions

  • DfcTypeExc - the type presented as an argument cannot be compared against the actual type of the Column.

DfcVector <DFC_BOOL> operator<=(double value)

Purpose
Comparison operator for Columns of ints against a single int value. The Column will perform the comparison against every single int contained in the Column returning a boolean value for every entry indicating whether the coimparison was true or false.

Arguments

  • value - the integer value to compare each entry in the column against.

Returns
A vector of booleans. The length of this vector is the same as the Column. Each entry in the vector indicates whether the corresponding entry in the Column passed the comparison or not.

Exceptions

  • DfcTypeExc - the type presented as an argument cannot be compared against the actual type of the Column.

DfcVector <DFC_BOOL> operator==(double value)

Purpose
Comparison operator for Columns of ints against a single int value. The Column will perform the comparison against every single int contained in the Column returning a boolean value for every entry indicating whether the coimparison was true or false.

Arguments

  • value - the integer value to compare each entry in the column against.

Returns
A vector of booleans. The length of this vector is the same as the Column. Each entry in the vector indicates whether the corresponding entry in the Column passed the comparison or not.

Exceptions

  • DfcTypeExc - the type presented as an argument cannot be compared against the actual type of the Column.

DfcVector <DFC_BOOL> operator!=(double value)

Purpose
Comparison operator for Columns of ints against a single int value. The Column will perform the comparison against every single int contained in the Column returning a boolean value for every entry indicating whether the coimparison was true or false.

Arguments

  • value - the integer value to compare each entry in the column against.

Returns
A vector of booleans. The length of this vector is the same as the Column. Each entry in the vector indicates whether the corresponding entry in the Column passed the comparison or not.

Exceptions

  • DfcTypeExc - the type presented as an argument cannot be compared against the actual type of the Column.

DfcVector <DFC_BOOL> operator<(const DfcCoordSysInterface &value)

DfcVector <DFC_BOOL> operator<=(const DfcCoordSysInterface &value)

DfcVector <DFC_BOOL> operator>(const DfcCoordSysInterface &value)

DfcVector <DFC_BOOL> operator>=(const DfcCoordSysInterface &value)

DfcVector <DFC_BOOL> operator==(const DfcCoordSysInterface &value)

DfcVector <DFC_BOOL> operator!=(const DfcCoordSysInterface &value)

DfcVector <DFC_BOOL> operator<(const DfcTimeInterface &value)

DfcVector <DFC_BOOL> operator<=(const DfcTimeInterface &value)

DfcVector <DFC_BOOL> operator>(const DfcTimeInterface &value)

DfcVector <DFC_BOOL> operator>=(const DfcTimeInterface &value)

DfcVector <DFC_BOOL> operator==(const DfcTimeInterface &value)

DfcVector <DFC_BOOL> operator!=(const DfcTimeInterface &value)

DfcVector <DFC_BOOL> operator<(DfcFrameRef &value)

DfcVector <DFC_BOOL> operator<=(DfcFrameRef &value)

DfcVector <DFC_BOOL> operator>(DfcFrameRef &value)

DfcVector <DFC_BOOL> operator>=(DfcFrameRef &value)

DfcVector <DFC_BOOL> operator==(DfcFrameRef &value)

DfcVector <DFC_BOOL> operator!=(DfcFrameRef &value)

DfcVector <DFC_BOOL> operator<(const RWString &value)

DfcVector <DFC_BOOL> operator<=(const RWString &value)

DfcVector <DFC_BOOL> operator>(const RWString &value)

DfcVector <DFC_BOOL> operator>=(const RWString &value)

DfcVector <DFC_BOOL> operator==(const RWString &value)

DfcVector <DFC_BOOL> operator!=(const RWString &value)

DfcVector <DFC_BOOL> operator<(DfcTableRef &value)

DfcVector <DFC_BOOL> operator<=(DfcTableRef &value)

DfcVector <DFC_BOOL> operator>(DfcTableRef &value)

DfcVector <DFC_BOOL> operator>=(DfcTableRef &value)

DfcVector <DFC_BOOL> operator==(DfcTableRef &value)

DfcVector <DFC_BOOL> operator!=(DfcTableRef &value)

DfcVector <DFC_BOOL> operator<(char value)

DfcVector <DFC_BOOL> operator<=(char value)

DfcVector <DFC_BOOL> operator>(char value)

DfcVector <DFC_BOOL> operator>=(char value)

DfcVector <DFC_BOOL> operator==(char value)

DfcVector <DFC_BOOL> operator!=(char value)

DFC_BOOL operator!=(const DfcColumn &other)

Another temporary measure made necessary by the use of the nullColumn in DfcTable. I need to be able to ensure that Columns are not equal. This is a real-stop-gap method and will be altered or removed later.

DfcVector <DFC_BOOL> operator<(const DfcEnumeratedInterface &value)

DfcVector <DFC_BOOL> operator<=(const DfcEnumeratedInterface &value)

DfcVector <DFC_BOOL> operator>(const DfcEnumeratedInterface &value)

DfcVector <DFC_BOOL> operator>=(const DfcEnumeratedInterface &value)

DfcVector <DFC_BOOL> operator==(const DfcEnumeratedInterface &value)

DfcVector <DFC_BOOL> operator!=(const DfcEnumeratedInterface &value)

DfcVector <DFC_BOOL> operator<(const DfcTargetInterface &value)

DfcVector <DFC_BOOL> operator<=(const DfcTargetInterface &value)

DfcVector <DFC_BOOL> operator>(const DfcTargetInterface &value)

DfcVector <DFC_BOOL> operator>=(const DfcTargetInterface &value)

DfcVector <DFC_BOOL> operator==(const DfcTargetInterface &value)

DfcVector <DFC_BOOL> operator!=(const DfcTargetInterface &value)

float getAsFloat(int whichElement = 0)

double getAsDouble(int whichElement = 0)

double getAsDouble( const DfcVector<int> &position )

Purpose
Obtain a data value as double. Implements the interface inherited from DfcNumericalInterface.

Returns
A double value.

Exceptions

  • DfcTypeExc - Could not convert the value to an int, for example maybe we're dealing with a Column of Coordinate Systems.
  • DfcBoundsExc - the supplied positionVector specified a point outside the bounds of the container object we're using eg we're looking at a column of 30 elements and tried to access element number 50.
  • DfcDimensionsExc - the position vector had the wrong number of elements in it to specify a point. For example, we're examining a Column and supplied a position Vector that did not have exactly one element in it.

Arguments

unsigned char getAsUchar(int whichElement = 0)

short getAsShort(int whichElement = 0)

int getAsInt(int whichElement = 0)

long getAsLong( const DfcVector<int> &position )

Purpose
Obtain a data value as int. Implements method from DfcNumericalInterface.

Returns
An int value.

Exceptions

  • DfcTypeExc - Could not convert the value to an int, for example maybe we're dealing with a Column of Coordinate Systems.
  • DfcBoundsExc - the supplied positionVector specified a point outside the bounds of the container object we're using eg we're looking at a column of 30 elements and tried to access element number 50.
  • DfcDimensionsExc - the position vector had the wrong number of elements in it to specify a point. For example, we're examining a Column and supplied a position Vector that did not have exactly one element in it.

Arguments

long getAsLong(int whichElement = 0)

char getAsChar(int whichElement = 0)

RWString getAsString(int whichElement = 0)

DfcCoordSys getAsCoordSys(int whichElement = 0)

DfcTime getAsTime(int whichElement = 0)

DfcFrameRef getAsFrameRef(int whichElement = 0)

DfcTableRef getAsTableRef(int whichElement = 0)

DfcEnumerated getAsEnumerated(int whichElement = 0)

DfcTarget getAsTarget(int whichElement = 0)

void set(float newValue, int whichElement = 0)

void set(double newValue, int whichElement = 0)

void set( const DfcVector<int> &position, double newVal )

Purpose
Set a data value as double. Implements method from DfcNumericalInterface.

Exceptions

  • DfcTypeExc - Could not convert the value to an int, for example maybe we're dealing with a Column of Coordinate Systems.
  • DfcBoundsExc - the supplied positionVector specified a point outside the bounds of the container object we're using eg we're looking at a column of 30 elements and tried to access element number 50.
  • DfcDimensionsExc - the position vector had the wrong number of elements in it to specify a point. For example, we're examining a Column and supplied a position Vector that did not have exactly one element in it.

Arguments

void set(unsigned char newValue, int whichElement = 0)

void set(short newValue, int whichElement = 0)

void set(int newValue, int whichElement = 0)

void set(long newValue, int whichElement = 0)

void set( const DfcVector<int> &position, long newVal )

Purpose
Set a data value as an int.

Exceptions

  • DfcTypeExc - Could not convert the value to an int, for example maybe we're dealing with a Column of Coordinate Systems.
  • DfcBoundsExc - the supplied positionVector specified a point outside the bounds of the container object we're using eg we're looking at a column of 30 elements and tried to access element number 50.
  • DfcDimensionsExc - the position vector had the wrong number of elements in it to specify a point. For example, we're examining a Column and supplied a position Vector that did not have exactly one element in it.

Arguments

void setAsChar(char newValue, int whichElement = 0)

void setAsString(const RWString &newValue, int whichElement = 0)

void setAsCoordSys(const DfcCoordSysInterface &newValue, int whichElement = 0)

void setAsTime(const DfcTimeInterface &newValue, int whichElement = 0)

void setAsFrameRef(DfcFrameRef &newValue, int whichElement = 0)

void setAsTableRef(DfcTableRef &newValue, int whichElement = 0)

virtual void setAsEnumerated(const DfcEnumeratedInterface &newValue, int whichElement = 0)

void setAsTarget(const DfcTargetInterface &newValue, int whichElement = 0)

DfcKeyword* getKeywords(void)

Purpose
Return the Keywords associated with this Column.

{large Returns}
A copy of the top level Keyword associated with the Column. This object is a proxy so it doesn't make any diference whether it is treated as a reference or a copy of it is made, both will still alter the Keywords structure. (A reference is not returned beacuse, although it slightly reduces the amount of work to be done, it increases the risk of memory leaks by transferring responsibility of the referenced object to the user.)

DfcColumn* clone(void)

Purpose
Make a copy of this object. Altering the copy will not affect this object in any way. (technical - we make a deep copy of this object.) Any referenced Tables and Images will not be copied however (as they are viewed as referenced objects rather than contained objects (irrelevant of the actual OMT assosciation type)).

Returns
A pointer to the copy of this object. The responsibility for the memory management of this copy now lies with the method invoker.

Exceptions

  • DfcMemoryExc - there was not enough memory on the local machine to perform the copy succesfully.
  • DfcAlreadyOpenExc - the original is opened for update. There can only be one copy of a Column open for update at any one time, therefore the clone() operation has to fail.

Arguments

DfcColumn& operator=(const DfcColumnInterface &other)

Purpose
Perform a shallow copy of the Column. In this case it will create a new Column that contains the same data and the same Keywords as the original. One can debate the usefulness of this, however it is provided for consistency with other objects in the Frame subsystem where this is useful.

Returns
Reference to this object to allow chaining of assignment operators.

Exceptions

  • DfcAlreadyOpenExc - the original is opened for update. There can only be one copy of a Column open for update at any one time, therefore the clone() operation has to fail.

DFC_BOOL openForRead(void)

Purpose
In a distributed system this method will load the Column object that has been created on the local machine with the information from the Image Repository. The Image Repository (at this early stage) is anticipated as being a logical server where all the image information is stored (in reality the information may well be distributed).All Columns are automatically opened with the same permission as the associated Table. However, the data segment of a column is only populated upon access.

Preconditions
A column with the same name as this object exists.

Returns
DFC_BOOL - indicating whether this object has been populated with data or not. Possible reasons for failure is that a Column with the same name as this object does not exist, or that the Column is already opened for update.

Exceptions

  • DfcDoesntExistExc - attempted to open a Column with a name that does not exist.
  • DfcAlreadyOpenExc - the Column is already open. In this case it has been opened for update by somebody else.

DFC_BOOL openForUpdate(void)

Purpose
Intended to be used when the classes go distributed. This will popolute the local object with data and write permission will be granted so that changes may be made and the changes can be saved back to the Image Repository. All Columns are automatically opened with the same permission as the associated Table. However, the data segment of a column is only populated upon access.

Preconditions
The Column is not currently being used anywhere else. It has not been opened for read or for update.

Returns
Boolean indication of whether the open succeeded or not.Possible reasons for failure is that a Column with the same name as this object does not exist, or that the Column is already opened for update, or for read somewhere else.

Exceptions

  • DfcDoesntExistExc - there is no column existing with the name given.
  • DfcAlreadyOpenExc - the Column is currently open for reading or updating somewhere else.

DFC_BOOL save(void)

Purpose
One of the methods that will be used when the classes are distributed. This will allow whatever changes have been made to the Column to be saved, providing it has been opened for update.

Preconditions
The Table that this Column is associated with has been opened for update, not for read.

Returns
DFC_BOOL - an indication of whether the save succeded or not.

Exceptions

  • DfcReadOnlyExc - an attempt was made to save a Column belonging to a Table that was not opened for update. Opening a Table for read does not disable the possibility of changing the local copy, but the changes cannot be saved back to the Image Repository.

DfcColumn* getSafeInterface(void)

Purpose
Return a pointer to the actual object that this object refers to, if it is a proxy.

Returns
A pointer to a DfcKeyword object

void addImplementation(int tableId, int columnId)

Purpose
TEMPORARY METHOD added to assist in the Midas implementation. In a table a column object is created along with the midas implementation and the column object is then given the responsibility for looking after the midas implementation.

void saveAsMidas(int fileId)

Purpose
Tells the column to save itself. This is possibly a temporary method, I'm not sure at the moment. Anyway, it wont impact the users.

DfcColumn(void)

Purpose
Default constructor. Hidden because the user should not create an instance of this class directly. They should create one of the leaf classes in the hierarchy.

void proxyIsDead(void)

DfcColumnInterface* realOne
Purpose
Informs this object that its proxy object has been deleted. This allows it to make sure there are no dangling pointers.

The real object that this proxy referes to


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de