Back to index

unity  6.0.0
Public Member Functions | Private Attributes
unity::variant::BuilderWrapper Class Reference

#include <Variant.h>

List of all members.

Public Member Functions

 BuilderWrapper (GVariantBuilder *builder)
BuilderWrapperadd (char const *name, bool value)
BuilderWrapperadd (char const *name, char const *value)
BuilderWrapperadd (char const *name, std::string const &value)
BuilderWrapperadd (char const *name, int value)
BuilderWrapperadd (char const *name, long int value)
BuilderWrapperadd (char const *name, long long int value)
BuilderWrapperadd (char const *name, unsigned int value)
BuilderWrapperadd (char const *name, long unsigned int value)
BuilderWrapperadd (char const *name, long long unsigned int value)
BuilderWrapperadd (char const *name, float value)
BuilderWrapperadd (char const *name, double value)
BuilderWrapperadd (char const *name, GVariant *value)
BuilderWrapperadd (nux::Rect const &value)

Private Attributes

GVariantBuilder * builder_

Detailed Description

Definition at line 67 of file Variant.h.


Constructor & Destructor Documentation

unity::variant::BuilderWrapper::BuilderWrapper ( GVariantBuilder *  builder)

Definition at line 116 of file Variant.cpp.

  : builder_(builder)
{}

Member Function Documentation

BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
bool  value 
)

Definition at line 120 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_boolean(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
char const *  value 
)

Definition at line 126 of file Variant.cpp.

{
  if (value)
    g_variant_builder_add(builder_, "{sv}", name, g_variant_new_string(value));
  else
    g_variant_builder_add(builder_, "{sv}", name, g_variant_new_string(""));

  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
std::string const &  value 
)

Definition at line 136 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name,
                        g_variant_new_string(value.c_str()));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
int  value 
)

Definition at line 143 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_int32(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
long int  value 
)

Definition at line 149 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_int64(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
long long int  value 
)

Definition at line 155 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_int64(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
unsigned int  value 
)

Definition at line 161 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_uint32(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
long unsigned int  value 
)

Definition at line 167 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_uint64(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
long long unsigned int  value 
)

Definition at line 173 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_uint64(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
float  value 
)

Definition at line 179 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_double(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
double  value 
)

Definition at line 185 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, g_variant_new_double(value));
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( char const *  name,
GVariant *  value 
)

Definition at line 191 of file Variant.cpp.

{
  g_variant_builder_add(builder_, "{sv}", name, value);
  return *this;
}
BuilderWrapper & unity::variant::BuilderWrapper::add ( nux::Rect const &  value)

Definition at line 197 of file Variant.cpp.

{
  add("x", value.x);
  add("y", value.y);
  add("width", value.width);
  add("height", value.height);
  return *this;
}

Here is the call graph for this function:


Member Data Documentation

GVariantBuilder* unity::variant::BuilderWrapper::builder_ [private]

Definition at line 87 of file Variant.h.


The documentation for this class was generated from the following files: