home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1996 November
/
VPR9611B.ISO
/
vabasic
/
ntclnt.exe
/
DISK8
/
data.8
/
datab
/
INCLUDE
/
PROPVAL.HH
< prev
next >
Wrap
Text File
|
1996-07-29
|
3KB
|
96 lines
//------------------------------------------------------------------------
// $Source: /rcs/crcs/framework/propval.hh,v $
// Checked in by: $Author: cc $
// $Date: 1995/11/11 00:02:30 $ $Revision: 1.5 $
//------------------------------------------------------------------------
// Copyright(c) 1993, Visual Edge Software Ltd.
//
// ALL RIGHTS RESERVED. This notice is intended as a precaution
// against inadvertent publication, and shall not be deemed to
// constitute an acknowledgment that publication has occurred
// nor to imply any waiver of confidentiality. The year included
// in the notice is the year of the creation of the work.
//------------------------------------------------------------------------
// DESCRIPTION: Class VePropertyList and VePropValuePair
//------------------------------------------------------------------------
#ifndef PROPVAL_HH
#define PROPVAL_HH
#include <visedge.hh>
#include <dllclass.hh>
#include <vstring.hh>
#include <srctext.hh>
VCLASS VePropValuePair;
#ifdef NOTEMPLATES
# ifndef VPropValuePairListDefined
# define VPropValuePairListDefined
# define CLASSNAME VePropValuePairList
# define ENTRYTYPE VePropValuePair *
# include <mst/varray.mst>
# endif
#else
# include <varray.hh>
typedef VeArray<VePropValuePair *> VePropValuePairList;
#endif
//------------------------------------------------------------------
// Class VePropertyList maintains a list of VPropValuePairs.
// VePropertyList is reference counted.
//------------------------------------------------------------------
VCLASS VePropertyList : public VeDllBasedClass
{
public:
VOPERDECL VePropertyList();
VOPERDECL VePropertyList(VePropValuePair);
VOPERDECL VePropertyList(const VePropertyList &);
VOPERDECL ~VePropertyList();
VMETHODDECL(VePropValuePair &) operator[](unsigned int i);
VMETHODDECL(VePropertyList&) operator= (const VePropertyList &other);
VMETHODDECL(unsigned int) Count() const;
VMETHODDECL(VePropValuePair) AddLast(VePropValuePair);
private:
//-----------------------------------------------------
// The actual data is shared as often as possible.
//-----------------------------------------------------
struct ObjectData {
unsigned int refcount;
VePropValuePairList propvals;
} * itsRep;
};
//-------------------------------------------------------------------
// Class VePropValuePair keeps a property-value pair.
//------------------------------------------------------------------
VCLASS VePropValuePair : public VeDllBasedClass
{
public:
VOPERDECL VePropValuePair(const char *name, VeSourceText val);
VOPERDECL VePropValuePair(const VePropValuePair &propval);
VOPERDECL VePropValuePair();
VOPERDECL ~VePropValuePair();
VMETHODDECL(VePropValuePair &) operator=(const VePropValuePair &);
VMETHODDECL(const char *) Name() const;
VMETHODDECL(VeSourceText) Value() const;
private:
struct ObjectData {
unsigned int refcount;
VeString name;
VeSourceText value;
} *itsRep;
};
#endif //PROPVAL_HH