Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

Ref

 

class Ref : private Moveable<Ref

Generic reference to rich Value types and Value. Constructor from various rich Value creates Ref, which then can be used to assign values to original. Note that assigning Ref to Ref assigns the reference, not the value (in this regard, it works more like C++ pointer than C++ reference).

 

 

Public Method List

 

dword GetType() const

Returns the type of referenced variable (same codes as for Value, value itself has VALUE_V type).

 


 

bool IsNull() const

Returns true if referenced variable contains Null.

 


 

template <class Tbool Is() const

Returns true if referenced variable is of type T.

 


 

template <class TT& Get() const

Returns reference to referenced variable (Is<T> must be true, otherwise undefined).

 


 

void SetNull()

Sets Null to referenced variable.

 


 

Value GetValue() const

Returns the content of referenced variable as Value.

 


 

void SetValue(const Value& v)

Sets the content of referenced variable to v.

 


 

operator Value() const

Same as GetValue().

 


 

Value operator~() const

Same as GetValue().

 


 

Ref& operator=(const Value& v)

Same as SetValue(v).

 


 

Ref(String& s)

Ref(WString& s)

Ref(int& i)

Ref(int64& i)

Ref(double& d)

Ref(bool& b)

Ref(Date& d)

Ref(Time& t)

Ref(Value& v)

Support for standard Value types and Value.

 


 

Ref()

Default constructor, constructs empty Ref (no variable referenced, no value can be assigned).

 

Last edit by cxl on 11/03/2013. Do you want to contribute?. T++