void bindObjectParameter() { RunTimeTypedClass<ObjectParameter>() .def( "__init__", make_constructor( &objectParameterConstructor, default_call_policies(), ( boost::python::arg_( "name" ), boost::python::arg_( "description" ), boost::python::arg_( "defaultValue" ), boost::python::arg_( "type" ), boost::python::arg_( "presets" ) = boost::python::tuple(), boost::python::arg_( "presetsOnly" ) = false, boost::python::arg_( "userData" ) = object() ) ) ) .def( "__init__", make_constructor( &objectParameterConstructor2, default_call_policies(), ( boost::python::arg_( "name" ), boost::python::arg_( "description" ), boost::python::arg_( "defaultValue" ), boost::python::arg_( "types" ), boost::python::arg_( "presets" ) = boost::python::tuple(), boost::python::arg_( "presetsOnly" ) = false, boost::python::arg_( "userData" ) = object() ) ) ) .def( "validTypes", &validTypes ) .IECOREPYTHON_DEFPARAMETERWRAPPERFNS( ObjectParameter ) ; }
object make_function(F f) { log_trace("%s", __PRETTY_FUNCTION__); return detail::make_function_aux(f, default_call_policies(), typename detail::get_signature<F>::type()); }
objects::function* make_function(F f) { return new objects::function( objects::py_function( ::boost::bind<PyObject*>(detail::caller(), f, _1, _2, default_call_policies())) , detail::arg_tuple_size<F>::value); }
void visit(C_& c, char const* name, Options& options) const { // This should probably be a nicer error message BOOST_STATIC_ASSERT(!Options::has_default_implementation); // Add the virtual function dispatcher c.def( name , m_pmf , options.doc() , options.keywords() , options.policies() ); typedef BOOST_DEDUCED_TYPENAME C_::metadata::held_type held_type; // Add the default implementation which raises the exception c.def( name , make_function( detail::nullary_function_adaptor<void(*)()>(pure_virtual_called) , default_call_policies() , detail::error_signature<held_type>(detail::get_signature(m_pmf)) ) ); }
void bindUndoContext() { class_<UndoContext, UndoContextPtr, boost::noncopyable> cls( "_UndoContext", no_init ); // Must bind enum before constructor, because we need to // use an enum value for a default value. scope s( cls ); enum_<UndoContext::State>( "State" ) .value( "Invalid", UndoContext::Invalid ) .value( "Enabled", UndoContext::Enabled ) .value( "Disabled", UndoContext::Disabled ) ; cls.def( "__init__", make_constructor( construct, default_call_policies(), ( boost::python::arg_( "script" ), boost::python::arg_( "state" ) = UndoContext::Enabled, boost::python::arg_( "mergeGroup" ) = "" ) ) ); }
class_ & function(const char * name, F f) { v8::Local<v8::Function> function = detail::make_function( f, default_call_policies(), detail::get_signature(f, (T*)NULL)); v8::Local<v8::String> symbol = v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), name); t_->PrototypeTemplate()->Set(symbol, function); return *this; }
object make_setter(D C::*pm) { return objects::function_object( ::boost::bind( &detail::member<D,C,default_call_policies>::set, pm, _1, _2 , default_call_policies()) , 2); }
inline handle<> function_handle(F const& f, Signature) { enum { n_arguments = mpl::size<Signature>::value - 1 }; return objects::function_handle_impl( python::detail::caller< F,python::detail::args_from_python,default_call_policies,Signature>( f, default_call_policies()) , n_arguments, n_arguments); }
void bindShader() { RunTimeTypedClass<Shader>() .def( init<>() ) .def( init<optional<const std::string &, const std::string &, const CompoundDataMap &> >() ) .def( "__init__", make_constructor( &construct, default_call_policies(), ( boost::python::arg_( "name" )="defaultsurface", boost::python::arg_( "type" )="surface", boost::python::arg_( "parameters" )=0 ) ) ) .add_property( "name", make_function( &Shader::getName, return_value_policy<copy_const_reference>() ), &Shader::setName ) .add_property( "type", make_function( &Shader::getType, return_value_policy<copy_const_reference>() ), &Shader::setType ) .add_property( "parameters", ¶metersData ) ; }
void bindLight() { RunTimeTypedClass<Light>() .def( init<>() ) .def( init<optional<const std::string &, const std::string &, const CompoundDataMap &> >() ) .def( "__init__", make_constructor( &construct, default_call_policies(), ( boost::python::arg_( "name" )="distantlight", boost::python::arg_( "handle" )="", boost::python::arg_( "parameters" )=0 ) ) ) .add_property( "name", make_function( &Light::getName, return_value_policy<copy_const_reference>() ), &Light::setName ) .add_property( "handle", make_function( &Light::getHandle, return_value_policy<copy_const_reference>() ), &Light::setHandle ) .add_property( "parameters", (CompoundDataPtr (Light::*)() )( &Light::parametersData ) ) ; }
objects::function* make_constructor(Holder* = 0, ArgList* = 0) { enum { nargs = mpl::size<ArgList>::value }; return new objects::function( objects::py_function( ::boost::bind<PyObject*>(detail::caller(), objects::make_holder<nargs> ::template apply<Holder,ArgList>::execute , _1, _2, default_call_policies())) , nargs + 1); }
inline object make_iterator_function( Accessor1 const& get_start , Accessor2 const& get_finish , NextPolicies const& /*next_policies*/ , Iterator const& (*)() , abt_boost::type<Target>* , int ) { return make_function( py_iter_<Target,Iterator,Accessor1,Accessor2,NextPolicies>(get_start, get_finish) , default_call_policies() , mpl::vector2<iterator_range<NextPolicies,Iterator>, back_reference<Target&> >() ); }
void bindChannelMaskPlug() { IECorePython::RunTimeTypedClass<ChannelMaskPlug>() .def( "__init__", make_constructor( constructChannelMask, default_call_policies(), ( boost::python::arg_( "name" )=Gaffer::GraphComponent::defaultName<ChannelMaskPlug>(), boost::python::arg_( "direction" )=Gaffer::Plug::In, boost::python::arg_( "defaultValue" ), boost::python::arg_( "flags" )=Gaffer::Plug::Default ) ) ) .def( "maskChannels", &maskChannelList ) .def( "removeDuplicateIndices", &removeDuplicates ).staticmethod("removeDuplicateIndices") .def( "channelIndex", &ChannelMaskPlug::channelIndex ).staticmethod("channelIndex") ; }
void bindAttributeCache() { bool (AttributeCache::*containsObj)(const AttributeCache::ObjectHandle &) = &AttributeCache::contains; bool (AttributeCache::*containsObjAttr)(const AttributeCache::ObjectHandle &, const AttributeCache::AttributeHandle &) = &AttributeCache::contains; RefCountedClass<AttributeCache, RefCounted>( "AttributeCache" ) .def( init<const std::string &, IndexedIO::OpenMode>() ) .def("write", &AttributeCache::write) .def("writeHeader", &AttributeCache::writeHeader) .def("read", (ObjectPtr (AttributeCache::*)( const AttributeCache::ObjectHandle &, const AttributeCache::AttributeHandle & ) )&AttributeCache::read) .def("read", (CompoundObjectPtr (AttributeCache::*)( const AttributeCache::ObjectHandle & ))&AttributeCache::read) .def("readHeader", (ObjectPtr (AttributeCache::*) ( const AttributeCache::HeaderHandle & ))&AttributeCache::readHeader) .def("readHeader", (CompoundObjectPtr (AttributeCache::*)())&AttributeCache::readHeader) .def("contains", containsObj) .def("contains", containsObjAttr) .def("objects", &AttributeCacheHelper::objects) .def("headers", &AttributeCacheHelper::headers) .def("attributes", make_function( &AttributeCacheHelper::attributes, default_call_policies(), ( boost::python::arg_( "obj" ), boost::python::arg_( "regex" ) = object() ) ) ) .def("remove", (void (AttributeCache::*)( const AttributeCache::ObjectHandle &, const AttributeCache::AttributeHandle & ) )&AttributeCache::remove) .def("remove", (void (AttributeCache::*)( const AttributeCache::ObjectHandle & ))&AttributeCache::remove) .def("removeHeader", &AttributeCache::removeHeader ) ; }
//----------------------------------------------------------------------------- // Exports studiohdr_t. //----------------------------------------------------------------------------- void export_model_header(scope _studio) { class_<studiohdr_t, boost::shared_ptr<studiohdr_t>, boost::noncopyable> ModelHeader("ModelHeader", no_init); // Initializer... ModelHeader.def("__init__", make_constructor(&ModelHeaderExt::__init__, default_call_policies(), args("model_name") ) ); // Properties... ModelHeader.def_readwrite("id", &studiohdr_t::id); // Looks like a pointer? ModelHeader.def_readwrite("version", &studiohdr_t::version); ModelHeader.def_readwrite("checksum", &studiohdr_t::checksum); ModelHeader.add_property("name", &studiohdr_t::pszName); ModelHeader.add_property("eye_position", make_getter(&studiohdr_t::eyeposition, reference_existing_object_policy())); ModelHeader.add_property("illumination_center", make_getter(&studiohdr_t::illumposition, reference_existing_object_policy())); ModelHeader.add_property("hull_min", make_getter(&studiohdr_t::hull_min, reference_existing_object_policy())); ModelHeader.add_property("hull_max", make_getter(&studiohdr_t::hull_max, reference_existing_object_policy())); ModelHeader.add_property("view_min", make_getter(&studiohdr_t::view_bbmin, reference_existing_object_policy())); ModelHeader.add_property("view_max", make_getter(&studiohdr_t::view_bbmax, reference_existing_object_policy())); ModelHeader.def_readwrite("flags", &studiohdr_t::flags); ModelHeader.def_readwrite("bones_count", &studiohdr_t::numbones); ModelHeader.def_readwrite("bones_offset", &studiohdr_t::boneindex); ModelHeader.def_readwrite("bone_controllers_count", &studiohdr_t::numbonecontrollers); ModelHeader.def_readwrite("bone_controllers_offset", &studiohdr_t::bonecontrollerindex); ModelHeader.def_readwrite("hitbox_sets_count", &studiohdr_t::numhitboxsets); ModelHeader.def_readwrite("hitbox_sets_offset", &studiohdr_t::hitboxsetindex); ModelHeader.def_readwrite("local_animations_count", &studiohdr_t::numlocalanim); ModelHeader.def_readwrite("animations_offset", &studiohdr_t::localanimindex); ModelHeader.def_readwrite("attachments_count", &studiohdr_t::numlocalattachments); ModelHeader.def_readwrite("local_sequences_count", &studiohdr_t::numlocalseq); ModelHeader.def_readwrite("local_sequence_offset", &studiohdr_t::localseqindex); ModelHeader.def_readwrite("mass", &studiohdr_t::mass); ModelHeader.def_readwrite("contents", &studiohdr_t::contents); // Methods... ModelHeader.def("get_bone", &studiohdr_t::pBone, reference_existing_object_policy()); // ModelHeader.def("remap_sequence_bone", &studiohdr_t::RemapSeqBone); // ModelHeader.def("remap_animation_bone", &studiohdr_t::RemapAnimBone); ModelHeader.def("get_bone_controller", &studiohdr_t::pBonecontroller, reference_existing_object_policy()); ModelHeader.def("get_hitbox_set", &studiohdr_t::pHitboxSet, reference_existing_object_policy()); ModelHeader.def("get_local_animation", &studiohdr_t::pLocalAnimdesc, reference_existing_object_policy()); // ModelHeader.def("has_sequences_available", &studiohdr_t::SequencesAvailable); // ModelHeader.def("get_animation", &studiohdr_t::pAnimdesc, reference_existing_object_policy()); // ModelHeader.def("get_sequences_count", &studiohdr_t::GetNumSeq); // ModelHeader.def("get_sequence", &studiohdr_t::pSeqdesc, reference_existing_object_policy()); // ModelHeader.def("get_activity_list_version", &studiohdr_t::GetActivityListVersion); // ModelHeader.def("set_activity_list_version", &studiohdr_t::SetActivityListVersion); ModelHeader.def("get_attachment", &studiohdr_t::pLocalAttachment, reference_existing_object_policy()); // Special methods... ModelHeader.def("__len__", make_getter(&studiohdr_t::length)); // Add memory tools... ModelHeader ADD_MEM_TOOLS(studiohdr_t); }
default_call_policies call_policies() const { return default_call_policies(); }
object GaussianRepulsionLikelihoodFunction(PairwiseLikelihoods::GaussianRepulsion& gaussian_repulsion) { typedef boost::mpl::vector<double, const Nucleon&, const Nucleon&> func_sig; return make_function(gaussian_repulsion.LikelihoodFunction(), default_call_policies(), func_sig()); }
//----------------------------------------------------------------------------- DECLARE_SP_MODULE(_bitbuffers) { export_bf_write(_bitbuffers); export_bf_read(_bitbuffers); } //----------------------------------------------------------------------------- // Expose bf_write. //----------------------------------------------------------------------------- void export_bf_write(scope _bitbuffers) { class_<bf_write>("BitBufferWrite", no_init) .def("__init__", make_constructor(&BitBufferWriteExt::__init__, default_call_policies()) ) .def("seek_to_bit", &bf_write::SeekToBit, "Seeks to a specific position." ) .def("write_one_bit", &bf_write::WriteOneBit ) .def("write_one_bit_no_check", &bf_write::WriteOneBitNoCheck )
handle<> make_function_handle(F f) { return objects::function_handle( ::boost::bind<PyObject*>(python::detail::caller(), f, _1, _2, default_call_policies()) , python::detail::arg_tuple_size<F>::value); }
static default_call_policies call_policies() { return default_call_policies(); }
object make_function(F f) { return detail::make_function_aux( f,default_call_policies(), detail::get_signature(f)); }
//----------------------------------------------------------------------------- // Exports CBaseEntity. //----------------------------------------------------------------------------- void export_base_entity(scope _entity) { class_<CBaseEntityWrapper, boost::shared_ptr<CBaseEntityWrapper>, bases<IServerEntity>, boost::noncopyable> BaseEntity("BaseEntity", no_init); // Initializers... BaseEntity.def("__init__", make_constructor( &CBaseEntityWrapper::__init__, default_call_policies(), args("entity_index") ) ); // Properties... BaseEntity.add_property("server_class", make_function(&CBaseEntityWrapper::GetServerClass, reference_existing_object_policy()), "The ServerClass instance of this entity (read-only)." ); BaseEntity.add_property("datamap", make_function(&CBaseEntityWrapper::GetDataDescMap, reference_existing_object_policy()), "The DataMap instance of this entity (read-only)." ); BaseEntity.add_property("edict", make_function(&CBaseEntityWrapper::GetEdict, reference_existing_object_policy())); BaseEntity.add_property("index", &CBaseEntityWrapper::GetIndex); BaseEntity.add_property("pointer", make_function(&CBaseEntityWrapper::GetPointer)); BaseEntity.add_property("inthandle", &CBaseEntityWrapper::GetIntHandle); // Methods... BaseEntity.def("get_key_value_string", &CBaseEntityWrapper::GetKeyValueString, "Returns the value of the given field name.", args("field_name") ); BaseEntity.def("get_key_value_int", &CBaseEntityWrapper::GetKeyValueInt, "Returns the value of the given field name.", args("field_name") ); BaseEntity.def("get_key_value_float", &CBaseEntityWrapper::GetKeyValueFloat, "Returns the value of the given field name.", args("field_name") ); BaseEntity.def("get_key_value_vector", &CBaseEntityWrapper::GetKeyValueVector, "Returns the value of the given field name.", args("field_name") ); BaseEntity.def("get_key_value_bool", &CBaseEntityWrapper::GetKeyValueBool, "Returns the value of the given field name.", args("field_name") ); BaseEntity.def("get_key_value_color", &CBaseEntityWrapper::GetKeyValueColor, "Returns the value of the given field name.", args("field_name") ); BaseEntity.def("set_key_value_int", &CBaseEntityWrapper::SetKeyValue<int>, "Sets a field to the given value.", args("field_name", "value") ); BaseEntity.def("set_key_value_float", &CBaseEntityWrapper::SetKeyValue<float>, "Sets a field to the given value.", args("field_name", "value") ); BaseEntity.def("set_key_value_string", &CBaseEntityWrapper::SetKeyValue<const char *>, "Sets a field to the given value.", args("field_name", "value") ); BaseEntity.def("set_key_value_vector", &CBaseEntityWrapper::SetKeyValue<Vector>, "Sets a field to the given value.", args("field_name", "value") ); BaseEntity.def("set_key_value_bool", &CBaseEntityWrapper::SetKeyValue<bool>, "Sets a field to the given value.", args("field_name", "value") ); BaseEntity.def("set_key_value_color", &CBaseEntityWrapper::SetKeyValueColor, "Sets a field to the given value.", args("field_name", "value") ); BaseEntity.def("is_player", &CBaseEntityWrapper::IsPlayer, "Return True if the entity is a player." ); // Add memory tools... BaseEntity ADD_MEM_TOOLS(CBaseEntityWrapper); }
inline object make_setter(D const& x) { return detail::make_setter(x, default_call_policies(), is_member_pointer<D>(), 0); }
void export_player_wrapper(scope _players) { class_<PlayerMixin, bases<CBaseEntityWrapper>, boost::noncopyable> _PlayerMixin("PlayerMixin", no_init); _PlayerMixin.def("__init__", make_constructor( &PlayerMixin::__init__, default_call_policies(), args("entity_index") ) ); _PlayerMixin.add_property( "speed", &PlayerMixin::GetSpeed, &PlayerMixin::SetSpeed, "Get/set the player's speed.\n\n" ":rtype: float"); _PlayerMixin.add_property( "is_ducked", &PlayerMixin::GetIsDucked, &PlayerMixin::SetIsDucked, "Return whether the player is ducked.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "is_ducking", &PlayerMixin::GetIsDucking, &PlayerMixin::SetIsDucking, "Return whether the player is duckeding.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "flags", &PlayerMixin::GetFlags, &PlayerMixin::SetFlags, "Get/set the player's flags.\n\n" ":rtype: int"); _PlayerMixin.add_property( "last_weapon", &PlayerMixin::GetLastWeapon, &PlayerMixin::SetLastWeapon, "Get/set the player's last weapon.\n\n" ":rtype: int"); _PlayerMixin.add_property( "observer_target", &PlayerMixin::GetObserverTarget, &PlayerMixin::SetObserverTarget, "Get/set the player's observer target.\n\n" ":rtype: int"); _PlayerMixin.add_property( "deaths", &PlayerMixin::GetDeaths, &PlayerMixin::SetDeaths, "Get/set the player's death count.\n\n" ":rtype: int"); _PlayerMixin.add_property( "kills", &PlayerMixin::GetKills, &PlayerMixin::SetKills, "Get/set the player's kill count.\n\n" ":rtype: int"); _PlayerMixin.add_property( "observer_mode", &PlayerMixin::GetObserverMode, &PlayerMixin::SetObserverMode, "Get/set the player's observer mode.\n\n" ":rtype: int"); _PlayerMixin.add_property( "life_state", &PlayerMixin::GetLifeState, &PlayerMixin::SetLifeState, "Get/set the player's life state.\n\n" ":rtype: int"); _PlayerMixin.add_property( "place", &PlayerMixin::GetPlace, &PlayerMixin::SetPlace, "Get/set the player's current place.\n\n" ":rtype: str"); _PlayerMixin.add_property( "dead", &PlayerMixin::GetDead, &PlayerMixin::SetDead, "Return whether the player is dead.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "fall_velocity", &PlayerMixin::GetFallVelocity, &PlayerMixin::SetFallVelocity, "Get/set the player's fall velocity.\n\n" ":rtype: float"); _PlayerMixin.add_property( "buttons", &PlayerMixin::GetButtons, &PlayerMixin::SetButtons, "Get/set the player's currently pressed buttons.\n\n" ":rtype: float"); _PlayerMixin.add_property( "hidden_huds", &PlayerMixin::GetHiddenHUDs, &PlayerMixin::SetHiddenHUDs, "Get/set the player's hidden HUDs.\n\n" ":rtype: int"); _PlayerMixin.add_property( "draw_view_model", &PlayerMixin::GetDrawViewModel, &PlayerMixin::SetDrawViewModel, "Get/set the player's draw view model.\n\n" ":rtype: int"); _PlayerMixin.add_property( "fov", &PlayerMixin::GetFOV, &PlayerMixin::SetFOV, "Get/set the player's field of view (FOV).\n\n" ":rtype: int"); _PlayerMixin.add_property( "fov_start", &PlayerMixin::GetFOVStart, &PlayerMixin::SetFOVStart, "Get/set the player's field of view (FOV) start.\n\n" ":rtype: int"); _PlayerMixin.add_property( "fov_time", &PlayerMixin::GetFOVTime, &PlayerMixin::SetFOVTime, "Get/set the player's field of view (FOV) time.\n\n" ":rtype: float"); _PlayerMixin.add_property( "default_fov", &PlayerMixin::GetDefaultFOV, &PlayerMixin::SetDefaultFOV, "Get/set the player's default field of view (FOV).\n\n" ":rtype: int"); _PlayerMixin.add_property( "default_fov", &PlayerMixin::GetDefaultFOV, &PlayerMixin::SetDefaultFOV, "Get/set the player's default field of view (FOV).\n\n" ":rtype: int"); _PlayerMixin.add_property( "fov_rate", &PlayerMixin::GetFOVRate, &PlayerMixin::SetFOVRate, "Get/set the player's field of view (FOV) rate.\n\n" ":rtype: float"); _PlayerMixin.add_property( "gun_offset", &PlayerMixin::GetGunOffset, &PlayerMixin::SetGunOffset, "Get/set the player's gun offset.\n\n" ":rtype: Vector"); _PlayerMixin.add_property( "last_hitgroup", &PlayerMixin::GetLastHitgroup, &PlayerMixin::SetLastHitgroup, "Get/set the player's last hitgroup.\n\n" ":rtype: int"); _PlayerMixin.add_property( "active_weapon_handle", &PlayerMixin::GetActiveWeaponHandle, &PlayerMixin::SetActiveWeaponHandle, "Get/set the player's active weapon_handle.\n\n" ":rtype: int"); _PlayerMixin.add_property( "relationship", &PlayerMixin::GetRelationship, &PlayerMixin::SetRelationship, "Get/set the player's relationship.\n\n" ":rtype: str"); _PlayerMixin.add_property( "phys_damage_scale", &PlayerMixin::GetPhysDamageScale, &PlayerMixin::SetPhysDamageScale, "Get/set the player's physical damage scale.\n\n" ":rtype: float"); _PlayerMixin.add_property( "eye_angle", &PlayerMixin::GetEyeAngle, &PlayerMixin::SetEyeAngle, "Get/set the player's eye angle.\n\n" ":rtype: QAngle"); _PlayerMixin.add_property( "view_vector", &PlayerMixin::GetViewVector, &PlayerMixin::SetViewVector, "Get/set the player's view vector.\n\n" ":rtype: Vector"); _PlayerMixin.add_property( "view_angle", &PlayerMixin::GetViewAngle, &PlayerMixin::SetViewAngle, "Get/set the player's view angle.\n\n" ":rtype: QAngle"); _PlayerMixin.add_property( "view_offset", &PlayerMixin::GetViewOffset, &PlayerMixin::SetViewOffset, "Get/set the player's view offset.\n\n" ":rtype: Vector"); // Game specific _PlayerMixin.add_property( "stamina", &PlayerMixin::GetStamina, &PlayerMixin::SetStamina, "Get/set the player's stamina.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: float"); _PlayerMixin.add_property( "shots_fired", &PlayerMixin::GetShotsFired, &PlayerMixin::SetShotsFired, "Get/set the the number of shots fired by the player.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: int"); _PlayerMixin.add_property( "armor", &PlayerMixin::GetArmor, &PlayerMixin::SetArmor, "Get/set the player's armor.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: int"); _PlayerMixin.add_property( "has_defuser", &PlayerMixin::GetHasDefuser, &PlayerMixin::SetHasDefuser, "Get/set whether the player has a defuser.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "has_helmet", &PlayerMixin::GetHasHelmet, &PlayerMixin::SetHasHelmet, "Get/set whether the player has a helmet.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "in_bomb_zone", &PlayerMixin::GetIsInBombZone, &PlayerMixin::SetIsInBombZone, "Get/set whether the player is in a bomb zone.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "in_buy_zone", &PlayerMixin::GetIsInBuyZone, &PlayerMixin::SetIsInBuyZone, "Get/set whether the player is in a buy zone.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "in_rescue_zone", &PlayerMixin::GetIsInHostageRescueZone, &PlayerMixin::SetIsInHostageRescueZone, "Get/set whether the player is in a hostage rescue zone.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "is_defusing", &PlayerMixin::GetIsDefusing, &PlayerMixin::SetIsDefusing, "Get/set whether the player is currently defusing the bomb.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "nightvision_on", &PlayerMixin::GetNightvisionOn, &PlayerMixin::SetNightvisionOn, "Get/set whether the player is currently using nightvision.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: bool"); _PlayerMixin.add_property( "flash_duration", &PlayerMixin::GetFlashDuration, &PlayerMixin::SetFlashDuration, "Get/set the player's flash duration.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: int"); _PlayerMixin.add_property( "flash_alpha", &PlayerMixin::GetFlashAlpha, &PlayerMixin::SetFlashAlpha, "Get/set the player's flash alpha.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: int"); _PlayerMixin.add_property( "cash", &PlayerMixin::GetCash, &PlayerMixin::SetCash, "Get/set the player's cash.\n\n" ".. note:: Only available in CS:GO and CS:S.\n\n" ":rtype: int"); _PlayerMixin.add_property( "player_class", &PlayerMixin::GetPlayerClass, &PlayerMixin::SetPlayerClass, "Get/set the player's player class.\n\n" ":rtype: int"); _PlayerMixin.add_property( "player_state", &PlayerMixin::GetPlayerState, &PlayerMixin::SetPlayerState, "Get/set the player's player state.\n\n" ":rtype: int"); _PlayerMixin.add_property( "ragdoll", &PlayerMixin::GetRagdoll, &PlayerMixin::SetRagdoll, "Get/set the player's ragdoll.\n\n" ":rtype: int"); _PlayerMixin.add_property( "active_devices", &PlayerMixin::GetActiveDevices, &PlayerMixin::SetActiveDevices, "Get/set the player's active devices.\n\n" ".. note:: Only available in HL2.\n\n" ":rtype: int"); _PlayerMixin.add_property( "suit_power_load", &PlayerMixin::GetSuitPowerLoad, &PlayerMixin::SetSuitPowerLoad, "Get/set the player's suit power load.\n\n" ".. note:: Only available in HL2.\n\n" ":rtype: float"); _PlayerMixin.add_property( "desired_player_class", &PlayerMixin::GetDesiredPlayerClass, &PlayerMixin::SetDesiredPlayerClass, "Get/set the player's desired player class.\n\n" ".. note:: Only available in TF2.\n\n" ":rtype: int"); _PlayerMixin ADD_MEM_TOOLS(PlayerMixin); }
object WoodsSaxonLikelihoodFunction(SingleBodyLikelihoods::WoodsSaxon& woods_saxon) { typedef boost::mpl::vector<double, const Nucleon&> func_sig; return make_function(woods_saxon.LikelihoodFunction(), default_call_policies(), func_sig()); }
static object make() { return make_function(call, default_call_policies(), (arg("input1"), arg("input2"), arg("output")=object())); }