Gnome::Gda::QueryFieldValue Class Reference

Represents a single value (or a parameter). More...

#include <queryfieldvalue.h>

Inheritance diagram for Gnome::Gda::QueryFieldValue:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~QueryFieldValue ()
GdaQueryFieldValue* gobj ()
 Provides access to the underlying C GObject.
const GdaQueryFieldValue* gobj () const
 Provides access to the underlying C GObject.
GdaQueryFieldValue* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void set_value (const Value& val)
 Sets the value of field , or removes it (if val is 0).
Value get_value () const
 Get the value stored by field .
void set_default_value (const Value& default_val)
 Sets the default value of field , or removes it (if default_val is 0).
Value get_default_value () const
 Get the default value stored by field .
GType get_g_type () const
 Get the GDA type of value stored within field.
void set_is_parameter (bool is_param=true)
 Sets wether field can be considered as a parameter.
bool is_parameter () const
 Tells if field can be considered as a parameter.
void set_not_null (bool not_null=true)
 Sets if a 0 value is acceptable for field .
bool get_not_null () const
 Tells if field can receive a 0 value.
bool is_value_null (const Glib::RefPtr<ParameterList>& context) const
 Tells if field represents a 0 value.
bool restrict (const Glib::RefPtr<DataModel>& model, int col, std::auto_ptr<Glib::Error>& error)
 Restricts the possible values which field can have among the calues stored in model at column col .
void set_dict_type (const Glib::RefPtr<DictType>&type)
 Set the Gda::DictType type of field.
Glib::RefPtr<DictTypeget_dict_type ()
 Get the Gda::DictType type of field.
Glib::RefPtr<const DictTypeget_dict_type () const
 Get the Gda::DictType type of field.

Static Public Member Functions

static Glib::RefPtr<QueryFieldValuecreate (const Glib::RefPtr<Query>& query, GType type)
static Glib::RefPtr<QueryFieldValuecreate (const Glib::RefPtr<Query>& query, const Value& value)

Protected Member Functions

 QueryFieldValue (const Glib::RefPtr<Query>& query, GType type)
 QueryFieldValue (const Glib::RefPtr<Query>& query, const Value& value)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Gda::QueryFieldValuewrap (GdaQueryFieldValue* object, bool take_copy=false)

Detailed Description

Represents a single value (or a parameter).


Constructor & Destructor Documentation

virtual Gnome::Gda::QueryFieldValue::~QueryFieldValue (  )  [virtual]

Gnome::Gda::QueryFieldValue::QueryFieldValue ( const Glib::RefPtr<Query>&  query,
GType  type 
) [protected]

Gnome::Gda::QueryFieldValue::QueryFieldValue ( const Glib::RefPtr<Query>&  query,
const Value value 
) [protected]


Member Function Documentation

static Glib::RefPtr<QueryFieldValue> Gnome::Gda::QueryFieldValue::create ( const Glib::RefPtr<Query>&  query,
const Value value 
) [static]

static Glib::RefPtr<QueryFieldValue> Gnome::Gda::QueryFieldValue::create ( const Glib::RefPtr<Query>&  query,
GType  type 
) [static]

Value Gnome::Gda::QueryFieldValue::get_default_value (  )  const

Get the default value stored by field .

Returns:
The value or 0.

Glib::RefPtr<const DictType> Gnome::Gda::QueryFieldValue::get_dict_type (  )  const

Get the Gda::DictType type of field.

Returns:
The Gda::DictType type.

Reimplemented from Gnome::Gda::EntityField.

Glib::RefPtr<DictType> Gnome::Gda::QueryFieldValue::get_dict_type (  ) 

Get the Gda::DictType type of field.

Returns:
The Gda::DictType type.

Reimplemented from Gnome::Gda::EntityField.

GType Gnome::Gda::QueryFieldValue::get_g_type (  )  const

Get the GDA type of value stored within field.

Returns:
The type.

Reimplemented from Gnome::Gda::EntityField.

bool Gnome::Gda::QueryFieldValue::get_not_null (  )  const

Tells if field can receive a 0 value.

Returns:
true if field can't have a 0 value.

Value Gnome::Gda::QueryFieldValue::get_value (  )  const

Get the value stored by field .

If there is no value, but a default value exists, then the default value is returned.n it's up to the caller to test if there is a default value for field . The default value can be of a different type than the one expected by field .

Returns:
The value or 0.

const GdaQueryFieldValue* Gnome::Gda::QueryFieldValue::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::EntityField.

GdaQueryFieldValue* Gnome::Gda::QueryFieldValue::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::EntityField.

GdaQueryFieldValue* Gnome::Gda::QueryFieldValue::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gnome::Gda::QueryField.

bool Gnome::Gda::QueryFieldValue::is_parameter (  )  const

Tells if field can be considered as a parameter.

Returns:
true if field can be considered as a parameter.

bool Gnome::Gda::QueryFieldValue::is_value_null ( const Glib::RefPtr<ParameterList>&  context  )  const

Tells if field represents a 0 value.

Parameters:
context A Gda::ParameterList object.

bool Gnome::Gda::QueryFieldValue::restrict ( const Glib::RefPtr<DataModel>&  model,
int  col,
std::auto_ptr< Glib::Error > &  error 
)

Restricts the possible values which field can have among the calues stored in model at column col .

Parameters:
model A Gda::DataModel object.
col A valid column in model .
error A place to store errors, or 0.
Returns:
true if no error occurred.

void Gnome::Gda::QueryFieldValue::set_default_value ( const Value default_val  ) 

Sets the default value of field , or removes it (if default_val is 0).

Parameters:
default_val The default value to be set, or 0.

void Gnome::Gda::QueryFieldValue::set_dict_type ( const Glib::RefPtr<DictType>&  type  ) 

Set the Gda::DictType type of field.

Parameters:
type A Gda::DictType object, or 0.

void Gnome::Gda::QueryFieldValue::set_is_parameter ( bool  is_param = true  ) 

Sets wether field can be considered as a parameter.

void Gnome::Gda::QueryFieldValue::set_not_null ( bool  not_null = true  ) 

Sets if a 0 value is acceptable for field .

If not_null is true, then field can't have a 0 value.

void Gnome::Gda::QueryFieldValue::set_value ( const Value val  ) 

Sets the value of field , or removes it (if val is 0).

Parameters:
val The value to be set, or 0.


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::QueryFieldValue> wrap ( GdaQueryFieldValue *  object,
bool  take_copy = false 
) [related]

Parameters:
object The C instance
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated on Sat Feb 10 20:06:42 2007 for libgdamm by  doxygen 1.4.7