yast2-core
Classes | Macros
YCPElement.h File Reference
#include <y2util/MemUsage.h>
#include <iosfwd>
#include <string>
#include <vector>
#include <map>
#include "toString.h"

Go to the source code of this file.

Classes

class  YCPNull
 
class  YCPElementRep
 Abstract base class of all YCP elements. More...
 
class  YCPElement
 Wrapper for YCPElementRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPElementRep with the arrow operator. See YCPElementRep. More...
 

Macros

#define DEF_OPS(name)
 
#define DEF_MEMSIZE(name)
 
#define DEF_COMMON(name, base)
 
#define DEF_COW_OPS(name)
 
#define DEF_COW_COMMON(name, base)
 

Macro Definition Documentation

#define DEF_COMMON (   name,
  base 
)
Value:
DEF_OPS(name) \
friend class YCP##base##Rep; \
public: \
DEF_MEMSIZE(name) \
YCP##name(const YCPNull &n) : YCP##base(n) {} \
protected: \
YCP##name (const YCP##name##Rep *x) : YCP##base(x) {}
#define DEF_OPS(name)
Definition: YCPElement.h:64
#define DEF_MEMSIZE(name)
Definition: YCPElement.h:80
Base class for reference counted objects.
Definition: Rep.h:46
Definition: YCPElement.h:125
#define DEF_COW_COMMON (   name,
  base 
)
Value:
friend class YCP##base##Rep; \
DEF_COW_OPS(name) \
public: \
YCP##name(const YCPNull &n) : YCP##base(n) {} \
protected: \
YCP##name (const YCP##name##Rep *x) : YCP##base(x) {} \
public: \
YCPOrder compare(const YCP##name x) const { \
return (static_cast<const YCP##name##Rep*>(element))->compare(x); \
} \
string toString () const { return element->toString (); } \
std::ostream & toStream (std::ostream & str ) const { \
return element->toStream (str); \
} \
std::ostream & toXml (std::ostream & str, int indent ) const { \
return element->toXml( str, indent ); \
} \
YCPValueType valuetype () const { return (static_cast<const YCP##name##Rep*>(element))->valuetype (); }
#define str
Definition: scanner.cc:997
#define DEF_COW_OPS(name)
Definition: YCPElement.h:93
YCPValueType
Value Type Defines constants for the Value types. The Value type specifies the class the YCPValueRep ...
Definition: YCPValue.h:36
YCPOrder
Definition: YCPValue.h:57
string toString(int d)
Definition: toString.h:38
Base class for reference counted objects.
Definition: Rep.h:46
Definition: YCPElement.h:125
#define DEF_COW_OPS (   name)
Value:
public: \
const YCP##name *operator ->() const { \
return static_cast<const YCP##name *>(this); } \
YCP##name *operator ->() { \
return const_cast<YCP##name *>( \
static_cast<const YCP##name *>(this)); } \
private: \
int operator !() const; \
int operator ==(const YCPElement &) const;
bool operator==(const Pathname &l, const Pathname &r)
Definition: Pathname.h:92
Wrapper for YCPElementRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPElementRep with the arrow operator. See YCPElementRep.
Definition: YCPElement.h:317
#define DEF_MEMSIZE (   name)
#define DEF_OPS (   name)
Value:
public: \
const YCP##name##Rep *operator ->() const { \
return static_cast<const YCP##name##Rep *>(element); } \
YCP##name##Rep *operator ->() { \
return const_cast<YCP##name##Rep *>( \
static_cast<const YCP##name##Rep *>(element)); } \
private: \
int operator !() const; \
int operator ==(const YCPElement &) const;
bool operator==(const Pathname &l, const Pathname &r)
Definition: Pathname.h:92
Wrapper for YCPElementRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPElementRep with the arrow operator. See YCPElementRep.
Definition: YCPElement.h:317
Base class for reference counted objects.
Definition: Rep.h:46

Generated on a sunny day for yast2-core by doxygen 1.8.6