My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef _Gen_VTypes_h_
#define _Gen_VTypes_h_

#include <Core/Core.h>
#include <CtrlCore/CtrlCore.h>

NAMESPACE_UPP

const dword LOGPOS_V = 97;
template<> inline dword ValueTypeNo(const Ctrl::LogPos*) { return LOGPOS_V; }

template<> inline bool IsNull(const Ctrl::LogPos& l) { return l.x.IsEmpty() || l.y.IsEmpty(); }
template<> inline void SetNull(Ctrl::LogPos& l) { l.x = l.y = Ctrl::Logc(); }

inline Ctrl::LogPos Nvl(Ctrl::LogPos a, Ctrl::LogPos b) { return IsNull(a) ? b : a; }
inline Ctrl::LogPos Nvl(Ctrl::LogPos a) { return Nvl(a, Ctrl::LogPos()); }

template<> inline unsigned ValueGetHashValue(const Ctrl::LogPos& l) {
CombineHash ch;
ch << l.x.GetAlign() << l.x.GetA() << l.x.GetB();
ch << l.y.GetAlign() << l.y.GetA() << l.y.GetB();
return ch;
}

inline bool operator==(const Value& v, const Ctrl::LogPos& x) { return RichValue<Ctrl::LogPos>::Extract(v) == x; }
inline bool operator==(const Ctrl::LogPos& x, const Value& v) { return RichValue<Ctrl::LogPos>::Extract(v) == x; }
inline bool operator!=(const Value& v, const Ctrl::LogPos& x) { return RichValue<Ctrl::LogPos>::Extract(v) != x; }
inline bool operator!=(const Ctrl::LogPos& x, const Value& v) { return RichValue<Ctrl::LogPos>::Extract(v) != x; }

template<> String AsString(const Ctrl::LogPos& pos);

template<> Stream& operator%(Stream& s, Ctrl::LogPos& pos);
template<> void Xmlize(XmlIO& xml, Ctrl::LogPos& pos);
template<> void Jsonize(JsonIO& jio, Ctrl::LogPos& pos);

END_UPP_NAMESPACE

#endif

Change log

r4667 by kohait on Mar 7, 2012   Diff
Gen: Jsonize compile add for Ctrl::LogPos
Go to: 
Project members, sign in to write a code review

Older revisions

r4592 by kohait on Feb 13, 2012   Diff
bazaar: Gen, VTypes, Tree: recent
Xmlize changes port
r3820 by kohait on Sep 4, 2011   Diff
various fixes and reworks
bazaar: Gen: Ctrl::LogPos RichValue
expose (needs my forum patch with
template<> SetNull);
WhitEnterAction: fixes LostFocus
...
All revisions of this file

File info

Size: 1574 bytes, 38 lines
Powered by Google Project Hosting