コード例 #1
0
	static void set( value &v, DocumentInsertRequest const &d )
	{
		v.set( "docid", d.docid );
		v.set( "attributes", d.attributes );
		v.set( "metadata", d.metadata );
		v.set( "forward", d.forward );
		v.set( "search", d.search );
	}
コード例 #2
0
	static void set( value &v, DocumentGetAnswer const &a )
	{
		v.set( "docno", a.docno );
		v.set( "attributes", a.attributes );
		v.set( "metadata", a.metadata );
		v.set( "forward", a.forward );
		v.set( "search", a.search );
	}
コード例 #3
0
ファイル: JsPrime.cpp プロジェクト: madrazo/nme
void ValueObjectStreamOut::toValue(value &v)
{
   int offset = (int)&data[0];
   int len = data.size();

   value::global("Module").call<void>("unrealize", v, offset, len, value::null() );
   if (count)
      v.set("handles", handleArray);
}
コード例 #4
0
ファイル: index.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, StorageCreateParameters const &p )
	{
		v.set( "database", p.database );
		v.set( "compression", p.compression );
		v.set( "cache_size", p.cache_size );
		v.set( "max_open_files", p.max_open_files );
		v.set( "write_buffer_size", p.write_buffer_size );
		v.set( "block_size", p.block_size );
		v.set( "metadata", p.metadata );
	}
コード例 #5
0
ファイル: JsPrime.cpp プロジェクト: madrazo/nme
void nme_native_resource_dispose(value inValue)
{
   if (inValue.isNull() || inValue.isUndefined())
      return;

   if (inValue["ptr"].isNull()  || inValue["ptr"].isUndefined())
      return;

   Object *ptr = (Object *)inValue["ptr"].as<int>();
   if (ptr)
   {
      ptr->DecRef();
   }
   inValue.set("ptr",value::null());
}
コード例 #6
0
	static void set( value &v, std::pair<std::string, strus::NumericVariant> const &p )
	{
		v.set( "key", p.first );
		switch( p.second.type ) {
			case strus::NumericVariant::Null:
				v.set( "value", cppcms::json::null( ) );
				break;
			
			case strus::NumericVariant::Int:
				v.set( "value", p.second.toint( ) );
				break;
				
			case strus::NumericVariant::UInt:
				v.set( "value", p.second.touint( ) );
				break;
				
			case strus::NumericVariant::Float:
				v.set( "value", p.second.tofloat( ) );
				break;
			
			default:
				throw bad_value_cast( );
		}
	}
コード例 #7
0
ファイル: other.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, FunctionParameter const &p )
	{
		switch( p.type ) {
			case FUNCTION_TYPE_FEATURE:
				v.set( "type", "feature" );
				break;
			case FUNCTION_TYPE_ATTRIBUTE:
				v.set( "type", "attribute" );
				break;
			case FUNCTION_TYPE_METADATA:
				v.set( "type", "metadata" );
				break;
			case FUNCTION_TYPE_NUMERIC:
				v.set( "type", "numeric" );
				break;
			case FUNCTION_TYPE_STRING:
				v.set( "type", "string" );
				break;
			default:
				throw bad_value_cast( );
		}				
		v.set( "name", p.name );
		v.set( "description", p.description );
	}
コード例 #8
0
	static void set( value &v, boost::tuple<std::string, std::string, strus::Index> const &t )
	{
		v.set( "type", boost::get<0>( t ) );
		v.set( "value", boost::get<1>( t ) );
		v.set( "pos", boost::get<2>( t ) );
	}
コード例 #9
0
	static void set( value &v, DocumentGetRequest const &d )
	{
		v.set( "docid", d.docid );
	}
コード例 #10
0
ファイル: other.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, PostingJoinOperatorConfiguration const &c )
	{
		v.set( "name", c.name );
		v.set( "description", c.description );
	}
コード例 #11
0
ファイル: other.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, SummarizerFunctionConfiguration const &c )
	{
		v.set( "name", c.name );
		v.set( "description", c.description );
		v.set( "parameter", c.parameter );
	}
コード例 #12
0
ファイル: other.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, ServiceConfiguration const &c )
	{
		v.set( "weighting_functions", c.weighting_functions );
		v.set( "summarizer_functions", c.summarizer_functions );
		v.set( "posting_join_operators", c.posting_join_operators );
	}
コード例 #13
0
ファイル: index.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, StorageStatistics const &s )
	{
		v.set( "nof_docs", s.nof_docs );
	}
コード例 #14
0
ファイル: index.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, StorageConfiguration const &c )
	{
		v.set( "metadata", c.metadata );
		v.set( "attributes", c.attributes );
		v.set( "types", c.types );
	}
コード例 #15
0
ファイル: index.hpp プロジェクト: Eurospider/strusWebService
	static void set( value &v, MetadataDefiniton const &m )
	{
		v.set( "name", m.name );
		v.set( "type", m.type );
	}