diff --git a/Dockerfile b/Dockerfile index 36491ae..7ffe982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,47 +1,41 @@ -# Copyright (c) 2020 Arista Networks, Inc. All rights reserved. +# Copyright (c) 2024 Arista Networks, Inc. All rights reserved. # Arista Networks, Inc. Confidential and Proprietary. #----------------------------------------------------------------------------------- -# This Dockerfile can be used to build a docker image. -# Docker containers of this image can be used to build EosSdk applications. -# The following build options are provided: -# arch : Use 'm32' to build a 32-bit EosSdk application otherwise use 'm64' -# to build a 64-bit EosSdk application. -# Default value is set to 'm32'. -# Example: -# Steps to build an application using EosSdk docker container. -# 1) Build Docker image with tag as arista-eossdk:latest: -# a) Docker image with a 32-bit libeos.so -# "docker build -t arista-eossdk --build-arg arch=m32 ." -# or "docker build -t arista-eossdk ." -# -# OR -# b) Docker image with a 64-bit libeos.so -# "docker build -t arista-eossdk --build-arg arch=m64 ." +# This Dockerfile can be used to build a docker image that can then be used to create +# a docker container that will be able to compile EosSdk applications in exactly the +# same way as EOS native applications are compiled (and thus binary compatible with +# EOS libraries). # -# 2) Run Docker container: -# docker run -v /home/sdk-app:/sdk-app --name -it arista-eossdk bash -# This will mount /home/sdk-app as sdk-app inside the container. -# Place the application code and necessary dependencies in /home/sdk-app +# 1) Build Docker image (we will call it 'arista-eossdk') +# docker build . -f -t arista-eossdk # -# 3) Compile application binary: -# Run the following command from /sdk-app. -# For 32-bit binary: "g++ -m32 --std=gnu++0x -o -leos" -# For 64-bit binary: "g++ -m64 --std=gnu++0x -o -leos" -# The generated binary will also be available in /home/sdk-app on the host -# machine. +# 2) Create container: (assuming application code to be compiled is at /code on the +# host machine that starts the container) +# docker run -v /code:/code -itd --name arista-eossdk-c1 arista-eossdk # -#4) Load the application on Arista switch: +# 3) Go into the container and build the application +# docker exec -it arista-eossdk-c1 /bin/bash +# cd /code +# g++ -std=gnu++20 -o /code/build/HelloWorld.o -c /code/HelloWorld.cpp +# g++ -std=gnu++20 -o /code/build/HelloWorld /code/HelloWorld.o -leos -lrt +# g++ -m32 -std=gnu++20 -o /code/build/HelloWorld.o -c /code/HelloWorld.cpp +# g++ -m32 -std=gnu++20 -o /code/build/HelloWorld32 /code/HelloWorld.o -leos -lrt +# +# 4) Load the application (in /code/build on your host) onto an Arista switch # Further instructions to run the application on Arista switch can be found here: # https://github.com/aristanetworks/EosSdk/wiki/Quickstart%3A-Hello-World # +# 5) Cleanup +# docker rm arista-eossdk-c1 +# docker rmi arista-eossdk +# # To learn more about EosSdk visit the following link. # https://github.com/aristanetworks/EosSdk/wiki #----------------------------------------------------------------------------------- -FROM centos:7 -ARG version=2.23.0 -ARG arch="m32" +FROM almalinux:9 +ARG version=2.23.1 # Set eossdk version as label and environ variable. LABEL version=$version @@ -57,29 +51,32 @@ RUN \ && yum -y install wget \ && yum -y install patch \ && yum -y install libtool \ - && yum -y install diffutils \ - && yum -y install swig3 \ - && yum -y install python-devel \ - && yum -y install python3-devel - -WORKDIR /usr/src/EosSdk-stubs-$version -ADD ./ ./ + && yum -y install diffutils # Download cross-compiler. -RUN \ - wget -O /tmp/arista-cross-compiler.rpm \ - https://github.com/aristanetworks/EosSdk-cross-compiler/releases/download/v4.25.0/arista-centos7.5-gcc8.4.0-glibc2.17-1.0-0.i686.rpm +RUN wget -O /tmp/arista-cross-compiler.rpm \ + https://github.com/aristanetworks/EosSdk-cross-compiler/releases/download/v4.32.0/arista-gcc-11.i686.rpm # Install the cross compiler. -RUN yum -y install /tmp/arista-cross-compiler.rpm - -ENV PATH=/opt/arista/centos7.5-gcc8.4.0-glibc2.17/bin:$PATH - -RUN test -f Makefile && rm -f Makefile -RUN test -f configure && rm -f configure -# Build EosSdk stubs. -RUN ./build.sh --$arch -RUN make install +RUN rpm --force --nodeps -Uvh /tmp/arista-cross-compiler.rpm # Delete the cross compiler rpm. RUN rm -f /tmp/arista-cross-compiler.rpm + +ENV PATH=/opt/arista/gcc11/bin:$PATH + +# Download the EosSdk stubs +RUN wget -O /tmp/stubs.tar.gz \ + https://github.com/aristanetworks/EosSdk/archive/refs/tags/v$version.tar.gz + +# Build EosSdk stubs and install libeos and headerfiles for both m32 and m64 +RUN cd /tmp; tar -xzf stubs.tar.gz; cd EosSdk-* ;\ + ./build.sh -m32 >& ../build32.log ;\ + make install >& ../install32.log ;\ + rm -rf /tmp/EosSdk-* ;\ + cd /tmp; tar -xzf stubs.tar.gz; cd EosSdk-* ;\ + ./build.sh -m64 >& ../build64.log ;\ + make install >& ../install64.log ;\ + cd .. ;\ + rm -rf /tmp/EosSdk-* ;\ + rm stubs.tar.gz diff --git a/EosSdk.i b/EosSdk.i index 7cddcc0..5aeffc2 100644 --- a/EosSdk.i +++ b/EosSdk.i @@ -362,6 +362,9 @@ void throw_py_error(error const& err) { %template() std::vector; %template() std::set; +STD_FORWARD_LIST(fib_via_t) +STD_FORWARD_LIST(mpls_label_t) + // For vlan_set_t %template(_BitSet4096) std::bitset<4096>; diff --git a/SwigUtils.i b/SwigUtils.i index c6d2c97..7256f0c 100644 --- a/SwigUtils.i +++ b/SwigUtils.i @@ -61,10 +61,10 @@ namespace std { }; } -%define STD_FORWARD_LIST(data_type) +%define STD_FORWARD_LIST_IN(data_type, cvref) // Python --> C -%typemap(in) std::forward_list const & { +%typemap(in) std::forward_list cvref { PyObject *t = $input; if (PyTuple_Check(t) != true) { PyErr_SetString(PyExc_TypeError, "argument must be a tuple"); @@ -92,8 +92,12 @@ namespace std { $1 = a; } +%enddef + +%define STD_FORWARD_LIST_OUT(data_type, cvref) + // C --> Python -%typemap(out) std::forward_list const & { +%typemap(out) std::forward_list cvref { std::forward_list *a = $1; std::forward_list::const_iterator it; int count = 0; @@ -113,8 +117,14 @@ namespace std { } %enddef -STD_FORWARD_LIST(fib_via_t) -STD_FORWARD_LIST(mpls_label_t) +%define STD_FORWARD_LIST( data_type ) + +STD_FORWARD_LIST_IN( data_type, const & ); +STD_FORWARD_LIST_OUT( data_type, const & ); +STD_FORWARD_LIST_IN( data_type, && ); +STD_FORWARD_LIST_OUT( data_type, && ); + +%enddef // policy_map_hw_status_t::intf_statuses_is() conversion from Python to C++ %typemap(in) std::map const & { diff --git a/acl_gen.cpp b/acl_gen.cpp index 2f469bd..5b27bc9 100644 --- a/acl_gen.cpp +++ b/acl_gen.cpp @@ -32,6 +32,19 @@ acl_ttl_spec_t::operator=( return *this; } +EOS_SDK_PUBLIC acl_ttl_spec_t::acl_ttl_spec_t( + acl_ttl_spec_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC acl_ttl_spec_t& +acl_ttl_spec_t::operator=( + acl_ttl_spec_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * acl_ttl_spec_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -66,6 +79,19 @@ acl_port_spec_t::operator=( return *this; } +EOS_SDK_PUBLIC acl_port_spec_t::acl_port_spec_t( + acl_port_spec_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC acl_port_spec_t& +acl_port_spec_t::operator=( + acl_port_spec_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * acl_port_spec_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -94,6 +120,19 @@ acl_rule_base_t::operator=( return *this; } +EOS_SDK_PUBLIC acl_rule_base_t::acl_rule_base_t( + acl_rule_base_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC acl_rule_base_t& +acl_rule_base_t::operator=( + acl_rule_base_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * acl_rule_base_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -125,6 +164,21 @@ acl_rule_ip_t::operator=( return *this; } +EOS_SDK_PUBLIC acl_rule_ip_t::acl_rule_ip_t( + acl_rule_ip_t && other) noexcept : + acl_rule_base_t(std::move(other)), + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC acl_rule_ip_t& +acl_rule_ip_t::operator=( + acl_rule_ip_t && other) noexcept +{ + if(this != &other) { + acl_rule_base_t::operator=(std::move(other)); + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * acl_rule_ip_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -155,6 +209,21 @@ acl_rule_eth_t::operator=( return *this; } +EOS_SDK_PUBLIC acl_rule_eth_t::acl_rule_eth_t( + acl_rule_eth_t && other) noexcept : + acl_rule_base_t(std::move(other)), + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC acl_rule_eth_t& +acl_rule_eth_t::operator=( + acl_rule_eth_t && other) noexcept +{ + if(this != &other) { + acl_rule_base_t::operator=(std::move(other)); + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * acl_rule_eth_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/bfd_gen.cpp b/bfd_gen.cpp index 59c80a5..dd08eeb 100644 --- a/bfd_gen.cpp +++ b/bfd_gen.cpp @@ -64,6 +64,19 @@ bfd_session_key_t::operator=( return *this; } +EOS_SDK_PUBLIC bfd_session_key_t::bfd_session_key_t( + bfd_session_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bfd_session_key_t& +bfd_session_key_t::operator=( + bfd_session_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bfd_session_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -99,6 +112,19 @@ bfd_interval_t::operator=( return *this; } +EOS_SDK_PUBLIC bfd_interval_t::bfd_interval_t( + bfd_interval_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bfd_interval_t& +bfd_interval_t::operator=( + bfd_interval_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bfd_interval_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -133,6 +159,19 @@ bfd_session_t::operator=( return *this; } +EOS_SDK_PUBLIC bfd_session_t::bfd_session_t( + bfd_session_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bfd_session_t& +bfd_session_t::operator=( + bfd_session_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bfd_session_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -181,6 +220,19 @@ sbfd_echo_session_key_t::operator=( return *this; } +EOS_SDK_PUBLIC sbfd_echo_session_key_t::sbfd_echo_session_key_t( + sbfd_echo_session_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC sbfd_echo_session_key_t& +sbfd_echo_session_key_t::operator=( + sbfd_echo_session_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * sbfd_echo_session_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -215,6 +267,19 @@ sbfd_interval_t::operator=( return *this; } +EOS_SDK_PUBLIC sbfd_interval_t::sbfd_interval_t( + sbfd_interval_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC sbfd_interval_t& +sbfd_interval_t::operator=( + sbfd_interval_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * sbfd_interval_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -254,6 +319,19 @@ sbfd_echo_session_rtt_stats_t::operator=( return *this; } +EOS_SDK_PUBLIC sbfd_echo_session_rtt_stats_t::sbfd_echo_session_rtt_stats_t( + sbfd_echo_session_rtt_stats_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC sbfd_echo_session_rtt_stats_t& +sbfd_echo_session_rtt_stats_t::operator=( + sbfd_echo_session_rtt_stats_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * sbfd_echo_session_rtt_stats_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/bgp_gen.cpp b/bgp_gen.cpp index 9378349..ea510ef 100644 --- a/bgp_gen.cpp +++ b/bgp_gen.cpp @@ -30,6 +30,19 @@ bgp_peer_key_t::operator=( return *this; } +EOS_SDK_PUBLIC bgp_peer_key_t::bgp_peer_key_t( + bgp_peer_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bgp_peer_key_t& +bgp_peer_key_t::operator=( + bgp_peer_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bgp_peer_key_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/bgp_path_gen.cpp b/bgp_path_gen.cpp index c751589..098bc6a 100644 --- a/bgp_path_gen.cpp +++ b/bgp_path_gen.cpp @@ -28,6 +28,19 @@ bgp_path_attr_fields_t::operator=( return *this; } +EOS_SDK_PUBLIC bgp_path_attr_fields_t::bgp_path_attr_fields_t( + bgp_path_attr_fields_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bgp_path_attr_fields_t& +bgp_path_attr_fields_t::operator=( + bgp_path_attr_fields_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bgp_path_attr_fields_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -61,6 +74,19 @@ bgp_path_options_t::operator=( return *this; } +EOS_SDK_PUBLIC bgp_path_options_t::bgp_path_options_t( + bgp_path_options_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bgp_path_options_t& +bgp_path_options_t::operator=( + bgp_path_options_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bgp_path_options_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -95,6 +121,19 @@ bgp_path_attr_t::operator=( return *this; } +EOS_SDK_PUBLIC bgp_path_attr_t::bgp_path_attr_t( + bgp_path_attr_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bgp_path_attr_t& +bgp_path_attr_t::operator=( + bgp_path_attr_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bgp_path_attr_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -131,6 +170,19 @@ bgp_path_key_t::operator=( return *this; } +EOS_SDK_PUBLIC bgp_path_key_t::bgp_path_key_t( + bgp_path_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bgp_path_key_t& +bgp_path_key_t::operator=( + bgp_path_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bgp_path_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -163,6 +215,19 @@ bgp_path_t::operator=( return *this; } +EOS_SDK_PUBLIC bgp_path_t::bgp_path_t( + bgp_path_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC bgp_path_t& +bgp_path_t::operator=( + bgp_path_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * bgp_path_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/build.sh b/build.sh index 9bb2161..21552f7 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash LANG=C export LANG unset DISPLAY @@ -18,7 +18,7 @@ libdir="lib" # Other arguments will be passed to `make'. This is so that one can # do something along the lines of `./build.sh --enable-python check', # for instance. -configure_flags='' +configure_flags='--host=x86_64-pc-linux-gnu' for arg; do case $arg in (--enable-*|--disable-*|--with-*|--without-*|--host=*|--build=*|--prefix=*|--libdir=*) @@ -46,7 +46,6 @@ if $target_32b; then CFLAGS="$CFLAGS $CFLAGS_32B" CXXFLAGS="$CXXFLAGS $CXXFLAGS_32B" LDFLAGS="$LDFLAGS $LDFLAGS_32B" - configure_flags='--host=x86_64-pc-linux-gnu' fi sysroot=$($(which gcc) --print-sysroot) || sysroot = "" diff --git a/class_map_gen.cpp b/class_map_gen.cpp index a575ce9..0972dbd 100644 --- a/class_map_gen.cpp +++ b/class_map_gen.cpp @@ -29,6 +29,19 @@ class_map_rule_t::operator=( return *this; } +EOS_SDK_PUBLIC class_map_rule_t::class_map_rule_t( + class_map_rule_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC class_map_rule_t& +class_map_rule_t::operator=( + class_map_rule_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * class_map_rule_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -62,6 +75,19 @@ class_map_t::operator=( return *this; } +EOS_SDK_PUBLIC class_map_t::class_map_t( + class_map_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC class_map_t& +class_map_t::operator=( + class_map_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * class_map_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/decap_group_gen.cpp b/decap_group_gen.cpp index f50e9ef..a57fc41 100644 --- a/decap_group_gen.cpp +++ b/decap_group_gen.cpp @@ -33,6 +33,19 @@ decap_group_t::operator=( return *this; } +EOS_SDK_PUBLIC decap_group_t::decap_group_t( + decap_group_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC decap_group_t& +decap_group_t::operator=( + decap_group_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * decap_group_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/directflow_gen.cpp b/directflow_gen.cpp index 19f8b62..decbced 100644 --- a/directflow_gen.cpp +++ b/directflow_gen.cpp @@ -24,6 +24,19 @@ flow_match_t::operator=( return *this; } +EOS_SDK_PUBLIC flow_match_t::flow_match_t( + flow_match_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC flow_match_t& +flow_match_t::operator=( + flow_match_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * flow_match_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -52,6 +65,19 @@ flow_action_t::operator=( return *this; } +EOS_SDK_PUBLIC flow_action_t::flow_action_t( + flow_action_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC flow_action_t& +flow_action_t::operator=( + flow_action_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * flow_action_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -88,6 +114,19 @@ flow_entry_t::operator=( return *this; } +EOS_SDK_PUBLIC flow_entry_t::flow_entry_t( + flow_entry_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC flow_entry_t& +flow_entry_t::operator=( + flow_entry_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * flow_entry_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -116,6 +155,19 @@ flow_counters_t::operator=( return *this; } +EOS_SDK_PUBLIC flow_counters_t::flow_counters_t( + flow_counters_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC flow_counters_t& +flow_counters_t::operator=( + flow_counters_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * flow_counters_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/eapi_gen.cpp b/eapi_gen.cpp index 4f9642a..332da94 100644 --- a/eapi_gen.cpp +++ b/eapi_gen.cpp @@ -33,6 +33,19 @@ eapi_response_t::operator=( return *this; } +EOS_SDK_PUBLIC eapi_response_t::eapi_response_t( + eapi_response_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC eapi_response_t& +eapi_response_t::operator=( + eapi_response_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * eapi_response_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/eos/eth_lag_intf.h b/eos/eth_lag_intf.h index ec82a00..be74cd4 100644 --- a/eos/eth_lag_intf.h +++ b/eos/eth_lag_intf.h @@ -206,6 +206,19 @@ class EOS_SDK_PUBLIC eth_lag_intf_mgr */ virtual uint32_t min_links(intf_id_t eth_lag_intf_id) const = 0; + /** + * Returns the minimum speed in Mbps required before this LAG interface + * is considered `OPER_STATUS_UP`. + * If the LAG interface does not exist, 0 will be returned. + */ + uint64_t min_speed(intf_id_t eth_lag_intf_id) const; + + /** + * Sets the min speed for a LAG interface, in Mbps. It's a no-op if the specified + * LAG interface does not exist. + */ + void min_speed_is(intf_id_t eth_lag_intf_id, uint64_t min_speed); + /** * Sets the fallback type for a LAG interface. It's a no-op if the LAG * interface does not exist. Throws "invalid_argument_error" exception if diff --git a/eos/inline/types/acl.h b/eos/inline/types/acl.h index e1c3fe6..aef9282 100644 --- a/eos/inline/types/acl.h +++ b/eos/inline/types/acl.h @@ -183,10 +183,18 @@ acl_port_spec_t::ports_is(std::list const & ports) { pimpl->ports_is(ports); } void +acl_port_spec_t::ports_is(std::list && ports) { + pimpl->ports_is(std::move(ports)); +} +void acl_port_spec_t::port_set(uint16_t const & ports) { pimpl->port_set(ports); } void +acl_port_spec_t::port_set(uint16_t && ports) { + pimpl->port_set(std::move(ports)); +} +void acl_port_spec_t::port_del(uint16_t const & ports) { pimpl->port_del(ports); } @@ -399,6 +407,10 @@ void acl_rule_ip_t::source_addr_is(ip_addr_mask_t const & source_addr) { pimpl->source_addr_is(source_addr); } +void +acl_rule_ip_t::source_addr_is(ip_addr_mask_t && source_addr) { + pimpl->source_addr_is(std::move(source_addr)); +} ip_addr_mask_t acl_rule_ip_t::destination_addr() const { return pimpl->destination_addr(); @@ -407,6 +419,10 @@ void acl_rule_ip_t::destination_addr_is(ip_addr_mask_t const & destination_addr) { pimpl->destination_addr_is(destination_addr); } +void +acl_rule_ip_t::destination_addr_is(ip_addr_mask_t && destination_addr) { + pimpl->destination_addr_is(std::move(destination_addr)); +} acl_port_spec_t acl_rule_ip_t::source_port() const { return pimpl->source_port(); diff --git a/eos/inline/types/acl_impl.h b/eos/inline/types/acl_impl.h index 95e3b76..840dacc 100644 --- a/eos/inline/types/acl_impl.h +++ b/eos/inline/types/acl_impl.h @@ -136,11 +136,21 @@ acl_port_spec_impl_t::ports_is(std::list const & ports) { ports_ = ports; } +void +acl_port_spec_impl_t::ports_is(std::list && ports) { + ports_ = std::move(ports); +} + void acl_port_spec_impl_t::port_set(uint16_t const & ports) { ports_.push_front(ports); } +void +acl_port_spec_impl_t::port_set(uint16_t && ports) { + ports_.push_front(std::move(ports)); +} + void acl_port_spec_impl_t::port_del(uint16_t const & ports) { ports_.remove(ports); @@ -414,6 +424,11 @@ acl_rule_ip_impl_t::source_addr_is(ip_addr_mask_t const & source_addr) { source_addr_ = source_addr; } +void +acl_rule_ip_impl_t::source_addr_is(ip_addr_mask_t && source_addr) { + source_addr_ = std::move(source_addr); +} + ip_addr_mask_t acl_rule_ip_impl_t::destination_addr() const { return destination_addr_; @@ -424,6 +439,11 @@ acl_rule_ip_impl_t::destination_addr_is(ip_addr_mask_t const & destination_addr) destination_addr_ = destination_addr; } +void +acl_rule_ip_impl_t::destination_addr_is(ip_addr_mask_t && destination_addr) { + destination_addr_ = std::move(destination_addr); +} + acl_port_spec_t acl_rule_ip_impl_t::source_port() const { return source_port_; diff --git a/eos/inline/types/bgp.h b/eos/inline/types/bgp.h index 8c8ce83..48afa51 100644 --- a/eos/inline/types/bgp.h +++ b/eos/inline/types/bgp.h @@ -14,6 +14,10 @@ void bgp_peer_key_t::vrf_name_is(std::string const & vrf_name) { pimpl->vrf_name_is(vrf_name); } +void +bgp_peer_key_t::vrf_name_is(std::string && vrf_name) { + pimpl->vrf_name_is(std::move(vrf_name)); +} ip_addr_t bgp_peer_key_t::peer_addr() const { return pimpl->peer_addr(); @@ -22,6 +26,10 @@ void bgp_peer_key_t::peer_addr_is(ip_addr_t const & peer_addr) { pimpl->peer_addr_is(peer_addr); } +void +bgp_peer_key_t::peer_addr_is(ip_addr_t && peer_addr) { + pimpl->peer_addr_is(std::move(peer_addr)); +} bool bgp_peer_key_t::operator==(bgp_peer_key_t const & other) const { return pimpl->operator==(*other.pimpl); diff --git a/eos/inline/types/bgp_impl.h b/eos/inline/types/bgp_impl.h index e82c471..dc986b4 100644 --- a/eos/inline/types/bgp_impl.h +++ b/eos/inline/types/bgp_impl.h @@ -25,6 +25,11 @@ bgp_peer_key_impl_t::vrf_name_is(std::string const & vrf_name) { vrf_name_ = vrf_name; } +void +bgp_peer_key_impl_t::vrf_name_is(std::string && vrf_name) { + vrf_name_ = std::move(vrf_name); +} + ip_addr_t bgp_peer_key_impl_t::peer_addr() const { return peer_addr_; @@ -35,6 +40,11 @@ bgp_peer_key_impl_t::peer_addr_is(ip_addr_t const & peer_addr) { peer_addr_ = peer_addr; } +void +bgp_peer_key_impl_t::peer_addr_is(ip_addr_t && peer_addr) { + peer_addr_ = std::move(peer_addr); +} + bool bgp_peer_key_impl_t::operator==(bgp_peer_key_impl_t const & other) const { return vrf_name_ == other.vrf_name_ && diff --git a/eos/inline/types/bgp_path.h b/eos/inline/types/bgp_path.h index 702492a..38ac523 100644 --- a/eos/inline/types/bgp_path.h +++ b/eos/inline/types/bgp_path.h @@ -92,6 +92,11 @@ bgp_path_options_t::path_attr_fields_is( bgp_path_attr_fields_t const & path_attr_fields) { pimpl->path_attr_fields_is(path_attr_fields); } +void +bgp_path_options_t::path_attr_fields_is(bgp_path_attr_fields_t && path_attr_fields) + { + pimpl->path_attr_fields_is(std::move(path_attr_fields)); +} bool bgp_path_options_t::operator==(bgp_path_options_t const & other) const { return pimpl->operator==(*other.pimpl); @@ -126,6 +131,10 @@ void bgp_path_attr_t::next_hop_is(ip_addr_t const & next_hop) { pimpl->next_hop_is(next_hop); } +void +bgp_path_attr_t::next_hop_is(ip_addr_t && next_hop) { + pimpl->next_hop_is(std::move(next_hop)); +} uint8_t bgp_path_attr_t::origin() const { return pimpl->origin(); @@ -160,10 +169,18 @@ bgp_path_attr_t::community_list_is( pimpl->community_list_is(community_list); } void +bgp_path_attr_t::community_list_is(std::unordered_set && community_list) { + pimpl->community_list_is(std::move(community_list)); +} +void bgp_path_attr_t::community_list_set(uint32_t const & value) { pimpl->community_list_set(value); } void +bgp_path_attr_t::community_list_set(uint32_t && value) { + pimpl->community_list_set(std::move(value)); +} +void bgp_path_attr_t::community_list_del(uint32_t const & value) { pimpl->community_list_del(value); } @@ -201,6 +218,10 @@ void bgp_path_key_t::prefix_is(ip_prefix_t const & prefix) { pimpl->prefix_is(prefix); } +void +bgp_path_key_t::prefix_is(ip_prefix_t && prefix) { + pimpl->prefix_is(std::move(prefix)); +} ip_addr_t bgp_path_key_t::peer_addr() const { return pimpl->peer_addr(); @@ -209,6 +230,10 @@ void bgp_path_key_t::peer_addr_is(ip_addr_t const & peer_addr) { pimpl->peer_addr_is(peer_addr); } +void +bgp_path_key_t::peer_addr_is(ip_addr_t && peer_addr) { + pimpl->peer_addr_is(std::move(peer_addr)); +} std::string bgp_path_key_t::vrf_name() const { return pimpl->vrf_name(); @@ -217,6 +242,10 @@ void bgp_path_key_t::vrf_name_is(std::string const & vrf_name) { pimpl->vrf_name_is(vrf_name); } +void +bgp_path_key_t::vrf_name_is(std::string && vrf_name) { + pimpl->vrf_name_is(std::move(vrf_name)); +} bool bgp_path_key_t::operator==(bgp_path_key_t const & other) const { return pimpl->operator==(*other.pimpl); @@ -255,6 +284,10 @@ void bgp_path_t::path_key_is(bgp_path_key_t const & path_key) { pimpl->path_key_is(path_key); } +void +bgp_path_t::path_key_is(bgp_path_key_t && path_key) { + pimpl->path_key_is(std::move(path_key)); +} bgp_path_attr_t bgp_path_t::path_attr() const { return pimpl->path_attr(); @@ -263,6 +296,10 @@ void bgp_path_t::path_attr_is(bgp_path_attr_t const & path_attr) { pimpl->path_attr_is(path_attr); } +void +bgp_path_t::path_attr_is(bgp_path_attr_t && path_attr) { + pimpl->path_attr_is(std::move(path_attr)); +} bool bgp_path_t::operator==(bgp_path_t const & other) const { return pimpl->operator==(*other.pimpl); diff --git a/eos/inline/types/bgp_path_impl.h b/eos/inline/types/bgp_path_impl.h index b8b7e53..0c77d85 100644 --- a/eos/inline/types/bgp_path_impl.h +++ b/eos/inline/types/bgp_path_impl.h @@ -113,6 +113,12 @@ bgp_path_options_impl_t::path_attr_fields_is( path_attr_fields_ = path_attr_fields; } +void +bgp_path_options_impl_t::path_attr_fields_is( + bgp_path_attr_fields_t && path_attr_fields) { + path_attr_fields_ = std::move(path_attr_fields); +} + bool bgp_path_options_impl_t::operator==(bgp_path_options_impl_t const & other) const { return receive_route_stage_ == other.receive_route_stage_ && @@ -175,6 +181,11 @@ bgp_path_attr_impl_t::next_hop_is(ip_addr_t const & next_hop) { next_hop_ = next_hop; } +void +bgp_path_attr_impl_t::next_hop_is(ip_addr_t && next_hop) { + next_hop_ = std::move(next_hop); +} + uint8_t bgp_path_attr_impl_t::origin() const { return origin_; @@ -216,11 +227,22 @@ bgp_path_attr_impl_t::community_list_is( community_list_ = community_list; } +void +bgp_path_attr_impl_t::community_list_is( + std::unordered_set && community_list) { + community_list_ = std::move(community_list); +} + void bgp_path_attr_impl_t::community_list_set(uint32_t const & value) { community_list_.insert(value); } +void +bgp_path_attr_impl_t::community_list_set(uint32_t && value) { + community_list_.emplace(std::move(value)); +} + void bgp_path_attr_impl_t::community_list_del(uint32_t const & value) { community_list_.erase(value); @@ -311,6 +333,11 @@ bgp_path_key_impl_t::prefix_is(ip_prefix_t const & prefix) { prefix_ = prefix; } +void +bgp_path_key_impl_t::prefix_is(ip_prefix_t && prefix) { + prefix_ = std::move(prefix); +} + ip_addr_t bgp_path_key_impl_t::peer_addr() const { return peer_addr_; @@ -321,6 +348,11 @@ bgp_path_key_impl_t::peer_addr_is(ip_addr_t const & peer_addr) { peer_addr_ = peer_addr; } +void +bgp_path_key_impl_t::peer_addr_is(ip_addr_t && peer_addr) { + peer_addr_ = std::move(peer_addr); +} + std::string bgp_path_key_impl_t::vrf_name() const { return vrf_name_; @@ -331,6 +363,11 @@ bgp_path_key_impl_t::vrf_name_is(std::string const & vrf_name) { vrf_name_ = vrf_name; } +void +bgp_path_key_impl_t::vrf_name_is(std::string && vrf_name) { + vrf_name_ = std::move(vrf_name); +} + bool bgp_path_key_impl_t::operator==(bgp_path_key_impl_t const & other) const { return prefix_ == other.prefix_ && @@ -406,6 +443,11 @@ bgp_path_impl_t::path_key_is(bgp_path_key_t const & path_key) { path_key_ = path_key; } +void +bgp_path_impl_t::path_key_is(bgp_path_key_t && path_key) { + path_key_ = std::move(path_key); +} + bgp_path_attr_t bgp_path_impl_t::path_attr() const { return path_attr_; @@ -416,6 +458,11 @@ bgp_path_impl_t::path_attr_is(bgp_path_attr_t const & path_attr) { path_attr_ = path_attr; } +void +bgp_path_impl_t::path_attr_is(bgp_path_attr_t && path_attr) { + path_attr_ = std::move(path_attr); +} + bool bgp_path_impl_t::operator==(bgp_path_impl_t const & other) const { return path_key_ == other.path_key_ && diff --git a/eos/inline/types/class_map.h b/eos/inline/types/class_map.h index 2d5e509..3334ec8 100644 --- a/eos/inline/types/class_map.h +++ b/eos/inline/types/class_map.h @@ -44,6 +44,10 @@ void class_map_t::key_is(class_map_key_t const & key) { pimpl->key_is(key); } +void +class_map_t::key_is(class_map_key_t && key) { + pimpl->key_is(std::move(key)); +} std::map const & class_map_t::rules() const { return pimpl->rules(); @@ -53,10 +57,18 @@ class_map_t::rules_is(std::map const & rules) { pimpl->rules_is(rules); } void +class_map_t::rules_is(std::map && rules) { + pimpl->rules_is(std::move(rules)); +} +void class_map_t::rule_set(uint32_t key, class_map_rule_t const & value) { pimpl->rule_set(key, value); } void +class_map_t::rule_set(uint32_t key, class_map_rule_t && value) { + pimpl->rule_set(key, std::move(value)); +} +void class_map_t::rule_del(uint32_t key) { pimpl->rule_del(key); } diff --git a/eos/inline/types/class_map_impl.h b/eos/inline/types/class_map_impl.h index 9da5b39..61a5ea1 100644 --- a/eos/inline/types/class_map_impl.h +++ b/eos/inline/types/class_map_impl.h @@ -78,6 +78,11 @@ class_map_impl_t::key_is(class_map_key_t const & key) { key_ = key; } +void +class_map_impl_t::key_is(class_map_key_t && key) { + key_ = std::move(key); +} + std::map const & class_map_impl_t::rules() const { return rules_; @@ -88,11 +93,21 @@ class_map_impl_t::rules_is(std::map const & rules) { rules_ = rules; } +void +class_map_impl_t::rules_is(std::map && rules) { + rules_ = std::move(rules); +} + void class_map_impl_t::rule_set(uint32_t key, class_map_rule_t const & value) { rules_[key] = value; } +void +class_map_impl_t::rule_set(uint32_t key, class_map_rule_t && value) { + rules_[key] = std::move(value); +} + void class_map_impl_t::rule_del(uint32_t key) { rules_.erase(key); diff --git a/eos/inline/types/decap_group.h b/eos/inline/types/decap_group.h index b5bef91..554445d 100644 --- a/eos/inline/types/decap_group.h +++ b/eos/inline/types/decap_group.h @@ -31,6 +31,10 @@ void decap_group_t::destination_addr_is(ip_addr_t const & destination_addr) { pimpl->destination_addr_is(destination_addr); } +void +decap_group_t::destination_addr_is(ip_addr_t && destination_addr) { + pimpl->destination_addr_is(std::move(destination_addr)); +} decap_protocol_type_t decap_group_t::protocol_type() const { return pimpl->protocol_type(); diff --git a/eos/inline/types/decap_group_impl.h b/eos/inline/types/decap_group_impl.h index 5887246..d9b1b56 100644 --- a/eos/inline/types/decap_group_impl.h +++ b/eos/inline/types/decap_group_impl.h @@ -38,6 +38,11 @@ decap_group_impl_t::destination_addr_is(ip_addr_t const & destination_addr) { destination_addr_ = destination_addr; } +void +decap_group_impl_t::destination_addr_is(ip_addr_t && destination_addr) { + destination_addr_ = std::move(destination_addr); +} + decap_protocol_type_t decap_group_impl_t::protocol_type() const { return protocol_type_; diff --git a/eos/inline/types/directflow.h b/eos/inline/types/directflow.h index d1622ba..34cafbc 100644 --- a/eos/inline/types/directflow.h +++ b/eos/inline/types/directflow.h @@ -74,10 +74,18 @@ flow_match_t::input_intfs_is(std::set const & input_intfs) { pimpl->input_intfs_is(input_intfs); } void +flow_match_t::input_intfs_is(std::set && input_intfs) { + pimpl->input_intfs_is(std::move(input_intfs)); +} +void flow_match_t::input_intf_set(intf_id_t const & value) { pimpl->input_intf_set(value); } void +flow_match_t::input_intf_set(intf_id_t && value) { + pimpl->input_intf_set(std::move(value)); +} +void flow_match_t::input_intf_del(intf_id_t const & value) { pimpl->input_intf_del(value); } @@ -166,6 +174,10 @@ flow_match_t::ip_src_is(ip_addr_t const & ip_src) { pimpl->ip_src_is(ip_src); } void +flow_match_t::ip_src_is(ip_addr_t && ip_src) { + pimpl->ip_src_is(std::move(ip_src)); +} +void flow_match_t::ip_src_is(ip_addr_t const & src, ip_addr_t const & mask) { pimpl->ip_src_is(src, mask); } @@ -177,6 +189,10 @@ void flow_match_t::ip_src_mask_is(ip_addr_t const & ip_src_mask) { pimpl->ip_src_mask_is(ip_src_mask); } +void +flow_match_t::ip_src_mask_is(ip_addr_t && ip_src_mask) { + pimpl->ip_src_mask_is(std::move(ip_src_mask)); +} ip_addr_t flow_match_t::ip_dst() const { return pimpl->ip_dst(); @@ -186,6 +202,10 @@ flow_match_t::ip_dst_is(ip_addr_t const & ip_dst) { pimpl->ip_dst_is(ip_dst); } void +flow_match_t::ip_dst_is(ip_addr_t && ip_dst) { + pimpl->ip_dst_is(std::move(ip_dst)); +} +void flow_match_t::ip_dst_is(ip_addr_t const & dst, ip_addr_t const & mask) { pimpl->ip_dst_is(dst, mask); } @@ -197,6 +217,10 @@ void flow_match_t::ip_dst_mask_is(ip_addr_t const & ip_dst_mask) { pimpl->ip_dst_mask_is(ip_dst_mask); } +void +flow_match_t::ip_dst_mask_is(ip_addr_t && ip_dst_mask) { + pimpl->ip_dst_mask_is(std::move(ip_dst_mask)); +} bool flow_match_t::operator==(flow_match_t const & other) const { return pimpl->operator==(*other.pimpl); @@ -287,10 +311,18 @@ flow_action_t::output_intfs_is(std::set const & output_intfs) { pimpl->output_intfs_is(output_intfs); } void +flow_action_t::output_intfs_is(std::set && output_intfs) { + pimpl->output_intfs_is(std::move(output_intfs)); +} +void flow_action_t::output_intf_set(intf_id_t const & value) { pimpl->output_intf_set(value); } void +flow_action_t::output_intf_set(intf_id_t && value) { + pimpl->output_intf_set(std::move(value)); +} +void flow_action_t::output_intf_del(intf_id_t const & value) { pimpl->output_intf_del(value); } @@ -334,6 +366,10 @@ void flow_action_t::ip_src_is(ip_addr_t const & ip_src) { pimpl->ip_src_is(ip_src); } +void +flow_action_t::ip_src_is(ip_addr_t && ip_src) { + pimpl->ip_src_is(std::move(ip_src)); +} ip_addr_t flow_action_t::ip_dst() const { return pimpl->ip_dst(); @@ -342,6 +378,10 @@ void flow_action_t::ip_dst_is(ip_addr_t const & ip_dst) { pimpl->ip_dst_is(ip_dst); } +void +flow_action_t::ip_dst_is(ip_addr_t && ip_dst) { + pimpl->ip_dst_is(std::move(ip_dst)); +} bool flow_action_t::operator==(flow_action_t const & other) const { return pimpl->operator==(*other.pimpl); diff --git a/eos/inline/types/directflow_impl.h b/eos/inline/types/directflow_impl.h index 58bdd76..20f1d2c 100644 --- a/eos/inline/types/directflow_impl.h +++ b/eos/inline/types/directflow_impl.h @@ -34,11 +34,21 @@ flow_match_impl_t::input_intfs_is(std::set const & input_intfs) { input_intfs_ = input_intfs; } +void +flow_match_impl_t::input_intfs_is(std::set && input_intfs) { + input_intfs_ = std::move(input_intfs); +} + void flow_match_impl_t::input_intf_set(intf_id_t const & value) { input_intfs_.insert(value); } +void +flow_match_impl_t::input_intf_set(intf_id_t && value) { + input_intfs_.emplace(std::move(value)); +} + void flow_match_impl_t::input_intf_del(intf_id_t const & value) { input_intfs_.erase(value); @@ -152,6 +162,11 @@ flow_match_impl_t::ip_src_is(ip_addr_t const & ip_src) { ip_src_ = ip_src; } +void +flow_match_impl_t::ip_src_is(ip_addr_t && ip_src) { + ip_src_ = std::move(ip_src); +} + void flow_match_impl_t::ip_src_is(ip_addr_t const & src, ip_addr_t const & mask) { ip_src_ = src; @@ -168,6 +183,11 @@ flow_match_impl_t::ip_src_mask_is(ip_addr_t const & ip_src_mask) { ip_src_mask_ = ip_src_mask; } +void +flow_match_impl_t::ip_src_mask_is(ip_addr_t && ip_src_mask) { + ip_src_mask_ = std::move(ip_src_mask); +} + ip_addr_t flow_match_impl_t::ip_dst() const { return ip_dst_; @@ -178,6 +198,11 @@ flow_match_impl_t::ip_dst_is(ip_addr_t const & ip_dst) { ip_dst_ = ip_dst; } +void +flow_match_impl_t::ip_dst_is(ip_addr_t && ip_dst) { + ip_dst_ = std::move(ip_dst); +} + void flow_match_impl_t::ip_dst_is(ip_addr_t const & dst, ip_addr_t const & mask) { ip_dst_ = dst; @@ -194,6 +219,11 @@ flow_match_impl_t::ip_dst_mask_is(ip_addr_t const & ip_dst_mask) { ip_dst_mask_ = ip_dst_mask; } +void +flow_match_impl_t::ip_dst_mask_is(ip_addr_t && ip_dst_mask) { + ip_dst_mask_ = std::move(ip_dst_mask); +} + bool flow_match_impl_t::operator==(flow_match_impl_t const & other) const { return match_field_set_ == other.match_field_set_ && @@ -347,11 +377,21 @@ flow_action_impl_t::output_intfs_is(std::set const & output_intfs) { output_intfs_ = output_intfs; } +void +flow_action_impl_t::output_intfs_is(std::set && output_intfs) { + output_intfs_ = std::move(output_intfs); +} + void flow_action_impl_t::output_intf_set(intf_id_t const & value) { output_intfs_.insert(value); } +void +flow_action_impl_t::output_intf_set(intf_id_t && value) { + output_intfs_.emplace(std::move(value)); +} + void flow_action_impl_t::output_intf_del(intf_id_t const & value) { output_intfs_.erase(value); @@ -413,6 +453,11 @@ flow_action_impl_t::ip_src_is(ip_addr_t const & ip_src) { ip_src_ = ip_src; } +void +flow_action_impl_t::ip_src_is(ip_addr_t && ip_src) { + ip_src_ = std::move(ip_src); +} + ip_addr_t flow_action_impl_t::ip_dst() const { return ip_dst_; @@ -423,6 +468,11 @@ flow_action_impl_t::ip_dst_is(ip_addr_t const & ip_dst) { ip_dst_ = ip_dst; } +void +flow_action_impl_t::ip_dst_is(ip_addr_t && ip_dst) { + ip_dst_ = std::move(ip_dst); +} + bool flow_action_impl_t::operator==(flow_action_impl_t const & other) const { return action_set_ == other.action_set_ && diff --git a/eos/inline/types/eth_lag_intf.h b/eos/inline/types/eth_lag_intf.h index 2bf59b2..3f8d534 100644 --- a/eos/inline/types/eth_lag_intf.h +++ b/eos/inline/types/eth_lag_intf.h @@ -98,6 +98,10 @@ void eth_lag_intf_membership_t::reason_is(std::string const & reason) { pimpl->reason_is(reason); } +void +eth_lag_intf_membership_t::reason_is(std::string && reason) { + pimpl->reason_is(std::move(reason)); +} double eth_lag_intf_membership_t::member_time() const { return pimpl->member_time(); @@ -159,6 +163,10 @@ uint16_t eth_lag_intf_t::fallback_timeout() const { return pimpl->fallback_timeout(); } +uint64_t +eth_lag_intf_t::min_speed() const { + return pimpl->min_speed(); +} uint16_t eth_lag_intf_t::fallback_timeout_default() const { return pimpl->fallback_timeout_default(); diff --git a/eos/inline/types/eth_lag_intf_impl.h b/eos/inline/types/eth_lag_intf_impl.h index 91d286f..fe9be29 100644 --- a/eos/inline/types/eth_lag_intf_impl.h +++ b/eos/inline/types/eth_lag_intf_impl.h @@ -54,6 +54,11 @@ eth_lag_intf_membership_impl_t::reason_is(std::string const & reason) { reason_ = reason; } +void +eth_lag_intf_membership_impl_t::reason_is(std::string && reason) { + reason_ = std::move(reason); +} + double eth_lag_intf_membership_impl_t::member_time() const { return member_time_; @@ -137,19 +142,23 @@ operator<<(std::ostream& os, const eth_lag_intf_membership_impl_t& obj) { // Default constructor. eth_lag_intf_impl_t::eth_lag_intf_impl_t() : intf_(intf_id_t()), speed_(0), min_links_(0), - fallback_type_(ETH_LAG_INTF_FALLBACK_NONE), fallback_timeout_(90) { + fallback_type_(ETH_LAG_INTF_FALLBACK_NONE), fallback_timeout_(90), + min_speed_(0) { } eth_lag_intf_impl_t::eth_lag_intf_impl_t(intf_id_t intf) : intf_(intf), speed_(0), min_links_(0), - fallback_type_(ETH_LAG_INTF_FALLBACK_NONE), fallback_timeout_(90) { + fallback_type_(ETH_LAG_INTF_FALLBACK_NONE), fallback_timeout_(90), + min_speed_(0) { } eth_lag_intf_impl_t::eth_lag_intf_impl_t( intf_id_t intf, uint32_t min_links, uint64_t speed, - eth_lag_intf_fallback_type_t fallback_type, uint16_t fallback_timeout) : + eth_lag_intf_fallback_type_t fallback_type, uint16_t fallback_timeout, + uint64_t min_speed) : intf_(intf), speed_(speed), min_links_(min_links), - fallback_type_(fallback_type), fallback_timeout_(fallback_timeout) { + fallback_type_(fallback_type), fallback_timeout_(fallback_timeout), + min_speed_(min_speed) { } intf_id_t @@ -177,6 +186,11 @@ eth_lag_intf_impl_t::fallback_timeout() const { return fallback_timeout_; } +uint64_t +eth_lag_intf_impl_t::min_speed() const { + return min_speed_; +} + uint16_t eth_lag_intf_impl_t::fallback_timeout_default() const { return ETH_LAG_INTF_FALLBACK_TIMEOUT_DEFAULT; @@ -188,7 +202,8 @@ eth_lag_intf_impl_t::operator==(eth_lag_intf_impl_t const & other) const { speed_ == other.speed_ && min_links_ == other.min_links_ && fallback_type_ == other.fallback_type_ && - fallback_timeout_ == other.fallback_timeout_; + fallback_timeout_ == other.fallback_timeout_ && + min_speed_ == other.min_speed_; } bool @@ -208,6 +223,8 @@ eth_lag_intf_impl_t::operator<(eth_lag_intf_impl_t const & other) const { return fallback_type_ < other.fallback_type_; } else if(fallback_timeout_ != other.fallback_timeout_) { return fallback_timeout_ < other.fallback_timeout_; + } else if(min_speed_ != other.min_speed_) { + return min_speed_ < other.min_speed_; } return false; } @@ -226,6 +243,7 @@ eth_lag_intf_impl_t::mix_me(hash_mix & h) const { h.mix(min_links_); // uint32_t h.mix(fallback_type_); // eth_lag_intf_fallback_type_t h.mix(fallback_timeout_); // uint16_t + h.mix(min_speed_); // uint64_t } std::string @@ -237,6 +255,7 @@ eth_lag_intf_impl_t::to_string() const { ss << ", min_links=" << min_links_; ss << ", fallback_type=" << fallback_type_; ss << ", fallback_timeout=" << fallback_timeout_; + ss << ", min_speed=" << min_speed_; ss << ")"; return ss.str(); } diff --git a/eos/inline/types/fib.h b/eos/inline/types/fib.h index 74debdc..b7427b2 100644 --- a/eos/inline/types/fib.h +++ b/eos/inline/types/fib.h @@ -14,6 +14,10 @@ void fib_route_key_t::prefix_is(ip_prefix_t const & prefix) { pimpl->prefix_is(prefix); } +void +fib_route_key_t::prefix_is(ip_prefix_t && prefix) { + pimpl->prefix_is(std::move(prefix)); +} bool fib_route_key_t::operator==(fib_route_key_t const & other) const { return pimpl->operator==(*other.pimpl); @@ -111,6 +115,10 @@ void fib_route_t::route_key_is(fib_route_key_t const & route_key) { pimpl->route_key_is(route_key); } +void +fib_route_t::route_key_is(fib_route_key_t && route_key) { + pimpl->route_key_is(std::move(route_key)); +} ip_route_preference_t fib_route_t::preference() const { return pimpl->preference(); @@ -211,6 +219,10 @@ void fib_via_t::hop_is(ip_addr_t const & hop) { pimpl->hop_is(hop); } +void +fib_via_t::hop_is(ip_addr_t && hop) { + pimpl->hop_is(std::move(hop)); +} intf_id_t fib_via_t::intf() const { return pimpl->intf(); @@ -311,10 +323,18 @@ fib_fec_t::via_is(std::forward_list const & via) { pimpl->via_is(via); } void +fib_fec_t::via_is(std::forward_list && via) { + pimpl->via_is(std::move(via)); +} +void fib_fec_t::via_set(fib_via_t const & via) { pimpl->via_set(via); } void +fib_fec_t::via_set(fib_via_t && via) { + pimpl->via_set(std::move(via)); +} +void fib_fec_t::via_del(fib_via_t const & via) { pimpl->via_del(via); } diff --git a/eos/inline/types/fib_impl.h b/eos/inline/types/fib_impl.h index b596b3a..aab3247 100644 --- a/eos/inline/types/fib_impl.h +++ b/eos/inline/types/fib_impl.h @@ -25,6 +25,11 @@ fib_route_key_impl_t::prefix_is(ip_prefix_t const & prefix) { prefix_ = prefix; } +void +fib_route_key_impl_t::prefix_is(ip_prefix_t && prefix) { + prefix_ = std::move(prefix); +} + bool fib_route_key_impl_t::operator==(fib_route_key_impl_t const & other) const { return prefix_ == other.prefix_; @@ -85,6 +90,11 @@ fib_route_impl_t::route_key_is(fib_route_key_t const & route_key) { route_key_ = route_key; } +void +fib_route_impl_t::route_key_is(fib_route_key_t && route_key) { + route_key_ = std::move(route_key); +} + ip_route_preference_t fib_route_impl_t::preference() const { return preference_; @@ -253,6 +263,11 @@ fib_via_impl_t::hop_is(ip_addr_t const & hop) { hop_ = hop; } +void +fib_via_impl_t::hop_is(ip_addr_t && hop) { + hop_ = std::move(hop); +} + intf_id_t fib_via_impl_t::intf() const { return intf_; @@ -369,11 +384,21 @@ fib_fec_impl_t::via_is(std::forward_list const & via) { via_ = via; } +void +fib_fec_impl_t::via_is(std::forward_list && via) { + via_ = std::move(via); +} + void fib_fec_impl_t::via_set(fib_via_t const & via) { via_.push_front(via); } +void +fib_fec_impl_t::via_set(fib_via_t && via) { + via_.push_front(std::move(via)); +} + void fib_fec_impl_t::via_del(fib_via_t const & via) { via_.remove(via); diff --git a/eos/inline/types/ip_route.h b/eos/inline/types/ip_route.h index 67f7589..dfd369c 100644 --- a/eos/inline/types/ip_route.h +++ b/eos/inline/types/ip_route.h @@ -31,6 +31,10 @@ void ip_route_key_t::prefix_is(ip_prefix_t const & prefix) { pimpl->prefix_is(prefix); } +void +ip_route_key_t::prefix_is(ip_prefix_t && prefix) { + pimpl->prefix_is(std::move(prefix)); +} ip_route_preference_t ip_route_key_t::preference() const { return pimpl->preference(); @@ -77,6 +81,10 @@ void ip_route_t::key_is(ip_route_key_t const & key) { pimpl->key_is(key); } +void +ip_route_t::key_is(ip_route_key_t && key) { + pimpl->key_is(std::move(key)); +} ip_route_tag_t ip_route_t::tag() const { return pimpl->tag(); @@ -101,6 +109,10 @@ void ip_route_t::command_tag_is(std::string const & command_tag) { pimpl->command_tag_is(command_tag); } +void +ip_route_t::command_tag_is(std::string && command_tag) { + pimpl->command_tag_is(std::move(command_tag)); +} af_t ip_route_t::af() const { return pimpl->af(); @@ -139,6 +151,10 @@ void ip_route_via_t::route_key_is(ip_route_key_t const & route_key) { pimpl->route_key_is(route_key); } +void +ip_route_via_t::route_key_is(ip_route_key_t && route_key) { + pimpl->route_key_is(std::move(route_key)); +} ip_addr_t ip_route_via_t::hop() const { return pimpl->hop(); @@ -147,6 +163,10 @@ void ip_route_via_t::hop_is(ip_addr_t const & hop) { pimpl->hop_is(hop); } +void +ip_route_via_t::hop_is(ip_addr_t && hop) { + pimpl->hop_is(std::move(hop)); +} intf_id_t ip_route_via_t::intf() const { return pimpl->intf(); @@ -163,6 +183,10 @@ void ip_route_via_t::nexthop_group_is(std::string const & nexthop_group) { pimpl->nexthop_group_is(nexthop_group); } +void +ip_route_via_t::nexthop_group_is(std::string && nexthop_group) { + pimpl->nexthop_group_is(std::move(nexthop_group)); +} mpls_label_t ip_route_via_t::mpls_label() const { return pimpl->mpls_label(); @@ -203,6 +227,10 @@ void ip_route_via_t::egress_vrf_is(std::string const & egress_vrf) { pimpl->egress_vrf_is(egress_vrf); } +void +ip_route_via_t::egress_vrf_is(std::string && egress_vrf) { + pimpl->egress_vrf_is(std::move(egress_vrf)); +} ip_via_metric_t ip_route_via_t::metric() const { return pimpl->metric(); diff --git a/eos/inline/types/ip_route_impl.h b/eos/inline/types/ip_route_impl.h index 0638689..7f4d1de 100644 --- a/eos/inline/types/ip_route_impl.h +++ b/eos/inline/types/ip_route_impl.h @@ -31,6 +31,11 @@ ip_route_key_impl_t::prefix_is(ip_prefix_t const & prefix) { prefix_ = prefix; } +void +ip_route_key_impl_t::prefix_is(ip_prefix_t && prefix) { + prefix_ = std::move(prefix); +} + ip_route_preference_t ip_route_key_impl_t::preference() const { return preference_; @@ -106,6 +111,11 @@ ip_route_impl_t::key_is(ip_route_key_t const & key) { key_ = key; } +void +ip_route_impl_t::key_is(ip_route_key_t && key) { + key_ = std::move(key); +} + ip_route_tag_t ip_route_impl_t::tag() const { return tag_; @@ -136,6 +146,11 @@ ip_route_impl_t::command_tag_is(std::string const & command_tag) { command_tag_ = command_tag; } +void +ip_route_impl_t::command_tag_is(std::string && command_tag) { + command_tag_ = std::move(command_tag); +} + af_t ip_route_impl_t::af() const { return key_.af(); @@ -211,6 +226,11 @@ ip_route_via_impl_t::route_key_is(ip_route_key_t const & route_key) { route_key_ = route_key; } +void +ip_route_via_impl_t::route_key_is(ip_route_key_t && route_key) { + route_key_ = std::move(route_key); +} + ip_addr_t ip_route_via_impl_t::hop() const { return hop_; @@ -221,6 +241,11 @@ ip_route_via_impl_t::hop_is(ip_addr_t const & hop) { hop_ = hop; } +void +ip_route_via_impl_t::hop_is(ip_addr_t && hop) { + hop_ = std::move(hop); +} + intf_id_t ip_route_via_impl_t::intf() const { return intf_; @@ -241,6 +266,11 @@ ip_route_via_impl_t::nexthop_group_is(std::string const & nexthop_group) { nexthop_group_ = nexthop_group; } +void +ip_route_via_impl_t::nexthop_group_is(std::string && nexthop_group) { + nexthop_group_ = std::move(nexthop_group); +} + mpls_label_t ip_route_via_impl_t::mpls_label() const { return mpls_label_; @@ -291,6 +321,11 @@ ip_route_via_impl_t::egress_vrf_is(std::string const & egress_vrf) { egress_vrf_ = egress_vrf; } +void +ip_route_via_impl_t::egress_vrf_is(std::string && egress_vrf) { + egress_vrf_ = std::move(egress_vrf); +} + ip_via_metric_t ip_route_via_impl_t::metric() const { return metric_; diff --git a/eos/inline/types/mac_table.h b/eos/inline/types/mac_table.h index 5afff85..3151d90 100644 --- a/eos/inline/types/mac_table.h +++ b/eos/inline/types/mac_table.h @@ -125,6 +125,10 @@ void mac_entry_t::mac_key_is(mac_key_t const & mac_key) { pimpl->mac_key_is(mac_key); } +void +mac_entry_t::mac_key_is(mac_key_t && mac_key) { + pimpl->mac_key_is(std::move(mac_key)); +} std::set const & mac_entry_t::intfs() const { return pimpl->intfs(); @@ -134,10 +138,18 @@ mac_entry_t::intfs_is(std::set const & intfs) { pimpl->intfs_is(intfs); } void +mac_entry_t::intfs_is(std::set && intfs) { + pimpl->intfs_is(std::move(intfs)); +} +void mac_entry_t::intf_set(intf_id_t const & value) { pimpl->intf_set(value); } void +mac_entry_t::intf_set(intf_id_t && value) { + pimpl->intf_set(std::move(value)); +} +void mac_entry_t::intf_del(intf_id_t const & value) { pimpl->intf_del(value); } diff --git a/eos/inline/types/mac_table_impl.h b/eos/inline/types/mac_table_impl.h index cec30cc..13da0a8 100644 --- a/eos/inline/types/mac_table_impl.h +++ b/eos/inline/types/mac_table_impl.h @@ -120,6 +120,11 @@ mac_entry_impl_t::mac_key_is(mac_key_t const & mac_key) { mac_key_ = mac_key; } +void +mac_entry_impl_t::mac_key_is(mac_key_t && mac_key) { + mac_key_ = std::move(mac_key); +} + std::set const & mac_entry_impl_t::intfs() const { return intfs_; @@ -130,11 +135,21 @@ mac_entry_impl_t::intfs_is(std::set const & intfs) { intfs_ = intfs; } +void +mac_entry_impl_t::intfs_is(std::set && intfs) { + intfs_ = std::move(intfs); +} + void mac_entry_impl_t::intf_set(intf_id_t const & value) { intfs_.insert(value); } +void +mac_entry_impl_t::intf_set(intf_id_t && value) { + intfs_.emplace(std::move(value)); +} + void mac_entry_impl_t::intf_del(intf_id_t const & value) { intfs_.erase(value); diff --git a/eos/inline/types/mpls_route.h b/eos/inline/types/mpls_route.h index 9eb218d..c248b05 100644 --- a/eos/inline/types/mpls_route.h +++ b/eos/inline/types/mpls_route.h @@ -15,10 +15,18 @@ mpls_route_key_t::labels_is(std::vector const & labels) { pimpl->labels_is(labels); } void +mpls_route_key_t::labels_is(std::vector && labels) { + pimpl->labels_is(std::move(labels)); +} +void mpls_route_key_t::label_set(uint32_t index, mpls_label_t const & value) { pimpl->label_set(index, value); } void +mpls_route_key_t::label_set(uint32_t index, mpls_label_t && value) { + pimpl->label_set(index, std::move(value)); +} +void mpls_route_key_t::label_del(uint32_t index) { pimpl->label_del(index); } @@ -76,6 +84,14 @@ void mpls_route_t::key_is(mpls_route_key_t key) { pimpl->key_is(key); } +uint32_t +mpls_route_t::version_id() const { + return pimpl->version_id(); +} +void +mpls_route_t::version_id_is(uint32_t version_id) { + pimpl->version_id_is(version_id); +} bool mpls_route_t::operator==(mpls_route_t const & other) const { return pimpl->operator==(*other.pimpl); @@ -118,6 +134,10 @@ void mpls_route_via_t::hop_is(ip_addr_t const & hop) { pimpl->hop_is(hop); } +void +mpls_route_via_t::hop_is(ip_addr_t && hop) { + pimpl->hop_is(std::move(hop)); +} intf_id_t mpls_route_via_t::intf() const { return pimpl->intf(); @@ -126,6 +146,10 @@ void mpls_route_via_t::intf_is(intf_id_t const & intf) { pimpl->intf_is(intf); } +void +mpls_route_via_t::intf_is(intf_id_t && intf) { + pimpl->intf_is(std::move(intf)); +} mpls_label_t mpls_route_via_t::pushswap_label() const { return pimpl->pushswap_label(); diff --git a/eos/inline/types/mpls_route_impl.h b/eos/inline/types/mpls_route_impl.h index 3b6992b..4e8e7b1 100644 --- a/eos/inline/types/mpls_route_impl.h +++ b/eos/inline/types/mpls_route_impl.h @@ -38,11 +38,21 @@ mpls_route_key_impl_t::labels_is(std::vector const & labels) { labels_ = labels; } +void +mpls_route_key_impl_t::labels_is(std::vector && labels) { + labels_ = std::move(labels); +} + void mpls_route_key_impl_t::label_set(uint32_t index, mpls_label_t const & value) { labels_.insert(labels_.begin() + index, value); } +void +mpls_route_key_impl_t::label_set(uint32_t index, mpls_label_t && value) { + labels_.emplace(labels_.begin() + index, std::move(value)); +} + void mpls_route_key_impl_t::label_del(uint32_t index) { labels_.erase(labels_.begin() + index); @@ -143,11 +153,17 @@ operator<<(std::ostream& os, const mpls_route_key_impl_t& obj) { mpls_route_impl_t::mpls_route_impl_t() : - key_() { + key_(), version_id_() { } mpls_route_impl_t::mpls_route_impl_t(mpls_route_key_t key) : - key_(key) { + key_(key), version_id_() { + version_id_ = 0; +} + +mpls_route_impl_t::mpls_route_impl_t(mpls_route_key_t key, + uint32_t version_id) : + key_(key), version_id_(version_id) { } mpls_route_key_t @@ -160,9 +176,20 @@ mpls_route_impl_t::key_is(mpls_route_key_t key) { key_ = key; } +uint32_t +mpls_route_impl_t::version_id() const { + return version_id_; +} + +void +mpls_route_impl_t::version_id_is(uint32_t version_id) { + version_id_ = version_id; +} + bool mpls_route_impl_t::operator==(mpls_route_impl_t const & other) const { - return key_ == other.key_; + return key_ == other.key_ && + version_id_ == other.version_id_; } bool @@ -180,6 +207,7 @@ mpls_route_impl_t::hash() const { void mpls_route_impl_t::mix_me(hash_mix & h) const { h.mix(key_); // mpls_route_key_t + h.mix(version_id_); // uint32_t } std::string @@ -187,6 +215,7 @@ mpls_route_impl_t::to_string() const { std::ostringstream ss; ss << "mpls_route_t("; ss << "key=" << key_; + ss << ", version_id=" << version_id_; ss << ")"; return ss.str(); } @@ -241,6 +270,11 @@ mpls_route_via_impl_t::hop_is(ip_addr_t const & hop) { hop_ = hop; } +void +mpls_route_via_impl_t::hop_is(ip_addr_t && hop) { + hop_ = std::move(hop); +} + intf_id_t mpls_route_via_impl_t::intf() const { return intf_; @@ -251,6 +285,11 @@ mpls_route_via_impl_t::intf_is(intf_id_t const & intf) { intf_ = intf; } +void +mpls_route_via_impl_t::intf_is(intf_id_t && intf) { + intf_ = std::move(intf); +} + mpls_label_t mpls_route_via_impl_t::pushswap_label() const { return pushswap_label_; diff --git a/eos/inline/types/nexthop_group.h b/eos/inline/types/nexthop_group.h index dbb1101..9637336 100644 --- a/eos/inline/types/nexthop_group.h +++ b/eos/inline/types/nexthop_group.h @@ -58,10 +58,19 @@ nexthop_group_mpls_action_t::label_stack_is( pimpl->label_stack_is(label_stack); } void +nexthop_group_mpls_action_t::label_stack_is( + std::forward_list && label_stack) { + pimpl->label_stack_is(std::move(label_stack)); +} +void nexthop_group_mpls_action_t::label_stack_set(mpls_label_t const & label_stack) { pimpl->label_stack_set(label_stack); } void +nexthop_group_mpls_action_t::label_stack_set(mpls_label_t && label_stack) { + pimpl->label_stack_set(std::move(label_stack)); +} +void nexthop_group_mpls_action_t::label_stack_del(mpls_label_t const & label_stack) { pimpl->label_stack_del(label_stack); } @@ -152,6 +161,10 @@ nexthop_group_entry_t::mpls_action_is( nexthop_group_mpls_action_t const & mpls_action) { pimpl->mpls_action_is(mpls_action); } +void +nexthop_group_entry_t::mpls_action_is(nexthop_group_mpls_action_t && mpls_action) { + pimpl->mpls_action_is(std::move(mpls_action)); +} ip_addr_t nexthop_group_entry_t::nexthop() const { return pimpl->nexthop(); @@ -160,6 +173,10 @@ void nexthop_group_entry_t::nexthop_is(ip_addr_t const & nexthop) { pimpl->nexthop_is(nexthop); } +void +nexthop_group_entry_t::nexthop_is(ip_addr_t && nexthop) { + pimpl->nexthop_is(std::move(nexthop)); +} intf_id_t nexthop_group_entry_t::intf() const { return pimpl->intf(); @@ -168,6 +185,10 @@ void nexthop_group_entry_t::intf_is(intf_id_t const & intf) { pimpl->intf_is(intf); } +void +nexthop_group_entry_t::intf_is(intf_id_t && intf) { + pimpl->intf_is(std::move(intf)); +} sbfd_echo_session_key_t nexthop_group_entry_t::sbfd_session_key() const { return pimpl->sbfd_session_key(); @@ -177,6 +198,11 @@ nexthop_group_entry_t::sbfd_session_key_is( sbfd_echo_session_key_t const & sbfd_session_key) { pimpl->sbfd_session_key_is(sbfd_session_key); } +void +nexthop_group_entry_t::sbfd_session_key_is( + sbfd_echo_session_key_t && sbfd_session_key) { + pimpl->sbfd_session_key_is(std::move(sbfd_session_key)); +} std::string nexthop_group_entry_t::child_nexthop_group() const { return pimpl->child_nexthop_group(); @@ -186,6 +212,10 @@ nexthop_group_entry_t::child_nexthop_group_is( std::string const & child_nexthop_group) { pimpl->child_nexthop_group_is(child_nexthop_group); } +void +nexthop_group_entry_t::child_nexthop_group_is(std::string && child_nexthop_group) { + pimpl->child_nexthop_group_is(std::move(child_nexthop_group)); +} bool nexthop_group_entry_t::operator==(nexthop_group_entry_t const & other) const { return pimpl->operator==(*other.pimpl); @@ -244,6 +274,10 @@ void nexthop_group_t::source_ip_is(ip_addr_t const & source_ip) { pimpl->source_ip_is(source_ip); } +void +nexthop_group_t::source_ip_is(ip_addr_t && source_ip) { + pimpl->source_ip_is(std::move(source_ip)); +} intf_id_t nexthop_group_t::source_intf() const { return pimpl->source_intf(); @@ -278,10 +312,19 @@ nexthop_group_t::nexthops_is( pimpl->nexthops_is(nexthops); } void +nexthop_group_t::nexthops_is(std::map && nexthops) + { + pimpl->nexthops_is(std::move(nexthops)); +} +void nexthop_group_t::nexthop_set(uint16_t key, nexthop_group_entry_t const & value) { pimpl->nexthop_set(key, value); } void +nexthop_group_t::nexthop_set(uint16_t key, nexthop_group_entry_t && value) { + pimpl->nexthop_set(key, std::move(value)); +} +void nexthop_group_t::nexthop_del(uint16_t key) { pimpl->nexthop_del(key); } @@ -295,11 +338,20 @@ nexthop_group_t::backup_nexthops_is( pimpl->backup_nexthops_is(backup_nexthops); } void +nexthop_group_t::backup_nexthops_is( + std::map && backup_nexthops) { + pimpl->backup_nexthops_is(std::move(backup_nexthops)); +} +void nexthop_group_t::backup_nexthop_set(uint16_t key, nexthop_group_entry_t const & value) { pimpl->backup_nexthop_set(key, value); } void +nexthop_group_t::backup_nexthop_set(uint16_t key, nexthop_group_entry_t && value) { + pimpl->backup_nexthop_set(key, std::move(value)); +} +void nexthop_group_t::backup_nexthop_del(uint16_t key) { pimpl->backup_nexthop_del(key); } @@ -313,10 +365,19 @@ nexthop_group_t::destination_ips_is( pimpl->destination_ips_is(destination_ips); } void +nexthop_group_t::destination_ips_is( + std::map && destination_ips) { + pimpl->destination_ips_is(std::move(destination_ips)); +} +void nexthop_group_t::destination_ip_set(uint16_t key, ip_addr_t const & value) { pimpl->destination_ip_set(key, value); } void +nexthop_group_t::destination_ip_set(uint16_t key, ip_addr_t && value) { + pimpl->destination_ip_set(key, std::move(value)); +} +void nexthop_group_t::destination_ip_del(uint16_t key) { pimpl->destination_ip_del(key); } @@ -385,11 +446,26 @@ operator<<(std::ostream& os, const nexthop_group_t& obj) { EOS_SDK_PUBLIC std::ostream& operator<<(std::ostream& os, const nexthop_group_counter_state_t & enum_val) { if (enum_val==NEXTHOP_GROUP_COUNTER_INACTIVE) { - os << "NEXTHOP_GROUP_COUNTER_INACTIVE"; + os << "0"; } else if (enum_val==NEXTHOP_GROUP_COUNTER_PROGRAMMING_FAILED) { - os << "NEXTHOP_GROUP_COUNTER_PROGRAMMING_FAILED"; + os << "1"; } else if (enum_val==NEXTHOP_GROUP_COUNTER_PROGRAMMING_COMPLETE) { - os << "NEXTHOP_GROUP_COUNTER_PROGRAMMING_COMPLETE"; + os << "2"; + } else { + os << "Unknown value"; + } + return os; +} + + +EOS_SDK_PUBLIC std::ostream& +operator<<(std::ostream& os, const nexthop_group_programmed_hw_state_t & enum_val) { + if (enum_val==NEXTHOP_GROUP_HW_DROP) { + os << "0"; + } else if (enum_val==NEXTHOP_GROUP_HW_PARTIALLY_PROGRAMMED) { + os << "1"; + } else if (enum_val==NEXTHOP_GROUP_HW_ALL_PROGRAMMED) { + os << "2"; } else { os << "Unknown value"; } @@ -401,6 +477,10 @@ nexthop_group_counter_state_t nexthop_group_programmed_status_t::counter_state() const { return pimpl->counter_state(); } +nexthop_group_programmed_hw_state_t +nexthop_group_programmed_status_t::hw_state() const { + return pimpl->hw_state(); +} bool nexthop_group_programmed_status_t::operator==( nexthop_group_programmed_status_t const & other) const { diff --git a/eos/inline/types/nexthop_group_impl.h b/eos/inline/types/nexthop_group_impl.h index ae87e63..cf306cb 100644 --- a/eos/inline/types/nexthop_group_impl.h +++ b/eos/inline/types/nexthop_group_impl.h @@ -46,12 +46,23 @@ nexthop_group_mpls_action_impl_t::label_stack_is( label_stack_ = label_stack; } +void +nexthop_group_mpls_action_impl_t::label_stack_is( + std::forward_list && label_stack) { + label_stack_ = std::move(label_stack); +} + void nexthop_group_mpls_action_impl_t::label_stack_set(mpls_label_t const & label_stack) { label_stack_.push_front(label_stack); } +void +nexthop_group_mpls_action_impl_t::label_stack_set(mpls_label_t && label_stack) { + label_stack_.push_front(std::move(label_stack)); +} + void nexthop_group_mpls_action_impl_t::label_stack_del(mpls_label_t const & label_stack) { @@ -245,6 +256,12 @@ nexthop_group_entry_impl_t::mpls_action_is( mpls_action_ = mpls_action; } +void +nexthop_group_entry_impl_t::mpls_action_is( + nexthop_group_mpls_action_t && mpls_action) { + mpls_action_ = std::move(mpls_action); +} + ip_addr_t nexthop_group_entry_impl_t::nexthop() const { return nexthop_; @@ -261,6 +278,17 @@ nexthop_group_entry_impl_t::nexthop_is(ip_addr_t const & nexthop) { nexthop_ = nexthop; } +void +nexthop_group_entry_impl_t::nexthop_is(ip_addr_t && nexthop) { + if (!!nexthop && !child_nexthop_group_.empty()) { + panic(invalid_argument_error( + "child_nexthop_group", + "Next level nexthop group name and nexthop ip " + "cannot be set together")); + } + nexthop_ = std::move(nexthop); +} + intf_id_t nexthop_group_entry_impl_t::intf() const { return intf_; @@ -277,6 +305,17 @@ nexthop_group_entry_impl_t::intf_is(intf_id_t const & intf) { intf_ = intf; } +void +nexthop_group_entry_impl_t::intf_is(intf_id_t && intf) { + if (!!intf && !child_nexthop_group_.empty()) { + panic(invalid_argument_error( + "child_nexthop_group", + "Next level nexthop group name and interface " + "cannot be set together")); + } + intf_ = std::move(intf); +} + sbfd_echo_session_key_t nexthop_group_entry_impl_t::sbfd_session_key() const { return sbfd_session_key_; @@ -288,6 +327,12 @@ nexthop_group_entry_impl_t::sbfd_session_key_is( sbfd_session_key_ = sbfd_session_key; } +void +nexthop_group_entry_impl_t::sbfd_session_key_is( + sbfd_echo_session_key_t && sbfd_session_key) { + sbfd_session_key_ = std::move(sbfd_session_key); +} + std::string nexthop_group_entry_impl_t::child_nexthop_group() const { return child_nexthop_group_; @@ -305,6 +350,18 @@ nexthop_group_entry_impl_t::child_nexthop_group_is( child_nexthop_group_ = child_nexthop_group; } +void +nexthop_group_entry_impl_t::child_nexthop_group_is( + std::string && child_nexthop_group) { + if ((!!nexthop_ || !!intf_) && !child_nexthop_group.empty()) { + panic(invalid_argument_error( + "child_nexthop_group", + "Next level nexthop group name and nexthop ip " + "(or interface) cannot be set together")); + } + child_nexthop_group_ = std::move(child_nexthop_group); +} + bool nexthop_group_entry_impl_t::operator==(nexthop_group_entry_impl_t const & other) const { @@ -460,6 +517,20 @@ nexthop_group_impl_t::source_ip_is(ip_addr_t const & source_ip) { source_ip_ = source_ip; } +void +nexthop_group_impl_t::source_ip_is(ip_addr_t && source_ip) { + if (type_ == NEXTHOP_GROUP_MPLS && !!source_ip) { + panic(invalid_argument_error( + "source_ip", + "MPLS nexthop group cannot specify a source IP")); + } else if (!!source_ip) { + // If we're setting a source ip, clear any + // source interface configuration + source_intf_is(intf_id_t()); + } + source_ip_ = std::move(source_ip); +} + intf_id_t nexthop_group_impl_t::source_intf() const { return source_intf_; @@ -514,12 +585,23 @@ nexthop_group_impl_t::nexthops_is( nexthops_ = nexthops; } +void +nexthop_group_impl_t::nexthops_is( + std::map && nexthops) { + nexthops_ = std::move(nexthops); +} + void nexthop_group_impl_t::nexthop_set(uint16_t key, nexthop_group_entry_t const & value) { nexthops_[key] = value; } +void +nexthop_group_impl_t::nexthop_set(uint16_t key, nexthop_group_entry_t && value) { + nexthops_[key] = std::move(value); +} + void nexthop_group_impl_t::nexthop_del(uint16_t key) { nexthops_.erase(key); @@ -536,12 +618,24 @@ nexthop_group_impl_t::backup_nexthops_is( backup_nexthops_ = backup_nexthops; } +void +nexthop_group_impl_t::backup_nexthops_is( + std::map && backup_nexthops) { + backup_nexthops_ = std::move(backup_nexthops); +} + void nexthop_group_impl_t::backup_nexthop_set(uint16_t key, nexthop_group_entry_t const & value) { backup_nexthops_[key] = value; } +void +nexthop_group_impl_t::backup_nexthop_set(uint16_t key, + nexthop_group_entry_t && value) { + backup_nexthops_[key] = std::move(value); +} + void nexthop_group_impl_t::backup_nexthop_del(uint16_t key) { backup_nexthops_.erase(key); @@ -558,11 +652,22 @@ nexthop_group_impl_t::destination_ips_is( destination_ips_ = destination_ips; } +void +nexthop_group_impl_t::destination_ips_is( + std::map && destination_ips) { + destination_ips_ = std::move(destination_ips); +} + void nexthop_group_impl_t::destination_ip_set(uint16_t key, ip_addr_t const & value) { destination_ips_[key] = value; } +void +nexthop_group_impl_t::destination_ip_set(uint16_t key, ip_addr_t && value) { + destination_ips_[key] = std::move(value); +} + void nexthop_group_impl_t::destination_ip_del(uint16_t key) { destination_ips_.erase(key); @@ -767,14 +872,18 @@ operator<<(std::ostream& os, const nexthop_group_impl_t& obj) { + + nexthop_group_programmed_status_impl_t::nexthop_group_programmed_status_impl_t() : - counter_state_(NEXTHOP_GROUP_COUNTER_INACTIVE) { + counter_state_(NEXTHOP_GROUP_COUNTER_INACTIVE), + hw_state_(NEXTHOP_GROUP_HW_DROP) { } nexthop_group_programmed_status_impl_t::nexthop_group_programmed_status_impl_t( - nexthop_group_counter_state_t counter_state) : - counter_state_(counter_state) { + nexthop_group_counter_state_t counter_state, + nexthop_group_programmed_hw_state_t hw_state) : + counter_state_(counter_state), hw_state_(hw_state) { } nexthop_group_counter_state_t @@ -782,10 +891,16 @@ nexthop_group_programmed_status_impl_t::counter_state() const { return counter_state_; } +nexthop_group_programmed_hw_state_t +nexthop_group_programmed_status_impl_t::hw_state() const { + return hw_state_; +} + bool nexthop_group_programmed_status_impl_t::operator==( nexthop_group_programmed_status_impl_t const & other) const { - return counter_state_ == other.counter_state_; + return counter_state_ == other.counter_state_ && + hw_state_ == other.hw_state_; } bool @@ -799,6 +914,8 @@ nexthop_group_programmed_status_impl_t::operator<( nexthop_group_programmed_status_impl_t const & other) const { if(counter_state_ != other.counter_state_) { return counter_state_ < other.counter_state_; + } else if(hw_state_ != other.hw_state_) { + return hw_state_ < other.hw_state_; } return false; } @@ -813,6 +930,7 @@ nexthop_group_programmed_status_impl_t::hash() const { void nexthop_group_programmed_status_impl_t::mix_me(hash_mix & h) const { h.mix(counter_state_); // nexthop_group_counter_state_t + h.mix(hw_state_); // nexthop_group_programmed_hw_state_t } std::string @@ -820,6 +938,7 @@ nexthop_group_programmed_status_impl_t::to_string() const { std::ostringstream ss; ss << "nexthop_group_programmed_status_t("; ss << "counter_state=" << counter_state_; + ss << ", hw_state=" << hw_state_; ss << ")"; return ss.str(); } diff --git a/eos/inline/types/nexthop_group_tunnel.h b/eos/inline/types/nexthop_group_tunnel.h index e83cfb4..8256f05 100644 --- a/eos/inline/types/nexthop_group_tunnel.h +++ b/eos/inline/types/nexthop_group_tunnel.h @@ -14,6 +14,10 @@ void nexthop_group_tunnel_t::tunnel_endpoint_is(ip_prefix_t const & tunnel_endpoint) { pimpl->tunnel_endpoint_is(tunnel_endpoint); } +void +nexthop_group_tunnel_t::tunnel_endpoint_is(ip_prefix_t && tunnel_endpoint) { + pimpl->tunnel_endpoint_is(std::move(tunnel_endpoint)); +} std::string nexthop_group_tunnel_t::nhg_name() const { return pimpl->nhg_name(); @@ -22,6 +26,10 @@ void nexthop_group_tunnel_t::nhg_name_is(std::string const & nhg_name) { pimpl->nhg_name_is(nhg_name); } +void +nexthop_group_tunnel_t::nhg_name_is(std::string && nhg_name) { + pimpl->nhg_name_is(std::move(nhg_name)); +} uint8_t nexthop_group_tunnel_t::igp_pref() const { return pimpl->igp_pref(); diff --git a/eos/inline/types/nexthop_group_tunnel_impl.h b/eos/inline/types/nexthop_group_tunnel_impl.h index 2f823c8..29cb319 100644 --- a/eos/inline/types/nexthop_group_tunnel_impl.h +++ b/eos/inline/types/nexthop_group_tunnel_impl.h @@ -27,6 +27,11 @@ nexthop_group_tunnel_impl_t::tunnel_endpoint_is( tunnel_endpoint_ = tunnel_endpoint; } +void +nexthop_group_tunnel_impl_t::tunnel_endpoint_is(ip_prefix_t && tunnel_endpoint) { + tunnel_endpoint_ = std::move(tunnel_endpoint); +} + std::string nexthop_group_tunnel_impl_t::nhg_name() const { return nhg_name_; @@ -37,6 +42,11 @@ nexthop_group_tunnel_impl_t::nhg_name_is(std::string const & nhg_name) { nhg_name_ = nhg_name; } +void +nexthop_group_tunnel_impl_t::nhg_name_is(std::string && nhg_name) { + nhg_name_ = std::move(nhg_name); +} + uint8_t nexthop_group_tunnel_impl_t::igp_pref() const { return igp_pref_; diff --git a/eos/inline/types/policy_map.h b/eos/inline/types/policy_map.h index e622bba..dde297d 100644 --- a/eos/inline/types/policy_map.h +++ b/eos/inline/types/policy_map.h @@ -134,6 +134,10 @@ void policy_map_key_t::name_is(std::string const & name) { pimpl->name_is(name); } +void +policy_map_key_t::name_is(std::string && name) { + pimpl->name_is(std::move(name)); +} policy_feature_t policy_map_key_t::feature() const { return pimpl->feature(); @@ -224,6 +228,10 @@ void policy_map_action_t::nexthop_group_name_is(std::string const & nexthop_group_name) { pimpl->nexthop_group_name_is(nexthop_group_name); } +void +policy_map_action_t::nexthop_group_name_is(std::string && nexthop_group_name) { + pimpl->nexthop_group_name_is(std::move(nexthop_group_name)); +} std::unordered_set const & policy_map_action_t::nexthops() const { return pimpl->nexthops(); @@ -233,10 +241,18 @@ policy_map_action_t::nexthops_is(std::unordered_set const & nexthops) pimpl->nexthops_is(nexthops); } void +policy_map_action_t::nexthops_is(std::unordered_set && nexthops) { + pimpl->nexthops_is(std::move(nexthops)); +} +void policy_map_action_t::nexthop_set(ip_addr_t const & value) { pimpl->nexthop_set(value); } void +policy_map_action_t::nexthop_set(ip_addr_t && value) { + pimpl->nexthop_set(std::move(value)); +} +void policy_map_action_t::nexthop_del(ip_addr_t const & value) { pimpl->nexthop_del(value); } @@ -248,6 +264,10 @@ void policy_map_action_t::vrf_is(std::string const & vrf) { pimpl->vrf_is(vrf); } +void +policy_map_action_t::vrf_is(std::string && vrf) { + pimpl->vrf_is(std::move(vrf)); +} uint8_t policy_map_action_t::dscp() const { return pimpl->dscp(); @@ -314,6 +334,10 @@ void traffic_policy_action_t::counter_name_is(std::string const & counter_name) { pimpl->counter_name_is(counter_name); } +void +traffic_policy_action_t::counter_name_is(std::string && counter_name) { + pimpl->counter_name_is(std::move(counter_name)); +} std::string traffic_policy_action_t::goto_class_name() const { return pimpl->goto_class_name(); @@ -322,6 +346,10 @@ void traffic_policy_action_t::goto_class_name_is(std::string const & goto_class_name) { pimpl->goto_class_name_is(goto_class_name); } +void +traffic_policy_action_t::goto_class_name_is(std::string && goto_class_name) { + pimpl->goto_class_name_is(std::move(goto_class_name)); +} bool traffic_policy_action_t::goto_next() const { return pimpl->goto_next(); @@ -330,6 +358,10 @@ void traffic_policy_action_t::goto_next_is(bool const & goto_next) { pimpl->goto_next_is(goto_next); } +void +traffic_policy_action_t::goto_next_is(bool && goto_next) { + pimpl->goto_next_is(std::move(goto_next)); +} uint8_t traffic_policy_action_t::dscp() const { return pimpl->dscp(); @@ -354,6 +386,10 @@ void traffic_policy_action_t::vrf_is(std::string const & vrf) { pimpl->vrf_is(vrf); } +void +traffic_policy_action_t::vrf_is(std::string && vrf) { + pimpl->vrf_is(std::move(vrf)); +} std::string traffic_policy_action_t::mirror_session() const { return pimpl->mirror_session(); @@ -362,6 +398,10 @@ void traffic_policy_action_t::mirror_session_is(std::string const & mirror_session) { pimpl->mirror_session_is(mirror_session); } +void +traffic_policy_action_t::mirror_session_is(std::string && mirror_session) { + pimpl->mirror_session_is(std::move(mirror_session)); +} uint64_t traffic_policy_action_t::police_rate() const { return pimpl->police_rate(); @@ -370,6 +410,10 @@ void traffic_policy_action_t::police_rate_is(uint64_t const & police_rate) { pimpl->police_rate_is(police_rate); } +void +traffic_policy_action_t::police_rate_is(uint64_t && police_rate) { + pimpl->police_rate_is(std::move(police_rate)); +} uint64_t traffic_policy_action_t::police_burst_size() const { return pimpl->police_burst_size(); @@ -378,6 +422,10 @@ void traffic_policy_action_t::police_burst_size_is(uint64_t const & police_burst_size) { pimpl->police_burst_size_is(police_burst_size); } +void +traffic_policy_action_t::police_burst_size_is(uint64_t && police_burst_size) { + pimpl->police_burst_size_is(std::move(police_burst_size)); +} police_rate_unit_t traffic_policy_action_t::police_rate_unit() const { return pimpl->police_rate_unit(); @@ -387,6 +435,11 @@ traffic_policy_action_t::police_rate_unit_is( police_rate_unit_t const & police_rate_unit) { pimpl->police_rate_unit_is(police_rate_unit); } +void +traffic_policy_action_t::police_rate_unit_is( + police_rate_unit_t && police_rate_unit) { + pimpl->police_rate_unit_is(std::move(police_rate_unit)); +} police_burst_unit_t traffic_policy_action_t::police_burst_unit() const { return pimpl->police_burst_unit(); @@ -396,6 +449,11 @@ traffic_policy_action_t::police_burst_unit_is( police_burst_unit_t const & police_burst_unit) { pimpl->police_burst_unit_is(police_burst_unit); } +void +traffic_policy_action_t::police_burst_unit_is( + police_burst_unit_t && police_burst_unit) { + pimpl->police_burst_unit_is(std::move(police_burst_unit)); +} std::unordered_set const & traffic_policy_action_t::nexthop_groups() const { return pimpl->nexthop_groups(); @@ -406,10 +464,19 @@ traffic_policy_action_t::nexthop_groups_is( pimpl->nexthop_groups_is(nexthop_groups); } void +traffic_policy_action_t::nexthop_groups_is( + std::unordered_set && nexthop_groups) { + pimpl->nexthop_groups_is(std::move(nexthop_groups)); +} +void traffic_policy_action_t::nexthop_group_set(std::string const & value) { pimpl->nexthop_group_set(value); } void +traffic_policy_action_t::nexthop_group_set(std::string && value) { + pimpl->nexthop_group_set(std::move(value)); +} +void traffic_policy_action_t::nexthop_group_del(std::string const & value) { pimpl->nexthop_group_del(value); } @@ -423,10 +490,18 @@ traffic_policy_action_t::nexthops_is( pimpl->nexthops_is(nexthops); } void +traffic_policy_action_t::nexthops_is(std::unordered_set && nexthops) { + pimpl->nexthops_is(std::move(nexthops)); +} +void traffic_policy_action_t::nexthop_set(ip_addr_t const & value) { pimpl->nexthop_set(value); } void +traffic_policy_action_t::nexthop_set(ip_addr_t && value) { + pimpl->nexthop_set(std::move(value)); +} +void traffic_policy_action_t::nexthop_del(ip_addr_t const & value) { pimpl->nexthop_del(value); } @@ -468,6 +543,10 @@ void policy_map_rule_t::class_map_key_is(class_map_key_t const & class_map_key) { pimpl->class_map_key_is(class_map_key); } +void +policy_map_rule_t::class_map_key_is(class_map_key_t && class_map_key) { + pimpl->class_map_key_is(std::move(class_map_key)); +} policy_map_rule_type_t policy_map_rule_t::policy_map_rule_type() const { return pimpl->policy_map_rule_type(); @@ -494,10 +573,18 @@ policy_map_rule_t::actions_is(std::set const & actions) { pimpl->actions_is(actions); } void +policy_map_rule_t::actions_is(std::set && actions) { + pimpl->actions_is(std::move(actions)); +} +void policy_map_rule_t::action_set(policy_map_action_t const & value) { pimpl->action_set(value); } void +policy_map_rule_t::action_set(policy_map_action_t && value) { + pimpl->action_set(std::move(value)); +} +void policy_map_rule_t::action_del(policy_map_action_t const & value) { pimpl->action_del(value); } @@ -548,6 +635,10 @@ void policy_map_t::key_is(policy_map_key_t const & key) { pimpl->key_is(key); } +void +policy_map_t::key_is(policy_map_key_t && key) { + pimpl->key_is(std::move(key)); +} std::map const & policy_map_t::rules() const { return pimpl->rules(); @@ -557,10 +648,18 @@ policy_map_t::rules_is(std::map const & rules) { pimpl->rules_is(rules); } void +policy_map_t::rules_is(std::map && rules) { + pimpl->rules_is(std::move(rules)); +} +void policy_map_t::rule_set(uint32_t key, policy_map_rule_t const & value) { pimpl->rule_set(key, value); } void +policy_map_t::rule_set(uint32_t key, policy_map_rule_t && value) { + pimpl->rule_set(key, std::move(value)); +} +void policy_map_t::rule_del(uint32_t key) { pimpl->rule_del(key); } @@ -616,10 +715,18 @@ traffic_policy_rule_t::actions_is( pimpl->actions_is(actions); } void +traffic_policy_rule_t::actions_is(std::set && actions) { + pimpl->actions_is(std::move(actions)); +} +void traffic_policy_rule_t::action_set(traffic_policy_action_t const & value) { pimpl->action_set(value); } void +traffic_policy_rule_t::action_set(traffic_policy_action_t && value) { + pimpl->action_set(std::move(value)); +} +void traffic_policy_rule_t::action_del(traffic_policy_action_t const & value) { pimpl->action_del(value); } @@ -675,10 +782,19 @@ traffic_policy_t::named_counters_is( pimpl->named_counters_is(named_counters); } void +traffic_policy_t::named_counters_is( + std::unordered_set && named_counters) { + pimpl->named_counters_is(std::move(named_counters)); +} +void traffic_policy_t::named_counter_set(std::string const & value) { pimpl->named_counter_set(value); } void +traffic_policy_t::named_counter_set(std::string && value) { + pimpl->named_counter_set(std::move(value)); +} +void traffic_policy_t::named_counter_del(std::string const & value) { pimpl->named_counter_del(value); } @@ -794,14 +910,36 @@ traffic_policy_counter_t::named_counter_data_is( pimpl->named_counter_data_is(named_counter_data); } void +traffic_policy_counter_t::named_counter_data_is( + + std::map && + named_counter_data) { + pimpl->named_counter_data_is(std::move(named_counter_data)); +} +void traffic_policy_counter_t::named_counter_data_set( std::string const & key, traffic_policy_counter_data_t const & value) { pimpl->named_counter_data_set(key, value); } void +traffic_policy_counter_t::named_counter_data_set( + std::string const & key, traffic_policy_counter_data_t && value) { + pimpl->named_counter_data_set(key, std::move(value)); +} +void traffic_policy_counter_t::named_counter_data_del(std::string const & key) { pimpl->named_counter_data_del(key); } +void +traffic_policy_counter_t::named_counter_data_set( + std::string && key, traffic_policy_counter_data_t const & value) { + pimpl->named_counter_data_set(std::move(key), value); +} +void +traffic_policy_counter_t::named_counter_data_set( + std::string && key, traffic_policy_counter_data_t && value) { + pimpl->named_counter_data_set(std::move(key), std::move(value)); +} std::map const & traffic_policy_counter_t::class_counter_data() const { return pimpl->class_counter_data(); @@ -814,14 +952,36 @@ traffic_policy_counter_t::class_counter_data_is( pimpl->class_counter_data_is(class_counter_data); } void +traffic_policy_counter_t::class_counter_data_is( + + std::map && + class_counter_data) { + pimpl->class_counter_data_is(std::move(class_counter_data)); +} +void traffic_policy_counter_t::class_counter_data_set( std::string const & key, traffic_policy_counter_data_t const & value) { pimpl->class_counter_data_set(key, value); } void +traffic_policy_counter_t::class_counter_data_set( + std::string const & key, traffic_policy_counter_data_t && value) { + pimpl->class_counter_data_set(key, std::move(value)); +} +void traffic_policy_counter_t::class_counter_data_del(std::string const & key) { pimpl->class_counter_data_del(key); } +void +traffic_policy_counter_t::class_counter_data_set( + std::string && key, traffic_policy_counter_data_t const & value) { + pimpl->class_counter_data_set(std::move(key), value); +} +void +traffic_policy_counter_t::class_counter_data_set( + std::string && key, traffic_policy_counter_data_t && value) { + pimpl->class_counter_data_set(std::move(key), std::move(value)); +} bool traffic_policy_counter_t::operator==(traffic_policy_counter_t const & other) const { return pimpl->operator==(*other.pimpl); @@ -981,14 +1141,36 @@ policy_map_hw_statuses_t::intf_statuses_is( pimpl->intf_statuses_is(intf_statuses); } void +policy_map_hw_statuses_t::intf_statuses_is( + + std::map && + intf_statuses) { + pimpl->intf_statuses_is(std::move(intf_statuses)); +} +void policy_map_hw_statuses_t::intf_statuse_set(policy_map_hw_status_key_t const & key, policy_map_status_t const & value) { pimpl->intf_statuse_set(key, value); } void +policy_map_hw_statuses_t::intf_statuse_set(policy_map_hw_status_key_t const & key, + policy_map_status_t && value) { + pimpl->intf_statuse_set(key, std::move(value)); +} +void policy_map_hw_statuses_t::intf_statuse_del(policy_map_hw_status_key_t const & key) { pimpl->intf_statuse_del(key); } +void +policy_map_hw_statuses_t::intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t const & value) { + pimpl->intf_statuse_set(std::move(key), value); +} +void +policy_map_hw_statuses_t::intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t && value) { + pimpl->intf_statuse_set(std::move(key), std::move(value)); +} bool policy_map_hw_statuses_t::operator==(policy_map_hw_statuses_t const & other) const { return pimpl->operator==(*other.pimpl); diff --git a/eos/inline/types/policy_map_impl.h b/eos/inline/types/policy_map_impl.h index 590788f..3175ff9 100644 --- a/eos/inline/types/policy_map_impl.h +++ b/eos/inline/types/policy_map_impl.h @@ -37,6 +37,11 @@ policy_map_key_impl_t::name_is(std::string const & name) { name_ = name; } +void +policy_map_key_impl_t::name_is(std::string && name) { + name_ = std::move(name); +} + policy_feature_t policy_map_key_impl_t::feature() const { return feature_; @@ -141,6 +146,11 @@ policy_map_action_impl_t::nexthop_group_name_is( nexthop_group_name_ = nexthop_group_name; } +void +policy_map_action_impl_t::nexthop_group_name_is(std::string && nexthop_group_name) { + nexthop_group_name_ = std::move(nexthop_group_name); +} + std::unordered_set const & policy_map_action_impl_t::nexthops() const { return nexthops_; @@ -152,11 +162,21 @@ policy_map_action_impl_t::nexthops_is( nexthops_ = nexthops; } +void +policy_map_action_impl_t::nexthops_is(std::unordered_set && nexthops) { + nexthops_ = std::move(nexthops); +} + void policy_map_action_impl_t::nexthop_set(ip_addr_t const & value) { nexthops_.insert(value); } +void +policy_map_action_impl_t::nexthop_set(ip_addr_t && value) { + nexthops_.emplace(std::move(value)); +} + void policy_map_action_impl_t::nexthop_del(ip_addr_t const & value) { nexthops_.erase(value); @@ -172,6 +192,11 @@ policy_map_action_impl_t::vrf_is(std::string const & vrf) { vrf_ = vrf; } +void +policy_map_action_impl_t::vrf_is(std::string && vrf) { + vrf_ = std::move(vrf); +} + uint8_t policy_map_action_impl_t::dscp() const { return dscp_; @@ -318,6 +343,11 @@ traffic_policy_action_impl_t::counter_name_is(std::string const & counter_name) counter_name_ = counter_name; } +void +traffic_policy_action_impl_t::counter_name_is(std::string && counter_name) { + counter_name_ = std::move(counter_name); +} + std::string traffic_policy_action_impl_t::goto_class_name() const { return goto_class_name_; @@ -329,6 +359,11 @@ traffic_policy_action_impl_t::goto_class_name_is( goto_class_name_ = goto_class_name; } +void +traffic_policy_action_impl_t::goto_class_name_is(std::string && goto_class_name) { + goto_class_name_ = std::move(goto_class_name); +} + bool traffic_policy_action_impl_t::goto_next() const { return goto_next_; @@ -339,6 +374,11 @@ traffic_policy_action_impl_t::goto_next_is(bool const & goto_next) { goto_next_ = goto_next; } +void +traffic_policy_action_impl_t::goto_next_is(bool && goto_next) { + goto_next_ = std::move(goto_next); +} + uint8_t traffic_policy_action_impl_t::dscp() const { return dscp_; @@ -369,6 +409,11 @@ traffic_policy_action_impl_t::vrf_is(std::string const & vrf) { vrf_ = vrf; } +void +traffic_policy_action_impl_t::vrf_is(std::string && vrf) { + vrf_ = std::move(vrf); +} + std::string traffic_policy_action_impl_t::mirror_session() const { return mirror_session_; @@ -380,6 +425,11 @@ traffic_policy_action_impl_t::mirror_session_is(std::string const & mirror_sessi mirror_session_ = mirror_session; } +void +traffic_policy_action_impl_t::mirror_session_is(std::string && mirror_session) { + mirror_session_ = std::move(mirror_session); +} + uint64_t traffic_policy_action_impl_t::police_rate() const { return police_rate_; @@ -390,6 +440,11 @@ traffic_policy_action_impl_t::police_rate_is(uint64_t const & police_rate) { police_rate_ = police_rate; } +void +traffic_policy_action_impl_t::police_rate_is(uint64_t && police_rate) { + police_rate_ = std::move(police_rate); +} + uint64_t traffic_policy_action_impl_t::police_burst_size() const { return police_burst_size_; @@ -401,6 +456,11 @@ traffic_policy_action_impl_t::police_burst_size_is( police_burst_size_ = police_burst_size; } +void +traffic_policy_action_impl_t::police_burst_size_is(uint64_t && police_burst_size) { + police_burst_size_ = std::move(police_burst_size); +} + police_rate_unit_t traffic_policy_action_impl_t::police_rate_unit() const { return police_rate_unit_; @@ -412,6 +472,12 @@ traffic_policy_action_impl_t::police_rate_unit_is( police_rate_unit_ = police_rate_unit; } +void +traffic_policy_action_impl_t::police_rate_unit_is( + police_rate_unit_t && police_rate_unit) { + police_rate_unit_ = std::move(police_rate_unit); +} + police_burst_unit_t traffic_policy_action_impl_t::police_burst_unit() const { return police_burst_unit_; @@ -423,6 +489,12 @@ traffic_policy_action_impl_t::police_burst_unit_is( police_burst_unit_ = police_burst_unit; } +void +traffic_policy_action_impl_t::police_burst_unit_is( + police_burst_unit_t && police_burst_unit) { + police_burst_unit_ = std::move(police_burst_unit); +} + std::unordered_set const & traffic_policy_action_impl_t::nexthop_groups() const { return nexthop_groups_; @@ -434,11 +506,22 @@ traffic_policy_action_impl_t::nexthop_groups_is( nexthop_groups_ = nexthop_groups; } +void +traffic_policy_action_impl_t::nexthop_groups_is( + std::unordered_set && nexthop_groups) { + nexthop_groups_ = std::move(nexthop_groups); +} + void traffic_policy_action_impl_t::nexthop_group_set(std::string const & value) { nexthop_groups_.insert(value); } +void +traffic_policy_action_impl_t::nexthop_group_set(std::string && value) { + nexthop_groups_.emplace(std::move(value)); +} + void traffic_policy_action_impl_t::nexthop_group_del(std::string const & value) { nexthop_groups_.erase(value); @@ -455,11 +538,22 @@ traffic_policy_action_impl_t::nexthops_is( nexthops_ = nexthops; } +void +traffic_policy_action_impl_t::nexthops_is( + std::unordered_set && nexthops) { + nexthops_ = std::move(nexthops); +} + void traffic_policy_action_impl_t::nexthop_set(ip_addr_t const & value) { nexthops_.insert(value); } +void +traffic_policy_action_impl_t::nexthop_set(ip_addr_t && value) { + nexthops_.emplace(std::move(value)); +} + void traffic_policy_action_impl_t::nexthop_del(ip_addr_t const & value) { nexthops_.erase(value); @@ -625,6 +719,11 @@ policy_map_rule_impl_t::class_map_key_is(class_map_key_t const & class_map_key) class_map_key_ = class_map_key; } +void +policy_map_rule_impl_t::class_map_key_is(class_map_key_t && class_map_key) { + class_map_key_ = std::move(class_map_key); +} + policy_map_rule_type_t policy_map_rule_impl_t::policy_map_rule_type() const { return policy_map_rule_type_; @@ -656,11 +755,21 @@ policy_map_rule_impl_t::actions_is(std::set const & actions actions_ = actions; } +void +policy_map_rule_impl_t::actions_is(std::set && actions) { + actions_ = std::move(actions); +} + void policy_map_rule_impl_t::action_set(policy_map_action_t const & value) { actions_.insert(value); } +void +policy_map_rule_impl_t::action_set(policy_map_action_t && value) { + actions_.emplace(std::move(value)); +} + void policy_map_rule_impl_t::action_del(policy_map_action_t const & value) { actions_.erase(value); @@ -779,6 +888,11 @@ policy_map_impl_t::key_is(policy_map_key_t const & key) { key_ = key; } +void +policy_map_impl_t::key_is(policy_map_key_t && key) { + key_ = std::move(key); +} + std::map const & policy_map_impl_t::rules() const { return rules_; @@ -786,74 +900,134 @@ policy_map_impl_t::rules() const { void policy_map_impl_t::rules_is(std::map const & rules) { - - uint32_t mpls_ = 0; - uint32_t non_mpls_ = 0; - std::string const QOS_RULE_CONFIG_ERROR_ = \ - "QoS policy maps do not support MPLS match rules"; - std::string const QOS_RAW_RULE_CONFIG_ERROR_ = \ - "QoS policy maps do not support raw match statements"; - std::string const CLASS_MAP_MPLS_ANY_ = "__mpls_permit_any__"; - std::string const RULE_CONFIG_ERROR_ = \ - "Policy maps have either one MPLS match rule or " - "a collection of other rules"; - - for(auto it = rules.cbegin(); it != rules.cend(); ++it) { - if (it->second.class_map_key().name() == CLASS_MAP_MPLS_ANY_) { - mpls_++; - } else { - non_mpls_++; - } - if((key_.feature() == POLICY_FEATURE_QOS) && - (it->second.policy_map_rule_type() != POLICY_RULE_TYPE_CLASSMAP)) { - panic(configuration_error(QOS_RAW_RULE_CONFIG_ERROR_)); - } - } - // Check if the collection's invariant has been invalidated - if((non_mpls_ > 0 && mpls_ > 0) || mpls_ > 1) { - panic(configuration_error(RULE_CONFIG_ERROR_)); + uint32_t mpls_ = 0; + uint32_t non_mpls_ = 0; + std::string const QOS_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support MPLS match rules"; + std::string const QOS_RAW_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support raw match statements"; + std::string const CLASS_MAP_MPLS_ANY_ = "__mpls_permit_any__"; + std::string const RULE_CONFIG_ERROR_ = \ + "Policy maps have either one MPLS match rule or " + "a collection of other rules"; + for(auto it = rules.cbegin(); it != rules.cend(); ++it) { + if (it->second.class_map_key().name() == CLASS_MAP_MPLS_ANY_) { + mpls_++; + } else { + non_mpls_++; } - if(mpls_ != 0 && key_.feature() == POLICY_FEATURE_QOS) { - panic(configuration_error(QOS_RULE_CONFIG_ERROR_)); + if((key_.feature() == POLICY_FEATURE_QOS) && + (it->second.policy_map_rule_type() != POLICY_RULE_TYPE_CLASSMAP)) { + panic(configuration_error(QOS_RAW_RULE_CONFIG_ERROR_)); } - rules_ = rules; - + } + // Check if the collection's invariant has been invalidated + if((non_mpls_ > 0 && mpls_ > 0) || mpls_ > 1) { + panic(configuration_error(RULE_CONFIG_ERROR_)); + } + if(mpls_ != 0 && key_.feature() == POLICY_FEATURE_QOS) { + panic(configuration_error(QOS_RULE_CONFIG_ERROR_)); + } + rules_ = rules; } void -policy_map_impl_t::rule_set(uint32_t key, policy_map_rule_t const & value) { - - std::string const QOS_RULE_CONFIG_ERROR_ = \ - "QoS policy maps do not support MPLS match rules"; - std::string const QOS_RAW_RULE_CONFIG_ERROR_ = \ - "QoS policy maps do not support raw match statements"; - std::string const CLASS_MAP_MPLS_ANY_ = "__mpls_permit_any__"; - std::string const RULE_CONFIG_ERROR_ = \ - "Policy maps have either one MPLS match rule or " - "a collection of other rules"; - - if(value.class_map_key().name() == CLASS_MAP_MPLS_ANY_ && - key_.feature() == POLICY_FEATURE_QOS) { - panic(configuration_error(QOS_RULE_CONFIG_ERROR_)); +policy_map_impl_t::rules_is(std::map && rules) { + uint32_t mpls_ = 0; + uint32_t non_mpls_ = 0; + std::string const QOS_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support MPLS match rules"; + std::string const QOS_RAW_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support raw match statements"; + std::string const CLASS_MAP_MPLS_ANY_ = "__mpls_permit_any__"; + std::string const RULE_CONFIG_ERROR_ = \ + "Policy maps have either one MPLS match rule or " + "a collection of other rules"; + for(auto it = rules.cbegin(); it != rules.cend(); ++it) { + if (it->second.class_map_key().name() == CLASS_MAP_MPLS_ANY_) { + mpls_++; + } else { + non_mpls_++; } if((key_.feature() == POLICY_FEATURE_QOS) && - (value.policy_map_rule_type() != POLICY_RULE_TYPE_CLASSMAP)) { + (it->second.policy_map_rule_type() != POLICY_RULE_TYPE_CLASSMAP)) { panic(configuration_error(QOS_RAW_RULE_CONFIG_ERROR_)); } - // We can set only one MPLS rule and no others in a map. - if(rules_.size() > 1 || - (rules_.size() && rules_.cbegin()->first != key)) { - if(value.class_map_key().name() == CLASS_MAP_MPLS_ANY_){ + } + // Check if the collection's invariant has been invalidated + if((non_mpls_ > 0 && mpls_ > 0) || mpls_ > 1) { + panic(configuration_error(RULE_CONFIG_ERROR_)); + } + if(mpls_ != 0 && key_.feature() == POLICY_FEATURE_QOS) { + panic(configuration_error(QOS_RULE_CONFIG_ERROR_)); + } + rules_ = std::move(rules); +} + +void +policy_map_impl_t::rule_set(uint32_t key, policy_map_rule_t const & value) { + std::string const QOS_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support MPLS match rules"; + std::string const QOS_RAW_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support raw match statements"; + std::string const CLASS_MAP_MPLS_ANY_ = "__mpls_permit_any__"; + std::string const RULE_CONFIG_ERROR_ = \ + "Policy maps have either one MPLS match rule or " + "a collection of other rules"; + if(value.class_map_key().name() == CLASS_MAP_MPLS_ANY_ && + key_.feature() == POLICY_FEATURE_QOS) { + panic(configuration_error(QOS_RULE_CONFIG_ERROR_)); + } + if((key_.feature() == POLICY_FEATURE_QOS) && + (value.policy_map_rule_type() != POLICY_RULE_TYPE_CLASSMAP)) { + panic(configuration_error(QOS_RAW_RULE_CONFIG_ERROR_)); + } + // We can set only one MPLS rule and no others in a map. + if(rules_.size() > 1 || + (rules_.size() && rules_.cbegin()->first != key)) { + if(value.class_map_key().name() == CLASS_MAP_MPLS_ANY_){ + panic(configuration_error(RULE_CONFIG_ERROR_)); + } else { + if(rules_.cbegin()->second.class_map_key().name() == + CLASS_MAP_MPLS_ANY_) { panic(configuration_error(RULE_CONFIG_ERROR_)); - } else { - if(rules_.cbegin()->second.class_map_key().name() == - CLASS_MAP_MPLS_ANY_) { - panic(configuration_error(RULE_CONFIG_ERROR_)); - } } } - rules_[key] = value; + } + rules_[key] = value; +} +void +policy_map_impl_t::rule_set(uint32_t key, policy_map_rule_t && value) { + std::string const QOS_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support MPLS match rules"; + std::string const QOS_RAW_RULE_CONFIG_ERROR_ = \ + "QoS policy maps do not support raw match statements"; + std::string const CLASS_MAP_MPLS_ANY_ = "__mpls_permit_any__"; + std::string const RULE_CONFIG_ERROR_ = \ + "Policy maps have either one MPLS match rule or " + "a collection of other rules"; + if(value.class_map_key().name() == CLASS_MAP_MPLS_ANY_ && + key_.feature() == POLICY_FEATURE_QOS) { + panic(configuration_error(QOS_RULE_CONFIG_ERROR_)); + } + if((key_.feature() == POLICY_FEATURE_QOS) && + (value.policy_map_rule_type() != POLICY_RULE_TYPE_CLASSMAP)) { + panic(configuration_error(QOS_RAW_RULE_CONFIG_ERROR_)); + } + // We can set only one MPLS rule and no others in a map. + if(rules_.size() > 1 || + (rules_.size() && rules_.cbegin()->first != key)) { + if(value.class_map_key().name() == CLASS_MAP_MPLS_ANY_){ + panic(configuration_error(RULE_CONFIG_ERROR_)); + } else { + if(rules_.cbegin()->second.class_map_key().name() == + CLASS_MAP_MPLS_ANY_) { + panic(configuration_error(RULE_CONFIG_ERROR_)); + } + } + } + rules_[key] = std::move(value); } void @@ -965,11 +1139,22 @@ traffic_policy_rule_impl_t::actions_is( actions_ = actions; } +void +traffic_policy_rule_impl_t::actions_is( + std::set && actions) { + actions_ = std::move(actions); +} + void traffic_policy_rule_impl_t::action_set(traffic_policy_action_t const & value) { actions_.insert(value); } +void +traffic_policy_rule_impl_t::action_set(traffic_policy_action_t && value) { + actions_.emplace(std::move(value)); +} + void traffic_policy_rule_impl_t::action_del(traffic_policy_action_t const & value) { actions_.erase(value); @@ -1098,11 +1283,22 @@ traffic_policy_impl_t::named_counters_is( named_counters_ = named_counters; } +void +traffic_policy_impl_t::named_counters_is( + std::unordered_set && named_counters) { + named_counters_ = std::move(named_counters); +} + void traffic_policy_impl_t::named_counter_set(std::string const & value) { named_counters_.insert(value); } +void +traffic_policy_impl_t::named_counter_set(std::string && value) { + named_counters_.emplace(std::move(value)); +} + void traffic_policy_impl_t::named_counter_del(std::string const & value) { named_counters_.erase(value); @@ -1332,17 +1528,43 @@ traffic_policy_counter_impl_t::named_counter_data_is( named_counter_data_ = named_counter_data; } +void +traffic_policy_counter_impl_t::named_counter_data_is( + + std::map && + named_counter_data) { + named_counter_data_ = std::move(named_counter_data); +} + void traffic_policy_counter_impl_t::named_counter_data_set( std::string const & key, traffic_policy_counter_data_t const & value) { named_counter_data_[key] = value; } +void +traffic_policy_counter_impl_t::named_counter_data_set( + std::string const & key, traffic_policy_counter_data_t && value) { + named_counter_data_[key] = std::move(value); +} + void traffic_policy_counter_impl_t::named_counter_data_del(std::string const & key) { named_counter_data_.erase(key); } +void +traffic_policy_counter_impl_t::named_counter_data_set( + std::string && key, traffic_policy_counter_data_t const & value) { + named_counter_data_[std::move(key)] = value; +} + +void +traffic_policy_counter_impl_t::named_counter_data_set( + std::string && key, traffic_policy_counter_data_t && value) { + named_counter_data_[std::move(key)] = std::move(value); +} + std::map const & traffic_policy_counter_impl_t::class_counter_data() const { return class_counter_data_; @@ -1356,17 +1578,43 @@ traffic_policy_counter_impl_t::class_counter_data_is( class_counter_data_ = class_counter_data; } +void +traffic_policy_counter_impl_t::class_counter_data_is( + + std::map && + class_counter_data) { + class_counter_data_ = std::move(class_counter_data); +} + void traffic_policy_counter_impl_t::class_counter_data_set( std::string const & key, traffic_policy_counter_data_t const & value) { class_counter_data_[key] = value; } +void +traffic_policy_counter_impl_t::class_counter_data_set( + std::string const & key, traffic_policy_counter_data_t && value) { + class_counter_data_[key] = std::move(value); +} + void traffic_policy_counter_impl_t::class_counter_data_del(std::string const & key) { class_counter_data_.erase(key); } +void +traffic_policy_counter_impl_t::class_counter_data_set( + std::string && key, traffic_policy_counter_data_t const & value) { + class_counter_data_[std::move(key)] = value; +} + +void +traffic_policy_counter_impl_t::class_counter_data_set( + std::string && key, traffic_policy_counter_data_t && value) { + class_counter_data_[std::move(key)] = std::move(value); +} + bool traffic_policy_counter_impl_t::operator==( traffic_policy_counter_impl_t const & other) const { @@ -1569,6 +1817,14 @@ policy_map_hw_statuses_impl_t::intf_statuses_is( intf_statuses_ = intf_statuses; } +void +policy_map_hw_statuses_impl_t::intf_statuses_is( + + std::map && + intf_statuses) { + intf_statuses_ = std::move(intf_statuses); +} + void policy_map_hw_statuses_impl_t::intf_statuse_set( policy_map_hw_status_key_t const & key, policy_map_status_t const & value) @@ -1576,12 +1832,30 @@ policy_map_hw_statuses_impl_t::intf_statuse_set( intf_statuses_[key] = value; } +void +policy_map_hw_statuses_impl_t::intf_statuse_set( + policy_map_hw_status_key_t const & key, policy_map_status_t && value) { + intf_statuses_[key] = std::move(value); +} + void policy_map_hw_statuses_impl_t::intf_statuse_del( policy_map_hw_status_key_t const & key) { intf_statuses_.erase(key); } +void +policy_map_hw_statuses_impl_t::intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t const & value) { + intf_statuses_[std::move(key)] = value; +} + +void +policy_map_hw_statuses_impl_t::intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t && value) { + intf_statuses_[std::move(key)] = std::move(value); +} + bool policy_map_hw_statuses_impl_t::operator==( policy_map_hw_statuses_impl_t const & other) const { diff --git a/eos/inline/types/route_map.h b/eos/inline/types/route_map.h index 7638299..57ef9c0 100644 --- a/eos/inline/types/route_map.h +++ b/eos/inline/types/route_map.h @@ -166,6 +166,10 @@ route_map_entry_t::link_bandwidth_is( pimpl->link_bandwidth_is(link_bandwidth); } void +route_map_entry_t::link_bandwidth_is(route_map_link_bandwidth_t && link_bandwidth) { + pimpl->link_bandwidth_is(std::move(link_bandwidth)); +} +void route_map_entry_t::link_bandwidth_del() { pimpl->link_bandwidth_del(); } @@ -207,14 +211,34 @@ route_map_t::map_entry_is( pimpl->map_entry_is(map_entry); } void +route_map_t::map_entry_is( + std::map && map_entry) { + pimpl->map_entry_is(std::move(map_entry)); +} +void route_map_t::map_entry_set(route_map_sequence_number_t const & key, route_map_entry_t const & value) { pimpl->map_entry_set(key, value); } void +route_map_t::map_entry_set(route_map_sequence_number_t const & key, + route_map_entry_t && value) { + pimpl->map_entry_set(key, std::move(value)); +} +void route_map_t::map_entry_del(route_map_sequence_number_t const & key) { pimpl->map_entry_del(key); } +void +route_map_t::map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t const & value) { + pimpl->map_entry_set(std::move(key), value); +} +void +route_map_t::map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t && value) { + pimpl->map_entry_set(std::move(key), std::move(value)); +} bool route_map_t::operator==(route_map_t const & other) const { return pimpl->operator==(*other.pimpl); diff --git a/eos/inline/types/route_map_impl.h b/eos/inline/types/route_map_impl.h index 0637cb0..a3fdf4f 100644 --- a/eos/inline/types/route_map_impl.h +++ b/eos/inline/types/route_map_impl.h @@ -230,6 +230,12 @@ route_map_entry_impl_t::link_bandwidth_is( link_bandwidth_ = link_bandwidth; } +void +route_map_entry_impl_t::link_bandwidth_is( + route_map_link_bandwidth_t && link_bandwidth) { + link_bandwidth_ = std::move(link_bandwidth); +} + void route_map_entry_impl_t::link_bandwidth_del() { link_bandwidth_ = route_map_link_bandwidth_t(); @@ -297,17 +303,41 @@ route_map_impl_t::map_entry_is( map_entry_ = map_entry; } +void +route_map_impl_t::map_entry_is( + std::map && map_entry) { + map_entry_ = std::move(map_entry); +} + void route_map_impl_t::map_entry_set(route_map_sequence_number_t const & key, route_map_entry_t const & value) { map_entry_[key] = value; } +void +route_map_impl_t::map_entry_set(route_map_sequence_number_t const & key, + route_map_entry_t && value) { + map_entry_[key] = std::move(value); +} + void route_map_impl_t::map_entry_del(route_map_sequence_number_t const & key) { map_entry_.erase(key); } +void +route_map_impl_t::map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t const & value) { + map_entry_[std::move(key)] = value; +} + +void +route_map_impl_t::map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t && value) { + map_entry_[std::move(key)] = std::move(value); +} + bool route_map_impl_t::operator==(route_map_impl_t const & other) const { return map_entry_ == other.map_entry_; diff --git a/eos/inline/types/structured_filter.h b/eos/inline/types/structured_filter.h index 5634f3e..3ba0a1f 100644 --- a/eos/inline/types/structured_filter.h +++ b/eos/inline/types/structured_filter.h @@ -120,10 +120,18 @@ port_field_t::src_ports_is(std::set const & src_ports) { pimpl->src_ports_is(src_ports); } void +port_field_t::src_ports_is(std::set && src_ports) { + pimpl->src_ports_is(std::move(src_ports)); +} +void port_field_t::src_port_set(port_range_t const & value) { pimpl->src_port_set(value); } void +port_field_t::src_port_set(port_range_t && value) { + pimpl->src_port_set(std::move(value)); +} +void port_field_t::src_port_del(port_range_t const & value) { pimpl->src_port_del(value); } @@ -136,10 +144,18 @@ port_field_t::dst_ports_is(std::set const & dst_ports) { pimpl->dst_ports_is(dst_ports); } void +port_field_t::dst_ports_is(std::set && dst_ports) { + pimpl->dst_ports_is(std::move(dst_ports)); +} +void port_field_t::dst_port_set(port_range_t const & value) { pimpl->dst_port_set(value); } void +port_field_t::dst_port_set(port_range_t && value) { + pimpl->dst_port_set(std::move(value)); +} +void port_field_t::dst_port_del(port_range_t const & value) { pimpl->dst_port_del(value); } @@ -153,10 +169,19 @@ port_field_t::src_port_field_sets_is( pimpl->src_port_field_sets_is(src_port_field_sets); } void +port_field_t::src_port_field_sets_is( + std::unordered_set && src_port_field_sets) { + pimpl->src_port_field_sets_is(std::move(src_port_field_sets)); +} +void port_field_t::src_port_field_set_set(std::string const & value) { pimpl->src_port_field_set_set(value); } void +port_field_t::src_port_field_set_set(std::string && value) { + pimpl->src_port_field_set_set(std::move(value)); +} +void port_field_t::src_port_field_set_del(std::string const & value) { pimpl->src_port_field_set_del(value); } @@ -170,10 +195,19 @@ port_field_t::dst_port_field_sets_is( pimpl->dst_port_field_sets_is(dst_port_field_sets); } void +port_field_t::dst_port_field_sets_is( + std::unordered_set && dst_port_field_sets) { + pimpl->dst_port_field_sets_is(std::move(dst_port_field_sets)); +} +void port_field_t::dst_port_field_set_set(std::string const & value) { pimpl->dst_port_field_set_set(value); } void +port_field_t::dst_port_field_set_set(std::string && value) { + pimpl->dst_port_field_set_set(std::move(value)); +} +void port_field_t::dst_port_field_set_del(std::string const & value) { pimpl->dst_port_field_set_del(value); } @@ -216,10 +250,18 @@ protocol_field_t::ports_is(std::map const & ports) { pimpl->ports_is(ports); } void +protocol_field_t::ports_is(std::map && ports) { + pimpl->ports_is(std::move(ports)); +} +void protocol_field_t::port_set(uint32_t key, port_field_t const & value) { pimpl->port_set(key, value); } void +protocol_field_t::port_set(uint32_t key, port_field_t && value) { + pimpl->port_set(key, std::move(value)); +} +void protocol_field_t::port_del(uint32_t key) { pimpl->port_del(key); } @@ -302,11 +344,20 @@ tp_rule_filter_t::protocols_is( pimpl->protocols_is(protocols); } void +tp_rule_filter_t::protocols_is( + std::map && protocols) { + pimpl->protocols_is(std::move(protocols)); +} +void tp_rule_filter_t::protocol_set(protocol_range_t key, protocol_field_t const & value) { pimpl->protocol_set(key, value); } void +tp_rule_filter_t::protocol_set(protocol_range_t key, protocol_field_t && value) { + pimpl->protocol_set(key, std::move(value)); +} +void tp_rule_filter_t::protocol_del(protocol_range_t key) { pimpl->protocol_del(key); } diff --git a/eos/inline/types/structured_filter_impl.h b/eos/inline/types/structured_filter_impl.h index 7e4f782..db6f977 100644 --- a/eos/inline/types/structured_filter_impl.h +++ b/eos/inline/types/structured_filter_impl.h @@ -186,11 +186,21 @@ port_field_impl_t::src_ports_is(std::set const & src_ports) { src_ports_ = src_ports; } +void +port_field_impl_t::src_ports_is(std::set && src_ports) { + src_ports_ = std::move(src_ports); +} + void port_field_impl_t::src_port_set(port_range_t const & value) { src_ports_.insert(value); } +void +port_field_impl_t::src_port_set(port_range_t && value) { + src_ports_.emplace(std::move(value)); +} + void port_field_impl_t::src_port_del(port_range_t const & value) { src_ports_.erase(value); @@ -206,11 +216,21 @@ port_field_impl_t::dst_ports_is(std::set const & dst_ports) { dst_ports_ = dst_ports; } +void +port_field_impl_t::dst_ports_is(std::set && dst_ports) { + dst_ports_ = std::move(dst_ports); +} + void port_field_impl_t::dst_port_set(port_range_t const & value) { dst_ports_.insert(value); } +void +port_field_impl_t::dst_port_set(port_range_t && value) { + dst_ports_.emplace(std::move(value)); +} + void port_field_impl_t::dst_port_del(port_range_t const & value) { dst_ports_.erase(value); @@ -227,11 +247,22 @@ port_field_impl_t::src_port_field_sets_is( src_port_field_sets_ = src_port_field_sets; } +void +port_field_impl_t::src_port_field_sets_is( + std::unordered_set && src_port_field_sets) { + src_port_field_sets_ = std::move(src_port_field_sets); +} + void port_field_impl_t::src_port_field_set_set(std::string const & value) { src_port_field_sets_.insert(value); } +void +port_field_impl_t::src_port_field_set_set(std::string && value) { + src_port_field_sets_.emplace(std::move(value)); +} + void port_field_impl_t::src_port_field_set_del(std::string const & value) { src_port_field_sets_.erase(value); @@ -248,11 +279,22 @@ port_field_impl_t::dst_port_field_sets_is( dst_port_field_sets_ = dst_port_field_sets; } +void +port_field_impl_t::dst_port_field_sets_is( + std::unordered_set && dst_port_field_sets) { + dst_port_field_sets_ = std::move(dst_port_field_sets); +} + void port_field_impl_t::dst_port_field_set_set(std::string const & value) { dst_port_field_sets_.insert(value); } +void +port_field_impl_t::dst_port_field_set_set(std::string && value) { + dst_port_field_sets_.emplace(std::move(value)); +} + void port_field_impl_t::dst_port_field_set_del(std::string const & value) { dst_port_field_sets_.erase(value); @@ -386,11 +428,21 @@ protocol_field_impl_t::ports_is(std::map const & ports) ports_ = ports; } +void +protocol_field_impl_t::ports_is(std::map && ports) { + ports_ = std::move(ports); +} + void protocol_field_impl_t::port_set(uint32_t key, port_field_t const & value) { ports_[key] = value; } +void +protocol_field_impl_t::port_set(uint32_t key, port_field_t && value) { + ports_[key] = std::move(value); +} + void protocol_field_impl_t::port_del(uint32_t key) { ports_.erase(key); @@ -550,12 +602,24 @@ tp_rule_filter_impl_t::protocols_is( protocols_ = protocols; } +void +tp_rule_filter_impl_t::protocols_is( + std::map && protocols) { + protocols_ = std::move(protocols); +} + void tp_rule_filter_impl_t::protocol_set(protocol_range_t key, protocol_field_t const & value) { protocols_[key] = value; } +void +tp_rule_filter_impl_t::protocol_set(protocol_range_t key, + protocol_field_t && value) { + protocols_[key] = std::move(value); +} + void tp_rule_filter_impl_t::protocol_del(protocol_range_t key) { protocols_.erase(key); diff --git a/eos/types/acl.h b/eos/types/acl.h index a0c4292..c1c9972 100644 --- a/eos/types/acl.h +++ b/eos/types/acl.h @@ -12,6 +12,23 @@ #include #include +#ifdef SWIG +%ignore eos::acl_ttl_spec_t(eos::acl_ttl_spec_t &&) noexcept; +%ignore eos::acl_ttl_spec_t::operator=(eos::acl_ttl_spec_t &&) noexcept; +%ignore eos::acl_port_spec_t(eos::acl_port_spec_t &&) noexcept; +%ignore eos::acl_port_spec_t::operator=(eos::acl_port_spec_t &&) noexcept; +%ignore eos::acl_port_spec_t::ports_is(std::list &&); +%ignore eos::port_set(uint16_t &&); +%ignore eos::acl_rule_base_t(eos::acl_rule_base_t &&) noexcept; +%ignore eos::acl_rule_base_t::operator=(eos::acl_rule_base_t &&) noexcept; +%ignore eos::acl_rule_ip_t(eos::acl_rule_ip_t &&) noexcept; +%ignore eos::acl_rule_ip_t::operator=(eos::acl_rule_ip_t &&) noexcept; +%ignore eos::acl_rule_ip_t::source_addr_is(eos::ip_addr_mask_t &&); +%ignore eos::acl_rule_ip_t::destination_addr_is(eos::ip_addr_mask_t &&); +%ignore eos::acl_rule_eth_t(eos::acl_rule_eth_t &&) noexcept; +%ignore eos::acl_rule_eth_t::operator=(eos::acl_rule_eth_t &&) noexcept; +#endif + namespace eos { enum { @@ -122,6 +139,8 @@ class EOS_SDK_PUBLIC acl_ttl_spec_t { acl_ttl_spec_t& operator=( acl_ttl_spec_t const & other); + acl_ttl_spec_t(acl_ttl_spec_t && other) noexcept; + acl_ttl_spec_t & operator=(acl_ttl_spec_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -178,6 +197,8 @@ class EOS_SDK_PUBLIC acl_port_spec_t { acl_port_spec_t& operator=( acl_port_spec_t const & other); + acl_port_spec_t(acl_port_spec_t && other) noexcept; + acl_port_spec_t & operator=(acl_port_spec_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -189,8 +210,11 @@ class EOS_SDK_PUBLIC acl_port_spec_t { std::list const & ports() const; void ports_is(std::list const & ports); + void ports_is(std::list && ports); /** Prepend one port to the list. */ void port_set(uint16_t const & ports); + /** Prepend one port to the list. */ + void port_set(uint16_t && ports); /** Remove all matching port elements. */ void port_del(uint16_t const & ports); @@ -301,6 +325,8 @@ class EOS_SDK_PUBLIC acl_rule_base_t { acl_rule_base_t& operator=( acl_rule_base_t const & other); + acl_rule_base_t(acl_rule_base_t && other) noexcept; + acl_rule_base_t & operator=(acl_rule_base_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -344,6 +370,8 @@ class EOS_SDK_PUBLIC acl_rule_ip_t : public acl_rule_base_t { acl_rule_ip_t& operator=( acl_rule_ip_t const & other); + acl_rule_ip_t(acl_rule_ip_t && other) noexcept; + acl_rule_ip_t & operator=(acl_rule_ip_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -370,9 +398,11 @@ class EOS_SDK_PUBLIC acl_rule_ip_t : public acl_rule_base_t { ip_addr_mask_t source_addr() const; void source_addr_is(ip_addr_mask_t const & source_addr); + void source_addr_is(ip_addr_mask_t && source_addr); ip_addr_mask_t destination_addr() const; void destination_addr_is(ip_addr_mask_t const & destination_addr); + void destination_addr_is(ip_addr_mask_t && destination_addr); acl_port_spec_t source_port() const; void source_port_is(acl_port_spec_t source_port); @@ -475,6 +505,8 @@ class EOS_SDK_PUBLIC acl_rule_eth_t : public acl_rule_base_t { acl_rule_eth_t& operator=( acl_rule_eth_t const & other); + acl_rule_eth_t(acl_rule_eth_t && other) noexcept; + acl_rule_eth_t & operator=(acl_rule_eth_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/acl_impl.h b/eos/types/acl_impl.h index 4648936..a97a8a7 100644 --- a/eos/types/acl_impl.h +++ b/eos/types/acl_impl.h @@ -76,8 +76,11 @@ class EOS_SDK_PUBLIC acl_port_spec_impl_t { std::list const & ports() const; void ports_is(std::list const & ports); + void ports_is(std::list && ports); /** Prepend one port to the list. */ void port_set(uint16_t const & ports); + /** Prepend one port to the list. */ + void port_set(uint16_t && ports); /** Remove all matching port elements. */ void port_del(uint16_t const & ports); @@ -178,9 +181,11 @@ class EOS_SDK_PUBLIC acl_rule_ip_impl_t { ip_addr_mask_t source_addr() const; void source_addr_is(ip_addr_mask_t const & source_addr); + void source_addr_is(ip_addr_mask_t && source_addr); ip_addr_mask_t destination_addr() const; void destination_addr_is(ip_addr_mask_t const & destination_addr); + void destination_addr_is(ip_addr_mask_t && destination_addr); acl_port_spec_t source_port() const; void source_port_is(acl_port_spec_t source_port); diff --git a/eos/types/bfd.h b/eos/types/bfd.h index f5df5c0..7419ddd 100644 --- a/eos/types/bfd.h +++ b/eos/types/bfd.h @@ -13,6 +13,24 @@ #include #include +#ifdef SWIG +%ignore eos::bfd_session_key_t(eos::bfd_session_key_t &&) noexcept; +%ignore eos::bfd_session_key_t::operator=(eos::bfd_session_key_t &&) noexcept; +%ignore eos::bfd_interval_t(eos::bfd_interval_t &&) noexcept; +%ignore eos::bfd_interval_t::operator=(eos::bfd_interval_t &&) noexcept; +%ignore eos::bfd_session_t(eos::bfd_session_t &&) noexcept; +%ignore eos::bfd_session_t::operator=(eos::bfd_session_t &&) noexcept; +%ignore eos::sbfd_echo_session_key_t(eos::sbfd_echo_session_key_t &&) noexcept; +%ignore eos::sbfd_echo_session_key_t::operator=(eos::sbfd_echo_session_key_t &&) + noexcept; +%ignore eos::sbfd_interval_t(eos::sbfd_interval_t &&) noexcept; +%ignore eos::sbfd_interval_t::operator=(eos::sbfd_interval_t &&) noexcept; +%ignore eos::sbfd_echo_session_rtt_stats_t(eos::sbfd_echo_session_rtt_stats_t &&) + noexcept; +%ignore eos::sbfd_echo_session_rtt_stats_t::operator=( + eos::sbfd_echo_session_rtt_stats_t &&) noexcept; +#endif + namespace eos { /** BFD session status. */ @@ -68,6 +86,8 @@ class EOS_SDK_PUBLIC bfd_session_key_t { bfd_session_key_t& operator=( bfd_session_key_t const & other); + bfd_session_key_t(bfd_session_key_t && other) noexcept; + bfd_session_key_t & operator=(bfd_session_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -127,6 +147,8 @@ class EOS_SDK_PUBLIC bfd_interval_t { bfd_interval_t& operator=( bfd_interval_t const & other); + bfd_interval_t(bfd_interval_t && other) noexcept; + bfd_interval_t & operator=(bfd_interval_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -173,6 +195,8 @@ class EOS_SDK_PUBLIC bfd_session_t { bfd_session_t& operator=( bfd_session_t const & other); + bfd_session_t(bfd_session_t && other) noexcept; + bfd_session_t & operator=(bfd_session_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -225,6 +249,8 @@ class EOS_SDK_PUBLIC sbfd_echo_session_key_t { sbfd_echo_session_key_t& operator=( sbfd_echo_session_key_t const & other); + sbfd_echo_session_key_t(sbfd_echo_session_key_t && other) noexcept; + sbfd_echo_session_key_t & operator=(sbfd_echo_session_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -294,6 +320,8 @@ class EOS_SDK_PUBLIC sbfd_interval_t { sbfd_interval_t& operator=( sbfd_interval_t const & other); + sbfd_interval_t(sbfd_interval_t && other) noexcept; + sbfd_interval_t & operator=(sbfd_interval_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -343,6 +371,9 @@ class EOS_SDK_PUBLIC sbfd_echo_session_rtt_stats_t { sbfd_echo_session_rtt_stats_t& operator=( sbfd_echo_session_rtt_stats_t const & other); + sbfd_echo_session_rtt_stats_t(sbfd_echo_session_rtt_stats_t && other) noexcept; + sbfd_echo_session_rtt_stats_t & operator=(sbfd_echo_session_rtt_stats_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/bgp.h b/eos/types/bgp.h index 6a10021..ff23091 100644 --- a/eos/types/bgp.h +++ b/eos/types/bgp.h @@ -10,6 +10,13 @@ #include #include +#ifdef SWIG +%ignore eos::bgp_peer_key_t(eos::bgp_peer_key_t &&) noexcept; +%ignore eos::bgp_peer_key_t::operator=(eos::bgp_peer_key_t &&) noexcept; +%ignore eos::bgp_peer_key_t::vrf_name_is(std::string &&); +%ignore eos::bgp_peer_key_t::peer_addr_is(eos::ip_addr_t &&); +#endif + namespace eos { typedef uint32_t bgp_asn_t; @@ -25,6 +32,8 @@ class EOS_SDK_PUBLIC bgp_peer_key_t { bgp_peer_key_t& operator=( bgp_peer_key_t const & other); + bgp_peer_key_t(bgp_peer_key_t && other) noexcept; + bgp_peer_key_t & operator=(bgp_peer_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -35,11 +44,15 @@ class EOS_SDK_PUBLIC bgp_peer_key_t { std::string vrf_name() const; /** Setter for 'vrf_name'. */ void vrf_name_is(std::string const & vrf_name); + /** Moving Setter for 'vrf_name'. */ + void vrf_name_is(std::string && vrf_name); /** Getter for 'peer_addr': BGP peer address. */ ip_addr_t peer_addr() const; /** Setter for 'peer_addr'. */ void peer_addr_is(ip_addr_t const & peer_addr); + /** Moving Setter for 'peer_addr'. */ + void peer_addr_is(ip_addr_t && peer_addr); bool operator==(bgp_peer_key_t const & other) const; bool operator!=(bgp_peer_key_t const & other) const; diff --git a/eos/types/bgp_impl.h b/eos/types/bgp_impl.h index 2ce44ed..9ebc98d 100644 --- a/eos/types/bgp_impl.h +++ b/eos/types/bgp_impl.h @@ -23,11 +23,15 @@ class EOS_SDK_PUBLIC bgp_peer_key_impl_t { std::string vrf_name() const; /** Setter for 'vrf_name'. */ void vrf_name_is(std::string const & vrf_name); + /** Moving Setter for 'vrf_name'. */ + void vrf_name_is(std::string && vrf_name); /** Getter for 'peer_addr': BGP peer address. */ ip_addr_t peer_addr() const; /** Setter for 'peer_addr'. */ void peer_addr_is(ip_addr_t const & peer_addr); + /** Moving Setter for 'peer_addr'. */ + void peer_addr_is(ip_addr_t && peer_addr); bool operator==(bgp_peer_key_impl_t const & other) const; bool operator!=(bgp_peer_key_impl_t const & other) const; diff --git a/eos/types/bgp_path.h b/eos/types/bgp_path.h index 978a275..ca7cdeb 100644 --- a/eos/types/bgp_path.h +++ b/eos/types/bgp_path.h @@ -11,6 +11,30 @@ #include #include +#ifdef SWIG +%ignore eos::bgp_path_attr_fields_t(eos::bgp_path_attr_fields_t &&) noexcept; +%ignore eos::bgp_path_attr_fields_t::operator=(eos::bgp_path_attr_fields_t &&) + noexcept; +%ignore eos::bgp_path_options_t(eos::bgp_path_options_t &&) noexcept; +%ignore eos::bgp_path_options_t::operator=(eos::bgp_path_options_t &&) noexcept; +%ignore eos::bgp_path_options_t::path_attr_fields_is( + eos::bgp_path_attr_fields_t &&); +%ignore eos::bgp_path_attr_t(eos::bgp_path_attr_t &&) noexcept; +%ignore eos::bgp_path_attr_t::operator=(eos::bgp_path_attr_t &&) noexcept; +%ignore eos::bgp_path_attr_t::next_hop_is(eos::ip_addr_t &&); +%ignore eos::bgp_path_attr_t::community_list_is(std::unordered_set &&); +%ignore eos::community_list_set(uint32_t &&); +%ignore eos::bgp_path_key_t(eos::bgp_path_key_t &&) noexcept; +%ignore eos::bgp_path_key_t::operator=(eos::bgp_path_key_t &&) noexcept; +%ignore eos::bgp_path_key_t::prefix_is(eos::ip_prefix_t &&); +%ignore eos::bgp_path_key_t::peer_addr_is(eos::ip_addr_t &&); +%ignore eos::bgp_path_key_t::vrf_name_is(std::string &&); +%ignore eos::bgp_path_t(eos::bgp_path_t &&) noexcept; +%ignore eos::bgp_path_t::operator=(eos::bgp_path_t &&) noexcept; +%ignore eos::bgp_path_t::path_key_is(eos::bgp_path_key_t &&); +%ignore eos::bgp_path_t::path_attr_is(eos::bgp_path_attr_t &&); +#endif + namespace eos { /** BGP Address Family Identifiers and Subsequent Address Family Identifiers. */ @@ -45,6 +69,8 @@ class EOS_SDK_PUBLIC bgp_path_attr_fields_t { bgp_path_attr_fields_t& operator=( bgp_path_attr_fields_t const & other); + bgp_path_attr_fields_t(bgp_path_attr_fields_t && other) noexcept; + bgp_path_attr_fields_t & operator=(bgp_path_attr_fields_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -100,6 +126,8 @@ class EOS_SDK_PUBLIC bgp_path_options_t { bgp_path_options_t& operator=( bgp_path_options_t const & other); + bgp_path_options_t(bgp_path_options_t && other) noexcept; + bgp_path_options_t & operator=(bgp_path_options_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -121,6 +149,8 @@ class EOS_SDK_PUBLIC bgp_path_options_t { bgp_path_attr_fields_t path_attr_fields() const; /** Setter for 'path_attr_fields'. */ void path_attr_fields_is(bgp_path_attr_fields_t const & path_attr_fields); + /** Moving Setter for 'path_attr_fields'. */ + void path_attr_fields_is(bgp_path_attr_fields_t && path_attr_fields); bool operator==(bgp_path_options_t const & other) const; bool operator!=(bgp_path_options_t const & other) const; @@ -153,6 +183,8 @@ class EOS_SDK_PUBLIC bgp_path_attr_t { bgp_path_attr_t& operator=( bgp_path_attr_t const & other); + bgp_path_attr_t(bgp_path_attr_t && other) noexcept; + bgp_path_attr_t & operator=(bgp_path_attr_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -163,6 +195,8 @@ class EOS_SDK_PUBLIC bgp_path_attr_t { ip_addr_t next_hop() const; /** Setter for 'next_hop'. */ void next_hop_is(ip_addr_t const & next_hop); + /** Moving Setter for 'next_hop'. */ + void next_hop_is(ip_addr_t && next_hop); /** Getter for 'origin': The route origin. */ uint8_t origin() const; @@ -183,8 +217,12 @@ class EOS_SDK_PUBLIC bgp_path_attr_t { std::unordered_set const & community_list() const; /** Setter for 'community_list'. */ void community_list_is(std::unordered_set const & community_list); + /** Moving Setter for 'community_list'. */ + void community_list_is(std::unordered_set && community_list); /** Inserts one community_list of 'value' to the set. */ void community_list_set(uint32_t const & value); + /** Inserts one community_list of 'value' to the set. */ + void community_list_set(uint32_t && value); /** Deletes one community_list of 'value' from the set. */ void community_list_del(uint32_t const & value); @@ -221,6 +259,8 @@ class EOS_SDK_PUBLIC bgp_path_key_t { bgp_path_key_t& operator=( bgp_path_key_t const & other); + bgp_path_key_t(bgp_path_key_t && other) noexcept; + bgp_path_key_t & operator=(bgp_path_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -231,16 +271,22 @@ class EOS_SDK_PUBLIC bgp_path_key_t { ip_prefix_t prefix() const; /** Setter for 'prefix'. */ void prefix_is(ip_prefix_t const & prefix); + /** Moving Setter for 'prefix'. */ + void prefix_is(ip_prefix_t && prefix); /** Getter for 'peer_addr': BGP peer address. */ ip_addr_t peer_addr() const; /** Setter for 'peer_addr'. */ void peer_addr_is(ip_addr_t const & peer_addr); + /** Moving Setter for 'peer_addr'. */ + void peer_addr_is(ip_addr_t && peer_addr); /** Getter for 'vrf_name': VRF name. */ std::string vrf_name() const; /** Setter for 'vrf_name'. */ void vrf_name_is(std::string const & vrf_name); + /** Moving Setter for 'vrf_name'. */ + void vrf_name_is(std::string && vrf_name); bool operator==(bgp_path_key_t const & other) const; bool operator!=(bgp_path_key_t const & other) const; @@ -274,6 +320,8 @@ class EOS_SDK_PUBLIC bgp_path_t { bgp_path_t& operator=( bgp_path_t const & other); + bgp_path_t(bgp_path_t && other) noexcept; + bgp_path_t & operator=(bgp_path_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -284,11 +332,15 @@ class EOS_SDK_PUBLIC bgp_path_t { bgp_path_key_t path_key() const; /** Setter for 'path_key'. */ void path_key_is(bgp_path_key_t const & path_key); + /** Moving Setter for 'path_key'. */ + void path_key_is(bgp_path_key_t && path_key); /** Getter for 'path_attr': The BGP path attributes. */ bgp_path_attr_t path_attr() const; /** Setter for 'path_attr'. */ void path_attr_is(bgp_path_attr_t const & path_attr); + /** Moving Setter for 'path_attr'. */ + void path_attr_is(bgp_path_attr_t && path_attr); bool operator==(bgp_path_t const & other) const; bool operator!=(bgp_path_t const & other) const; diff --git a/eos/types/bgp_path_impl.h b/eos/types/bgp_path_impl.h index 9c4fb18..be7219c 100644 --- a/eos/types/bgp_path_impl.h +++ b/eos/types/bgp_path_impl.h @@ -78,6 +78,8 @@ class EOS_SDK_PUBLIC bgp_path_options_impl_t { bgp_path_attr_fields_t path_attr_fields() const; /** Setter for 'path_attr_fields'. */ void path_attr_fields_is(bgp_path_attr_fields_t const & path_attr_fields); + /** Moving Setter for 'path_attr_fields'. */ + void path_attr_fields_is(bgp_path_attr_fields_t && path_attr_fields); bool operator==(bgp_path_options_impl_t const & other) const; bool operator!=(bgp_path_options_impl_t const & other) const; @@ -109,6 +111,8 @@ class EOS_SDK_PUBLIC bgp_path_attr_impl_t { ip_addr_t next_hop() const; /** Setter for 'next_hop'. */ void next_hop_is(ip_addr_t const & next_hop); + /** Moving Setter for 'next_hop'. */ + void next_hop_is(ip_addr_t && next_hop); /** Getter for 'origin': The route origin. */ uint8_t origin() const; @@ -129,8 +133,12 @@ class EOS_SDK_PUBLIC bgp_path_attr_impl_t { std::unordered_set const & community_list() const; /** Setter for 'community_list'. */ void community_list_is(std::unordered_set const & community_list); + /** Moving Setter for 'community_list'. */ + void community_list_is(std::unordered_set && community_list); /** Inserts one community_list of 'value' to the set. */ void community_list_set(uint32_t const & value); + /** Inserts one community_list of 'value' to the set. */ + void community_list_set(uint32_t && value); /** Deletes one community_list of 'value' from the set. */ void community_list_del(uint32_t const & value); @@ -170,16 +178,22 @@ class EOS_SDK_PUBLIC bgp_path_key_impl_t { ip_prefix_t prefix() const; /** Setter for 'prefix'. */ void prefix_is(ip_prefix_t const & prefix); + /** Moving Setter for 'prefix'. */ + void prefix_is(ip_prefix_t && prefix); /** Getter for 'peer_addr': BGP peer address. */ ip_addr_t peer_addr() const; /** Setter for 'peer_addr'. */ void peer_addr_is(ip_addr_t const & peer_addr); + /** Moving Setter for 'peer_addr'. */ + void peer_addr_is(ip_addr_t && peer_addr); /** Getter for 'vrf_name': VRF name. */ std::string vrf_name() const; /** Setter for 'vrf_name'. */ void vrf_name_is(std::string const & vrf_name); + /** Moving Setter for 'vrf_name'. */ + void vrf_name_is(std::string && vrf_name); bool operator==(bgp_path_key_impl_t const & other) const; bool operator!=(bgp_path_key_impl_t const & other) const; @@ -213,11 +227,15 @@ class EOS_SDK_PUBLIC bgp_path_impl_t { bgp_path_key_t path_key() const; /** Setter for 'path_key'. */ void path_key_is(bgp_path_key_t const & path_key); + /** Moving Setter for 'path_key'. */ + void path_key_is(bgp_path_key_t && path_key); /** Getter for 'path_attr': The BGP path attributes. */ bgp_path_attr_t path_attr() const; /** Setter for 'path_attr'. */ void path_attr_is(bgp_path_attr_t const & path_attr); + /** Moving Setter for 'path_attr'. */ + void path_attr_is(bgp_path_attr_t && path_attr); bool operator==(bgp_path_impl_t const & other) const; bool operator!=(bgp_path_impl_t const & other) const; diff --git a/eos/types/class_map.h b/eos/types/class_map.h index c401d4e..f7cfe51 100644 --- a/eos/types/class_map.h +++ b/eos/types/class_map.h @@ -12,6 +12,15 @@ #include #include +#ifdef SWIG +%ignore eos::class_map_rule_t(eos::class_map_rule_t &&) noexcept; +%ignore eos::class_map_rule_t::operator=(eos::class_map_rule_t &&) noexcept; +%ignore eos::class_map_t(eos::class_map_t &&) noexcept; +%ignore eos::class_map_t::operator=(eos::class_map_t &&) noexcept; +%ignore eos::class_map_t::key_is(eos::class_map_key_t &&); +%ignore eos::class_map_t::rules_is(std::map &&); +#endif + namespace eos { /** * A special class map name which means "match all MPLS traffic." @@ -46,6 +55,8 @@ class EOS_SDK_PUBLIC class_map_rule_t { class_map_rule_t& operator=( class_map_rule_t const & other); + class_map_rule_t(class_map_rule_t && other) noexcept; + class_map_rule_t & operator=(class_map_rule_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -93,6 +104,8 @@ class EOS_SDK_PUBLIC class_map_t { class_map_t& operator=( class_map_t const & other); + class_map_t(class_map_t && other) noexcept; + class_map_t & operator=(class_map_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -103,13 +116,19 @@ class EOS_SDK_PUBLIC class_map_t { class_map_key_t key() const; /** Setter for 'key'. */ void key_is(class_map_key_t const & key); + /** Moving Setter for 'key'. */ + void key_is(class_map_key_t && key); /** Getter for 'rules': the sequence of class map rules. */ std::map const & rules() const; /** Setter for 'rules'. */ void rules_is(std::map const & rules); + /** Moving Setter for 'rules'. */ + void rules_is(std::map && rules); /** Inserts key/value pair to the map. */ void rule_set(uint32_t key, class_map_rule_t const & value); + /** Inserts key/value pair to the map. */ + void rule_set(uint32_t key, class_map_rule_t && value); /** Deletes the key/value pair from the map. */ void rule_del(uint32_t key); diff --git a/eos/types/class_map_impl.h b/eos/types/class_map_impl.h index eb477c9..db738d6 100644 --- a/eos/types/class_map_impl.h +++ b/eos/types/class_map_impl.h @@ -64,13 +64,19 @@ class EOS_SDK_PUBLIC class_map_impl_t { class_map_key_t key() const; /** Setter for 'key'. */ void key_is(class_map_key_t const & key); + /** Moving Setter for 'key'. */ + void key_is(class_map_key_t && key); /** Getter for 'rules': the sequence of class map rules. */ std::map const & rules() const; /** Setter for 'rules'. */ void rules_is(std::map const & rules); + /** Moving Setter for 'rules'. */ + void rules_is(std::map && rules); /** Inserts key/value pair to the map. */ void rule_set(uint32_t key, class_map_rule_t const & value); + /** Inserts key/value pair to the map. */ + void rule_set(uint32_t key, class_map_rule_t && value); /** Deletes the key/value pair from the map. */ void rule_del(uint32_t key); diff --git a/eos/types/decap_group.h b/eos/types/decap_group.h index 5608f93..f52d16d 100644 --- a/eos/types/decap_group.h +++ b/eos/types/decap_group.h @@ -10,6 +10,12 @@ #include #include +#ifdef SWIG +%ignore eos::decap_group_t(eos::decap_group_t &&) noexcept; +%ignore eos::decap_group_t::operator=(eos::decap_group_t &&) noexcept; +%ignore eos::decap_group_t::destination_addr_is(eos::ip_addr_t &&); +#endif + namespace eos { /** @@ -42,6 +48,8 @@ class EOS_SDK_PUBLIC decap_group_t { decap_group_t& operator=( decap_group_t const & other); + decap_group_t(decap_group_t && other) noexcept; + decap_group_t & operator=(decap_group_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -61,6 +69,8 @@ class EOS_SDK_PUBLIC decap_group_t { ip_addr_t destination_addr() const; /** Setter for 'destination_addr'. */ void destination_addr_is(ip_addr_t const & destination_addr); + /** Moving Setter for 'destination_addr'. */ + void destination_addr_is(ip_addr_t && destination_addr); /** * Getter for 'protocol_type': decapsulate only packets matching this outer IP diff --git a/eos/types/decap_group_impl.h b/eos/types/decap_group_impl.h index 53b5957..87f3ef7 100644 --- a/eos/types/decap_group_impl.h +++ b/eos/types/decap_group_impl.h @@ -36,6 +36,8 @@ class EOS_SDK_PUBLIC decap_group_impl_t { ip_addr_t destination_addr() const; /** Setter for 'destination_addr'. */ void destination_addr_is(ip_addr_t const & destination_addr); + /** Moving Setter for 'destination_addr'. */ + void destination_addr_is(ip_addr_t && destination_addr); /** * Getter for 'protocol_type': decapsulate only packets matching this outer IP diff --git a/eos/types/directflow.h b/eos/types/directflow.h index 7e56689..60a677f 100644 --- a/eos/types/directflow.h +++ b/eos/types/directflow.h @@ -14,6 +14,27 @@ #include #include +#ifdef SWIG +%ignore eos::flow_match_t(eos::flow_match_t &&) noexcept; +%ignore eos::flow_match_t::operator=(eos::flow_match_t &&) noexcept; +%ignore eos::flow_match_t::input_intfs_is(std::set &&); +%ignore eos::input_intf_set(intf_id_t &&); +%ignore eos::flow_match_t::ip_src_is(eos::ip_addr_t &&); +%ignore eos::flow_match_t::ip_src_mask_is(eos::ip_addr_t &&); +%ignore eos::flow_match_t::ip_dst_is(eos::ip_addr_t &&); +%ignore eos::flow_match_t::ip_dst_mask_is(eos::ip_addr_t &&); +%ignore eos::flow_action_t(eos::flow_action_t &&) noexcept; +%ignore eos::flow_action_t::operator=(eos::flow_action_t &&) noexcept; +%ignore eos::flow_action_t::output_intfs_is(std::set &&); +%ignore eos::output_intf_set(intf_id_t &&); +%ignore eos::flow_action_t::ip_src_is(eos::ip_addr_t &&); +%ignore eos::flow_action_t::ip_dst_is(eos::ip_addr_t &&); +%ignore eos::flow_entry_t(eos::flow_entry_t &&) noexcept; +%ignore eos::flow_entry_t::operator=(eos::flow_entry_t &&) noexcept; +%ignore eos::flow_counters_t(eos::flow_counters_t &&) noexcept; +%ignore eos::flow_counters_t::operator=(eos::flow_counters_t &&) noexcept; +#endif + namespace eos { typedef uint16_t flow_priority_t; @@ -76,6 +97,8 @@ class EOS_SDK_PUBLIC flow_match_t { flow_match_t& operator=( flow_match_t const & other); + flow_match_t(flow_match_t && other) noexcept; + flow_match_t & operator=(flow_match_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -91,8 +114,12 @@ class EOS_SDK_PUBLIC flow_match_t { std::set const & input_intfs() const; /** Setter for 'input_intfs'. */ void input_intfs_is(std::set const & input_intfs); + /** Moving Setter for 'input_intfs'. */ + void input_intfs_is(std::set && input_intfs); /** Inserts one input_intf of 'value' to the set. */ void input_intf_set(intf_id_t const & value); + /** Inserts one input_intf of 'value' to the set. */ + void input_intf_set(intf_id_t && value); /** Deletes one input_intf of 'value' from the set. */ void input_intf_del(intf_id_t const & value); @@ -143,21 +170,27 @@ class EOS_SDK_PUBLIC flow_match_t { ip_addr_t ip_src() const; /** Setter for 'ip_src'. */ void ip_src_is(ip_addr_t const & ip_src); + /** Moving Setter for 'ip_src'. */ + void ip_src_is(ip_addr_t && ip_src); void ip_src_is(ip_addr_t const & src, ip_addr_t const & mask); ip_addr_t ip_src_mask() const; void ip_src_mask_is(ip_addr_t const & ip_src_mask); + void ip_src_mask_is(ip_addr_t && ip_src_mask); /** Getter for 'ip_dst': the destination IPv4 address to match on. */ ip_addr_t ip_dst() const; /** Setter for 'ip_dst'. */ void ip_dst_is(ip_addr_t const & ip_dst); + /** Moving Setter for 'ip_dst'. */ + void ip_dst_is(ip_addr_t && ip_dst); void ip_dst_is(ip_addr_t const & dst, ip_addr_t const & mask); ip_addr_t ip_dst_mask() const; void ip_dst_mask_is(ip_addr_t const & ip_dst_mask); + void ip_dst_mask_is(ip_addr_t && ip_dst_mask); bool operator==(flow_match_t const & other) const; bool operator!=(flow_match_t const & other) const; @@ -238,6 +271,8 @@ class EOS_SDK_PUBLIC flow_action_t { flow_action_t& operator=( flow_action_t const & other); + flow_action_t(flow_action_t && other) noexcept; + flow_action_t & operator=(flow_action_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -256,8 +291,12 @@ class EOS_SDK_PUBLIC flow_action_t { std::set const & output_intfs() const; /** Setter for 'output_intfs'. */ void output_intfs_is(std::set const & output_intfs); + /** Moving Setter for 'output_intfs'. */ + void output_intfs_is(std::set && output_intfs); /** Inserts one output_intf of 'value' to the set. */ void output_intf_set(intf_id_t const & value); + /** Inserts one output_intf of 'value' to the set. */ + void output_intf_set(intf_id_t && value); /** Deletes one output_intf of 'value' from the set. */ void output_intf_del(intf_id_t const & value); @@ -283,11 +322,15 @@ class EOS_SDK_PUBLIC flow_action_t { ip_addr_t ip_src() const; /** Setter for 'ip_src'. */ void ip_src_is(ip_addr_t const & ip_src); + /** Moving Setter for 'ip_src'. */ + void ip_src_is(ip_addr_t && ip_src); /** Getter for 'ip_dst': the destination IPv4 address. */ ip_addr_t ip_dst() const; /** Setter for 'ip_dst'. */ void ip_dst_is(ip_addr_t const & ip_dst); + /** Moving Setter for 'ip_dst'. */ + void ip_dst_is(ip_addr_t && ip_dst); bool operator==(flow_action_t const & other) const; bool operator!=(flow_action_t const & other) const; @@ -321,6 +364,8 @@ class EOS_SDK_PUBLIC flow_entry_t { flow_entry_t& operator=( flow_entry_t const & other); + flow_entry_t(flow_entry_t && other) noexcept; + flow_entry_t & operator=(flow_entry_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -365,6 +410,8 @@ class EOS_SDK_PUBLIC flow_counters_t { flow_counters_t& operator=( flow_counters_t const & other); + flow_counters_t(flow_counters_t && other) noexcept; + flow_counters_t & operator=(flow_counters_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/directflow_impl.h b/eos/types/directflow_impl.h index 23f5a17..fa38673 100644 --- a/eos/types/directflow_impl.h +++ b/eos/types/directflow_impl.h @@ -31,8 +31,12 @@ class EOS_SDK_PUBLIC flow_match_impl_t { std::set const & input_intfs() const; /** Setter for 'input_intfs'. */ void input_intfs_is(std::set const & input_intfs); + /** Moving Setter for 'input_intfs'. */ + void input_intfs_is(std::set && input_intfs); /** Inserts one input_intf of 'value' to the set. */ void input_intf_set(intf_id_t const & value); + /** Inserts one input_intf of 'value' to the set. */ + void input_intf_set(intf_id_t && value); /** Deletes one input_intf of 'value' from the set. */ void input_intf_del(intf_id_t const & value); @@ -83,21 +87,27 @@ class EOS_SDK_PUBLIC flow_match_impl_t { ip_addr_t ip_src() const; /** Setter for 'ip_src'. */ void ip_src_is(ip_addr_t const & ip_src); + /** Moving Setter for 'ip_src'. */ + void ip_src_is(ip_addr_t && ip_src); void ip_src_is(ip_addr_t const & src, ip_addr_t const & mask); ip_addr_t ip_src_mask() const; void ip_src_mask_is(ip_addr_t const & ip_src_mask); + void ip_src_mask_is(ip_addr_t && ip_src_mask); /** Getter for 'ip_dst': the destination IPv4 address to match on. */ ip_addr_t ip_dst() const; /** Setter for 'ip_dst'. */ void ip_dst_is(ip_addr_t const & ip_dst); + /** Moving Setter for 'ip_dst'. */ + void ip_dst_is(ip_addr_t && ip_dst); void ip_dst_is(ip_addr_t const & dst, ip_addr_t const & mask); ip_addr_t ip_dst_mask() const; void ip_dst_mask_is(ip_addr_t const & ip_dst_mask); + void ip_dst_mask_is(ip_addr_t && ip_dst_mask); bool operator==(flow_match_impl_t const & other) const; bool operator!=(flow_match_impl_t const & other) const; @@ -149,8 +159,12 @@ class EOS_SDK_PUBLIC flow_action_impl_t { std::set const & output_intfs() const; /** Setter for 'output_intfs'. */ void output_intfs_is(std::set const & output_intfs); + /** Moving Setter for 'output_intfs'. */ + void output_intfs_is(std::set && output_intfs); /** Inserts one output_intf of 'value' to the set. */ void output_intf_set(intf_id_t const & value); + /** Inserts one output_intf of 'value' to the set. */ + void output_intf_set(intf_id_t && value); /** Deletes one output_intf of 'value' from the set. */ void output_intf_del(intf_id_t const & value); @@ -176,11 +190,15 @@ class EOS_SDK_PUBLIC flow_action_impl_t { ip_addr_t ip_src() const; /** Setter for 'ip_src'. */ void ip_src_is(ip_addr_t const & ip_src); + /** Moving Setter for 'ip_src'. */ + void ip_src_is(ip_addr_t && ip_src); /** Getter for 'ip_dst': the destination IPv4 address. */ ip_addr_t ip_dst() const; /** Setter for 'ip_dst'. */ void ip_dst_is(ip_addr_t const & ip_dst); + /** Moving Setter for 'ip_dst'. */ + void ip_dst_is(ip_addr_t && ip_dst); bool operator==(flow_action_impl_t const & other) const; bool operator!=(flow_action_impl_t const & other) const; diff --git a/eos/types/eapi.h b/eos/types/eapi.h index c5fc6fe..4096d43 100644 --- a/eos/types/eapi.h +++ b/eos/types/eapi.h @@ -9,6 +9,11 @@ #include #include +#ifdef SWIG +%ignore eos::eapi_response_t(eos::eapi_response_t &&) noexcept; +%ignore eos::eapi_response_t::operator=(eos::eapi_response_t &&) noexcept; +#endif + namespace eos { class eapi_response_impl_t; @@ -25,6 +30,8 @@ class EOS_SDK_PUBLIC eapi_response_t { eapi_response_t& operator=( eapi_response_t const & other); + eapi_response_t(eapi_response_t && other) noexcept; + eapi_response_t & operator=(eapi_response_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/eth_lag_intf.h b/eos/types/eth_lag_intf.h index 0a093c5..253bef6 100644 --- a/eos/types/eth_lag_intf.h +++ b/eos/types/eth_lag_intf.h @@ -10,6 +10,15 @@ #include #include +#ifdef SWIG +%ignore eos::eth_lag_intf_membership_t(eos::eth_lag_intf_membership_t &&) noexcept; +%ignore eos::eth_lag_intf_membership_t::operator=(eos::eth_lag_intf_membership_t &&) + noexcept; +%ignore eos::eth_lag_intf_membership_t::reason_is(std::string &&); +%ignore eos::eth_lag_intf_t(eos::eth_lag_intf_t &&) noexcept; +%ignore eos::eth_lag_intf_t::operator=(eos::eth_lag_intf_t &&) noexcept; +#endif + namespace eos { /** LAG interface fallback type. */ @@ -95,6 +104,9 @@ class EOS_SDK_PUBLIC eth_lag_intf_membership_t { eth_lag_intf_membership_t& operator=( eth_lag_intf_membership_t const & other); + eth_lag_intf_membership_t(eth_lag_intf_membership_t && other) noexcept; + eth_lag_intf_membership_t & operator=(eth_lag_intf_membership_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -119,6 +131,8 @@ class EOS_SDK_PUBLIC eth_lag_intf_membership_t { std::string reason() const; /** Setter for 'reason'. */ void reason_is(std::string const & reason); + /** Moving Setter for 'reason'. */ + void reason_is(std::string && reason); /** * Getter for 'member_time': the time when this interface became member of an @@ -168,11 +182,13 @@ class EOS_SDK_PUBLIC eth_lag_intf_t { /** Constructor with interface id. */ eth_lag_intf_t(intf_id_t intf, uint32_t min_links, uint64_t speed, eth_lag_intf_fallback_type_t fallback_type, - uint16_t fallback_timeout); + uint16_t fallback_timeout, uint64_t min_speed); eth_lag_intf_t(const eth_lag_intf_t& other); eth_lag_intf_t& operator=( eth_lag_intf_t const & other); + eth_lag_intf_t(eth_lag_intf_t && other) noexcept; + eth_lag_intf_t & operator=(eth_lag_intf_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -202,6 +218,11 @@ class EOS_SDK_PUBLIC eth_lag_intf_t { */ uint16_t fallback_timeout() const; + /** + * Getter for 'min_speed': minimal speed required to keep the LAG interface up. + */ + uint64_t min_speed() const; + /** Returns the default fallback timeout value in seconds. */ uint16_t fallback_timeout_default() const; diff --git a/eos/types/eth_lag_intf_impl.h b/eos/types/eth_lag_intf_impl.h index f36b585..5f33490 100644 --- a/eos/types/eth_lag_intf_impl.h +++ b/eos/types/eth_lag_intf_impl.h @@ -42,6 +42,8 @@ class EOS_SDK_PUBLIC eth_lag_intf_membership_impl_t { std::string reason() const; /** Setter for 'reason'. */ void reason_is(std::string const & reason); + /** Moving Setter for 'reason'. */ + void reason_is(std::string && reason); /** * Getter for 'member_time': the time when this interface became member of an @@ -91,7 +93,7 @@ class EOS_SDK_PUBLIC eth_lag_intf_impl_t { /** Constructor with interface id. */ eth_lag_intf_impl_t(intf_id_t intf, uint32_t min_links, uint64_t speed, eth_lag_intf_fallback_type_t fallback_type, - uint16_t fallback_timeout); + uint16_t fallback_timeout, uint64_t min_speed); /** Getter for 'intf': the id of this LAG interface. */ intf_id_t intf() const; @@ -116,6 +118,11 @@ class EOS_SDK_PUBLIC eth_lag_intf_impl_t { */ uint16_t fallback_timeout() const; + /** + * Getter for 'min_speed': minimal speed required to keep the LAG interface up. + */ + uint64_t min_speed() const; + /** Returns the default fallback timeout value in seconds. */ uint16_t fallback_timeout_default() const; @@ -141,6 +148,7 @@ class EOS_SDK_PUBLIC eth_lag_intf_impl_t { uint32_t min_links_; eth_lag_intf_fallback_type_t fallback_type_; uint16_t fallback_timeout_; + uint64_t min_speed_; }; } diff --git a/eos/types/eth_phy_intf.h b/eos/types/eth_phy_intf.h index 1d71336..d0c9659 100644 --- a/eos/types/eth_phy_intf.h +++ b/eos/types/eth_phy_intf.h @@ -9,6 +9,16 @@ #include #include +#ifdef SWIG +%ignore eos::eth_phy_intf_counters_t(eos::eth_phy_intf_counters_t &&) noexcept; +%ignore eos::eth_phy_intf_counters_t::operator=(eos::eth_phy_intf_counters_t &&) + noexcept; +%ignore eos::eth_phy_intf_bin_counters_t(eos::eth_phy_intf_bin_counters_t &&) + noexcept; +%ignore eos::eth_phy_intf_bin_counters_t::operator=( + eos::eth_phy_intf_bin_counters_t &&) noexcept; +#endif + namespace eos { /** Possible interface link speeds. */ @@ -60,6 +70,8 @@ class EOS_SDK_PUBLIC eth_phy_intf_counters_t { eth_phy_intf_counters_t& operator=( eth_phy_intf_counters_t const & other); + eth_phy_intf_counters_t(eth_phy_intf_counters_t && other) noexcept; + eth_phy_intf_counters_t & operator=(eth_phy_intf_counters_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -195,6 +207,9 @@ class EOS_SDK_PUBLIC eth_phy_intf_bin_counters_t { eth_phy_intf_bin_counters_t& operator=( eth_phy_intf_bin_counters_t const & other); + eth_phy_intf_bin_counters_t(eth_phy_intf_bin_counters_t && other) noexcept; + eth_phy_intf_bin_counters_t & operator=(eth_phy_intf_bin_counters_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/fib.h b/eos/types/fib.h index 58b9f59..f8311d7 100644 --- a/eos/types/fib.h +++ b/eos/types/fib.h @@ -13,6 +13,24 @@ #include #include +#ifdef SWIG +%ignore eos::fib_route_key_t(eos::fib_route_key_t &&) noexcept; +%ignore eos::fib_route_key_t::operator=(eos::fib_route_key_t &&) noexcept; +%ignore eos::fib_route_key_t::prefix_is(eos::ip_prefix_t &&); +%ignore eos::fib_route_t(eos::fib_route_t &&) noexcept; +%ignore eos::fib_route_t::operator=(eos::fib_route_t &&) noexcept; +%ignore eos::fib_route_t::route_key_is(eos::fib_route_key_t &&); +%ignore eos::fib_fec_key_t(eos::fib_fec_key_t &&) noexcept; +%ignore eos::fib_fec_key_t::operator=(eos::fib_fec_key_t &&) noexcept; +%ignore eos::fib_via_t(eos::fib_via_t &&) noexcept; +%ignore eos::fib_via_t::operator=(eos::fib_via_t &&) noexcept; +%ignore eos::fib_via_t::hop_is(eos::ip_addr_t &&); +%ignore eos::fib_fec_t(eos::fib_fec_t &&) noexcept; +%ignore eos::fib_fec_t::operator=(eos::fib_fec_t &&) noexcept; +%ignore eos::fib_fec_t::via_is(std::forward_list &&); +%ignore eos::via_set(eos::fib_via_t &&); +#endif + namespace eos { class fib_route_key_impl_t; @@ -25,6 +43,8 @@ class EOS_SDK_PUBLIC fib_route_key_t { fib_route_key_t& operator=( fib_route_key_t const & other); + fib_route_key_t(fib_route_key_t && other) noexcept; + fib_route_key_t & operator=(fib_route_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -35,6 +55,8 @@ class EOS_SDK_PUBLIC fib_route_key_t { ip_prefix_t prefix() const; /** Setter for 'prefix'. */ void prefix_is(ip_prefix_t const & prefix); + /** Moving Setter for 'prefix'. */ + void prefix_is(ip_prefix_t && prefix); bool operator==(fib_route_key_t const & other) const; bool operator!=(fib_route_key_t const & other) const; @@ -109,6 +131,8 @@ class EOS_SDK_PUBLIC fib_route_t { fib_route_t& operator=( fib_route_t const & other); + fib_route_t(fib_route_t && other) noexcept; + fib_route_t & operator=(fib_route_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -119,6 +143,8 @@ class EOS_SDK_PUBLIC fib_route_t { fib_route_key_t route_key() const; /** Setter for 'route_key'. */ void route_key_is(fib_route_key_t const & route_key); + /** Moving Setter for 'route_key'. */ + void route_key_is(fib_route_key_t && route_key); /** Getter for 'preference': 0..255 only, defaults to 1. */ ip_route_preference_t preference() const; @@ -167,6 +193,8 @@ class EOS_SDK_PUBLIC fib_fec_key_t { fib_fec_key_t& operator=( fib_fec_key_t const & other); + fib_fec_key_t(fib_fec_key_t && other) noexcept; + fib_fec_key_t & operator=(fib_fec_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -212,6 +240,8 @@ class EOS_SDK_PUBLIC fib_via_t { fib_via_t& operator=( fib_via_t const & other); + fib_via_t(fib_via_t && other) noexcept; + fib_via_t & operator=(fib_via_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -220,6 +250,7 @@ class EOS_SDK_PUBLIC fib_via_t { ip_addr_t hop() const; void hop_is(ip_addr_t const & hop); + void hop_is(ip_addr_t && hop); intf_id_t intf() const; void intf_is(intf_id_t intf); @@ -275,6 +306,8 @@ class EOS_SDK_PUBLIC fib_fec_t { fib_fec_t& operator=( fib_fec_t const & other); + fib_fec_t(fib_fec_t && other) noexcept; + fib_fec_t & operator=(fib_fec_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -304,8 +337,12 @@ class EOS_SDK_PUBLIC fib_fec_t { std::forward_list const & via() const; /** Setter for 'via'. */ void via_is(std::forward_list const & via); + /** Moving Setter for 'via'. */ + void via_is(std::forward_list && via); /** Prepend one via to the list. */ void via_set(fib_via_t const & via); + /** Prepend one via to the list. */ + void via_set(fib_via_t && via); /** Remove all matching via elements. */ void via_del(fib_via_t const & via); diff --git a/eos/types/fib_impl.h b/eos/types/fib_impl.h index 3027a07..7f395af 100644 --- a/eos/types/fib_impl.h +++ b/eos/types/fib_impl.h @@ -25,6 +25,8 @@ class EOS_SDK_PUBLIC fib_route_key_impl_t { ip_prefix_t prefix() const; /** Setter for 'prefix'. */ void prefix_is(ip_prefix_t const & prefix); + /** Moving Setter for 'prefix'. */ + void prefix_is(ip_prefix_t && prefix); bool operator==(fib_route_key_impl_t const & other) const; bool operator!=(fib_route_key_impl_t const & other) const; @@ -59,6 +61,8 @@ class EOS_SDK_PUBLIC fib_route_impl_t { fib_route_key_t route_key() const; /** Setter for 'route_key'. */ void route_key_is(fib_route_key_t const & route_key); + /** Moving Setter for 'route_key'. */ + void route_key_is(fib_route_key_t && route_key); /** Getter for 'preference': 0..255 only, defaults to 1. */ ip_route_preference_t preference() const; @@ -138,6 +142,7 @@ class EOS_SDK_PUBLIC fib_via_impl_t { ip_addr_t hop() const; void hop_is(ip_addr_t const & hop); + void hop_is(ip_addr_t && hop); intf_id_t intf() const; void intf_is(intf_id_t intf); @@ -197,8 +202,12 @@ class EOS_SDK_PUBLIC fib_fec_impl_t { std::forward_list const & via() const; /** Setter for 'via'. */ void via_is(std::forward_list const & via); + /** Moving Setter for 'via'. */ + void via_is(std::forward_list && via); /** Prepend one via to the list. */ void via_set(fib_via_t const & via); + /** Prepend one via to the list. */ + void via_set(fib_via_t && via); /** Remove all matching via elements. */ void via_del(fib_via_t const & via); diff --git a/eos/types/hardware_table.h b/eos/types/hardware_table.h index 116a6aa..263c0de 100644 --- a/eos/types/hardware_table.h +++ b/eos/types/hardware_table.h @@ -9,6 +9,21 @@ #include #include +#ifdef SWIG +%ignore eos::hardware_table_key_t(eos::hardware_table_key_t &&) noexcept; +%ignore eos::hardware_table_key_t::operator=(eos::hardware_table_key_t &&) noexcept; +%ignore eos::hardware_table_high_watermark_t( + eos::hardware_table_high_watermark_t &&) noexcept; +%ignore eos::hardware_table_high_watermark_t::operator=( + eos::hardware_table_high_watermark_t &&) noexcept; +%ignore eos::hardware_table_usage_t(eos::hardware_table_usage_t &&) noexcept; +%ignore eos::hardware_table_usage_t::operator=(eos::hardware_table_usage_t &&) + noexcept; +%ignore eos::hardware_table_entry_t(eos::hardware_table_entry_t &&) noexcept; +%ignore eos::hardware_table_entry_t::operator=(eos::hardware_table_entry_t &&) + noexcept; +#endif + namespace eos { class hardware_table_key_impl_t; @@ -25,6 +40,8 @@ class EOS_SDK_PUBLIC hardware_table_key_t { hardware_table_key_t& operator=( hardware_table_key_t const & other); + hardware_table_key_t(hardware_table_key_t && other) noexcept; + hardware_table_key_t & operator=(hardware_table_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -82,6 +99,10 @@ class EOS_SDK_PUBLIC hardware_table_high_watermark_t { hardware_table_high_watermark_t& operator=( hardware_table_high_watermark_t const & other); + hardware_table_high_watermark_t(hardware_table_high_watermark_t && other) + noexcept; + hardware_table_high_watermark_t & operator=( + hardware_table_high_watermark_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -129,6 +150,8 @@ class EOS_SDK_PUBLIC hardware_table_usage_t { hardware_table_usage_t& operator=( hardware_table_usage_t const & other); + hardware_table_usage_t(hardware_table_usage_t && other) noexcept; + hardware_table_usage_t & operator=(hardware_table_usage_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -190,6 +213,8 @@ class EOS_SDK_PUBLIC hardware_table_entry_t { hardware_table_entry_t& operator=( hardware_table_entry_t const & other); + hardware_table_entry_t(hardware_table_entry_t && other) noexcept; + hardware_table_entry_t & operator=(hardware_table_entry_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/intf.h b/eos/types/intf.h index fb4c75b..476878e 100644 --- a/eos/types/intf.h +++ b/eos/types/intf.h @@ -11,6 +11,13 @@ #include #include +#ifdef SWIG +%ignore eos::intf_counters_t(eos::intf_counters_t &&) noexcept; +%ignore eos::intf_counters_t::operator=(eos::intf_counters_t &&) noexcept; +%ignore eos::intf_traffic_rates_t(eos::intf_traffic_rates_t &&) noexcept; +%ignore eos::intf_traffic_rates_t::operator=(eos::intf_traffic_rates_t &&) noexcept; +#endif + namespace eos { /** The operational status of an interface. */ @@ -115,6 +122,8 @@ class EOS_SDK_PUBLIC intf_counters_t { intf_counters_t& operator=( intf_counters_t const & other); + intf_counters_t(intf_counters_t && other) noexcept; + intf_counters_t & operator=(intf_counters_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -217,6 +226,8 @@ class EOS_SDK_PUBLIC intf_traffic_rates_t { intf_traffic_rates_t& operator=( intf_traffic_rates_t const & other); + intf_traffic_rates_t(intf_traffic_rates_t && other) noexcept; + intf_traffic_rates_t & operator=(intf_traffic_rates_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/ip.h b/eos/types/ip.h index d29c1b1..74fe320 100644 --- a/eos/types/ip.h +++ b/eos/types/ip.h @@ -17,6 +17,11 @@ #include #include +#ifdef SWIG +%ignore eos::ip_addr_mask_t(eos::ip_addr_mask_t &&) noexcept; +%ignore eos::ip_addr_mask_t::operator=(eos::ip_addr_mask_t &&) noexcept; +#endif + namespace eos { /** The address family of an IP address. */ @@ -187,6 +192,8 @@ class EOS_SDK_PUBLIC ip_addr_mask_t { ip_addr_mask_t& operator=( ip_addr_mask_t const & other); + ip_addr_mask_t(ip_addr_mask_t && other) noexcept; + ip_addr_mask_t & operator=(ip_addr_mask_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/ip_route.h b/eos/types/ip_route.h index befbdc0..4d12030 100644 --- a/eos/types/ip_route.h +++ b/eos/types/ip_route.h @@ -13,6 +13,22 @@ #include #include +#ifdef SWIG +%ignore eos::ip_route_key_t(eos::ip_route_key_t &&) noexcept; +%ignore eos::ip_route_key_t::operator=(eos::ip_route_key_t &&) noexcept; +%ignore eos::ip_route_key_t::prefix_is(eos::ip_prefix_t &&); +%ignore eos::ip_route_t(eos::ip_route_t &&) noexcept; +%ignore eos::ip_route_t::operator=(eos::ip_route_t &&) noexcept; +%ignore eos::ip_route_t::key_is(eos::ip_route_key_t &&); +%ignore eos::ip_route_t::command_tag_is(std::string &&); +%ignore eos::ip_route_via_t(eos::ip_route_via_t &&) noexcept; +%ignore eos::ip_route_via_t::operator=(eos::ip_route_via_t &&) noexcept; +%ignore eos::ip_route_via_t::route_key_is(eos::ip_route_key_t &&); +%ignore eos::ip_route_via_t::hop_is(eos::ip_addr_t &&); +%ignore eos::ip_route_via_t::nexthop_group_is(std::string &&); +%ignore eos::ip_route_via_t::egress_vrf_is(std::string &&); +#endif + namespace eos { typedef uint32_t ip_route_tag_t; @@ -51,6 +67,8 @@ class EOS_SDK_PUBLIC ip_route_key_t { ip_route_key_t& operator=( ip_route_key_t const & other); + ip_route_key_t(ip_route_key_t && other) noexcept; + ip_route_key_t & operator=(ip_route_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -61,6 +79,8 @@ class EOS_SDK_PUBLIC ip_route_key_t { ip_prefix_t prefix() const; /** Setter for 'prefix'. */ void prefix_is(ip_prefix_t const & prefix); + /** Moving Setter for 'prefix'. */ + void prefix_is(ip_prefix_t && prefix); /** Getter for 'preference': a value 0..255, defaults to 1. */ ip_route_preference_t preference() const; @@ -105,6 +125,8 @@ class EOS_SDK_PUBLIC ip_route_t { ip_route_t& operator=( ip_route_t const & other); + ip_route_t(ip_route_t && other) noexcept; + ip_route_t & operator=(ip_route_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -115,6 +137,8 @@ class EOS_SDK_PUBLIC ip_route_t { ip_route_key_t key() const; /** Setter for 'key'. */ void key_is(ip_route_key_t const & key); + /** Moving Setter for 'key'. */ + void key_is(ip_route_key_t && key); /** Getter for 'tag': a numbered tag, used for table segregation. */ ip_route_tag_t tag() const; @@ -136,6 +160,8 @@ class EOS_SDK_PUBLIC ip_route_t { std::string command_tag() const; /** Setter for 'command_tag'. */ void command_tag_is(std::string const & command_tag); + /** Moving Setter for 'command_tag'. */ + void command_tag_is(std::string && command_tag); /** The address family of the route_key_t prefix. */ af_t af() const; @@ -175,6 +201,8 @@ class EOS_SDK_PUBLIC ip_route_via_t { ip_route_via_t& operator=( ip_route_via_t const & other); + ip_route_via_t(ip_route_via_t && other) noexcept; + ip_route_via_t & operator=(ip_route_via_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -185,6 +213,8 @@ class EOS_SDK_PUBLIC ip_route_via_t { ip_route_key_t route_key() const; /** Setter for 'route_key'. */ void route_key_is(ip_route_key_t const & route_key); + /** Moving Setter for 'route_key'. */ + void route_key_is(ip_route_key_t && route_key); /** * Getter for 'hop': IP v4/v6 nexthop address, or a default ip_addr_t if not @@ -193,6 +223,8 @@ class EOS_SDK_PUBLIC ip_route_via_t { ip_addr_t hop() const; /** Setter for 'hop'. */ void hop_is(ip_addr_t const & hop); + /** Moving Setter for 'hop'. */ + void hop_is(ip_addr_t && hop); /** * Getter for 'intf': use the named interface if not a default intf_id_t. Using @@ -211,6 +243,8 @@ class EOS_SDK_PUBLIC ip_route_via_t { std::string nexthop_group() const; /** Setter for 'nexthop_group'. */ void nexthop_group_is(std::string const & nexthop_group); + /** Moving Setter for 'nexthop_group'. */ + void nexthop_group_is(std::string && nexthop_group); /** * Getter for 'mpls_label': Push this MPLS label onto packets using this route. @@ -240,6 +274,8 @@ class EOS_SDK_PUBLIC ip_route_via_t { std::string egress_vrf() const; /** Setter for 'egress_vrf'. */ void egress_vrf_is(std::string const & egress_vrf); + /** Moving Setter for 'egress_vrf'. */ + void egress_vrf_is(std::string && egress_vrf); /** Getter for 'metric': metric for the via. */ ip_via_metric_t metric() const; diff --git a/eos/types/ip_route_impl.h b/eos/types/ip_route_impl.h index 2486feb..154361d 100644 --- a/eos/types/ip_route_impl.h +++ b/eos/types/ip_route_impl.h @@ -27,6 +27,8 @@ class EOS_SDK_PUBLIC ip_route_key_impl_t { ip_prefix_t prefix() const; /** Setter for 'prefix'. */ void prefix_is(ip_prefix_t const & prefix); + /** Moving Setter for 'prefix'. */ + void prefix_is(ip_prefix_t && prefix); /** Getter for 'preference': a value 0..255, defaults to 1. */ ip_route_preference_t preference() const; @@ -70,6 +72,8 @@ class EOS_SDK_PUBLIC ip_route_impl_t { ip_route_key_t key() const; /** Setter for 'key'. */ void key_is(ip_route_key_t const & key); + /** Moving Setter for 'key'. */ + void key_is(ip_route_key_t && key); /** Getter for 'tag': a numbered tag, used for table segregation. */ ip_route_tag_t tag() const; @@ -91,6 +95,8 @@ class EOS_SDK_PUBLIC ip_route_impl_t { std::string command_tag() const; /** Setter for 'command_tag'. */ void command_tag_is(std::string const & command_tag); + /** Moving Setter for 'command_tag'. */ + void command_tag_is(std::string && command_tag); /** The address family of the route_key_t prefix. */ af_t af() const; @@ -130,6 +136,8 @@ class EOS_SDK_PUBLIC ip_route_via_impl_t { ip_route_key_t route_key() const; /** Setter for 'route_key'. */ void route_key_is(ip_route_key_t const & route_key); + /** Moving Setter for 'route_key'. */ + void route_key_is(ip_route_key_t && route_key); /** * Getter for 'hop': IP v4/v6 nexthop address, or a default ip_addr_t if not @@ -138,6 +146,8 @@ class EOS_SDK_PUBLIC ip_route_via_impl_t { ip_addr_t hop() const; /** Setter for 'hop'. */ void hop_is(ip_addr_t const & hop); + /** Moving Setter for 'hop'. */ + void hop_is(ip_addr_t && hop); /** * Getter for 'intf': use the named interface if not a default intf_id_t. Using @@ -156,6 +166,8 @@ class EOS_SDK_PUBLIC ip_route_via_impl_t { std::string nexthop_group() const; /** Setter for 'nexthop_group'. */ void nexthop_group_is(std::string const & nexthop_group); + /** Moving Setter for 'nexthop_group'. */ + void nexthop_group_is(std::string && nexthop_group); /** * Getter for 'mpls_label': Push this MPLS label onto packets using this route. @@ -185,6 +197,8 @@ class EOS_SDK_PUBLIC ip_route_via_impl_t { std::string egress_vrf() const; /** Setter for 'egress_vrf'. */ void egress_vrf_is(std::string const & egress_vrf); + /** Moving Setter for 'egress_vrf'. */ + void egress_vrf_is(std::string && egress_vrf); /** Getter for 'metric': metric for the via. */ ip_via_metric_t metric() const; diff --git a/eos/types/lldp.h b/eos/types/lldp.h index df618ca..1da8c17 100644 --- a/eos/types/lldp.h +++ b/eos/types/lldp.h @@ -12,6 +12,30 @@ #include #include +#ifdef SWIG +%ignore eos::lldp_tlv_type_t(eos::lldp_tlv_type_t &&) noexcept; +%ignore eos::lldp_tlv_type_t::operator=(eos::lldp_tlv_type_t &&) noexcept; +%ignore eos::lldp_std_tlv_type_t(eos::lldp_std_tlv_type_t &&) noexcept; +%ignore eos::lldp_std_tlv_type_t::operator=(eos::lldp_std_tlv_type_t &&) noexcept; +%ignore eos::lldp_syscap_t(eos::lldp_syscap_t &&) noexcept; +%ignore eos::lldp_syscap_t::operator=(eos::lldp_syscap_t &&) noexcept; +%ignore eos::lldp_management_address_t(eos::lldp_management_address_t &&) noexcept; +%ignore eos::lldp_management_address_t::operator=(eos::lldp_management_address_t &&) + noexcept; +%ignore eos::lldp_lacp_t(eos::lldp_lacp_t &&) noexcept; +%ignore eos::lldp_lacp_t::operator=(eos::lldp_lacp_t &&) noexcept; +%ignore eos::lldp_phy_t(eos::lldp_phy_t &&) noexcept; +%ignore eos::lldp_phy_t::operator=(eos::lldp_phy_t &&) noexcept; +%ignore eos::lldp_chassis_id_t(eos::lldp_chassis_id_t &&) noexcept; +%ignore eos::lldp_chassis_id_t::operator=(eos::lldp_chassis_id_t &&) noexcept; +%ignore eos::lldp_intf_id_t(eos::lldp_intf_id_t &&) noexcept; +%ignore eos::lldp_intf_id_t::operator=(eos::lldp_intf_id_t &&) noexcept; +%ignore eos::lldp_remote_system_t(eos::lldp_remote_system_t &&) noexcept; +%ignore eos::lldp_remote_system_t::operator=(eos::lldp_remote_system_t &&) noexcept; +%ignore eos::lldp_neighbor_t(eos::lldp_neighbor_t &&) noexcept; +%ignore eos::lldp_neighbor_t::operator=(eos::lldp_neighbor_t &&) noexcept; +#endif + namespace eos { class lldp_tlv_type_impl_t; @@ -24,6 +48,8 @@ class EOS_SDK_PUBLIC lldp_tlv_type_t { lldp_tlv_type_t& operator=( lldp_tlv_type_t const & other); + lldp_tlv_type_t(lldp_tlv_type_t && other) noexcept; + lldp_tlv_type_t & operator=(lldp_tlv_type_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -95,6 +121,8 @@ class EOS_SDK_PUBLIC lldp_std_tlv_type_t { lldp_std_tlv_type_t& operator=( lldp_std_tlv_type_t const & other); + lldp_std_tlv_type_t(lldp_std_tlv_type_t && other) noexcept; + lldp_std_tlv_type_t & operator=(lldp_std_tlv_type_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -168,6 +196,8 @@ class EOS_SDK_PUBLIC lldp_syscap_t { lldp_syscap_t& operator=( lldp_syscap_t const & other); + lldp_syscap_t(lldp_syscap_t && other) noexcept; + lldp_syscap_t & operator=(lldp_syscap_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -212,6 +242,9 @@ class EOS_SDK_PUBLIC lldp_management_address_t { lldp_management_address_t& operator=( lldp_management_address_t const & other); + lldp_management_address_t(lldp_management_address_t && other) noexcept; + lldp_management_address_t & operator=(lldp_management_address_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -273,6 +306,8 @@ class EOS_SDK_PUBLIC lldp_lacp_t { lldp_lacp_t& operator=( lldp_lacp_t const & other); + lldp_lacp_t(lldp_lacp_t && other) noexcept; + lldp_lacp_t & operator=(lldp_lacp_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -329,6 +364,8 @@ class EOS_SDK_PUBLIC lldp_phy_t { lldp_phy_t& operator=( lldp_phy_t const & other); + lldp_phy_t(lldp_phy_t && other) noexcept; + lldp_phy_t & operator=(lldp_phy_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -410,6 +447,8 @@ class EOS_SDK_PUBLIC lldp_chassis_id_t { lldp_chassis_id_t& operator=( lldp_chassis_id_t const & other); + lldp_chassis_id_t(lldp_chassis_id_t && other) noexcept; + lldp_chassis_id_t & operator=(lldp_chassis_id_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -473,6 +512,8 @@ class EOS_SDK_PUBLIC lldp_intf_id_t { lldp_intf_id_t& operator=( lldp_intf_id_t const & other); + lldp_intf_id_t(lldp_intf_id_t && other) noexcept; + lldp_intf_id_t & operator=(lldp_intf_id_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -517,6 +558,8 @@ class EOS_SDK_PUBLIC lldp_remote_system_t { lldp_remote_system_t& operator=( lldp_remote_system_t const & other); + lldp_remote_system_t(lldp_remote_system_t && other) noexcept; + lldp_remote_system_t & operator=(lldp_remote_system_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -569,6 +612,8 @@ class EOS_SDK_PUBLIC lldp_neighbor_t { lldp_neighbor_t& operator=( lldp_neighbor_t const & other); + lldp_neighbor_t(lldp_neighbor_t && other) noexcept; + lldp_neighbor_t & operator=(lldp_neighbor_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/mac_table.h b/eos/types/mac_table.h index ef12684..fadab0d 100644 --- a/eos/types/mac_table.h +++ b/eos/types/mac_table.h @@ -12,6 +12,16 @@ #include #include +#ifdef SWIG +%ignore eos::mac_key_t(eos::mac_key_t &&) noexcept; +%ignore eos::mac_key_t::operator=(eos::mac_key_t &&) noexcept; +%ignore eos::mac_entry_t(eos::mac_entry_t &&) noexcept; +%ignore eos::mac_entry_t::operator=(eos::mac_entry_t &&) noexcept; +%ignore eos::mac_entry_t::mac_key_is(eos::mac_key_t &&); +%ignore eos::mac_entry_t::intfs_is(std::set &&); +%ignore eos::intf_set(intf_id_t &&); +#endif + namespace eos { /** Types of MAC entries. */ @@ -68,6 +78,8 @@ class EOS_SDK_PUBLIC mac_key_t { mac_key_t& operator=( mac_key_t const & other); + mac_key_t(mac_key_t && other) noexcept; + mac_key_t & operator=(mac_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -127,6 +139,8 @@ class EOS_SDK_PUBLIC mac_entry_t { mac_entry_t& operator=( mac_entry_t const & other); + mac_entry_t(mac_entry_t && other) noexcept; + mac_entry_t & operator=(mac_entry_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -137,6 +151,8 @@ class EOS_SDK_PUBLIC mac_entry_t { mac_key_t mac_key() const; /** Setter for 'mac_key'. */ void mac_key_is(mac_key_t const & mac_key); + /** Moving Setter for 'mac_key'. */ + void mac_key_is(mac_key_t && mac_key); /** * Getter for 'intfs': the set of interfaces that this key forwards to. For @@ -147,8 +163,12 @@ class EOS_SDK_PUBLIC mac_entry_t { std::set const & intfs() const; /** Setter for 'intfs'. */ void intfs_is(std::set const & intfs); + /** Moving Setter for 'intfs'. */ + void intfs_is(std::set && intfs); /** Inserts one intf of 'value' to the set. */ void intf_set(intf_id_t const & value); + /** Inserts one intf of 'value' to the set. */ + void intf_set(intf_id_t && value); /** Deletes one intf of 'value' from the set. */ void intf_del(intf_id_t const & value); diff --git a/eos/types/mac_table_impl.h b/eos/types/mac_table_impl.h index 110af0f..bc40e38 100644 --- a/eos/types/mac_table_impl.h +++ b/eos/types/mac_table_impl.h @@ -75,6 +75,8 @@ class EOS_SDK_PUBLIC mac_entry_impl_t { mac_key_t mac_key() const; /** Setter for 'mac_key'. */ void mac_key_is(mac_key_t const & mac_key); + /** Moving Setter for 'mac_key'. */ + void mac_key_is(mac_key_t && mac_key); /** * Getter for 'intfs': the set of interfaces that this key forwards to. For @@ -85,8 +87,12 @@ class EOS_SDK_PUBLIC mac_entry_impl_t { std::set const & intfs() const; /** Setter for 'intfs'. */ void intfs_is(std::set const & intfs); + /** Moving Setter for 'intfs'. */ + void intfs_is(std::set && intfs); /** Inserts one intf of 'value' to the set. */ void intf_set(intf_id_t const & value); + /** Inserts one intf of 'value' to the set. */ + void intf_set(intf_id_t && value); /** Deletes one intf of 'value' from the set. */ void intf_del(intf_id_t const & value); diff --git a/eos/types/macsec.h b/eos/types/macsec.h index ae08873..7e5842a 100644 --- a/eos/types/macsec.h +++ b/eos/types/macsec.h @@ -13,6 +13,18 @@ #include #include +#ifdef SWIG +%ignore eos::macsec_key_t(eos::macsec_key_t &&) noexcept; +%ignore eos::macsec_key_t::operator=(eos::macsec_key_t &&) noexcept; +%ignore eos::macsec_profile_t(eos::macsec_profile_t &&) noexcept; +%ignore eos::macsec_profile_t::operator=(eos::macsec_profile_t &&) noexcept; +%ignore eos::macsec_intf_status_t(eos::macsec_intf_status_t &&) noexcept; +%ignore eos::macsec_intf_status_t::operator=(eos::macsec_intf_status_t &&) noexcept; +%ignore eos::macsec_intf_counters_t(eos::macsec_intf_counters_t &&) noexcept; +%ignore eos::macsec_intf_counters_t::operator=(eos::macsec_intf_counters_t &&) + noexcept; +#endif + namespace eos { typedef std::string macsec_profile_name_t; @@ -115,6 +127,8 @@ class EOS_SDK_PUBLIC macsec_key_t { macsec_key_t& operator=( macsec_key_t const & other); + macsec_key_t(macsec_key_t && other) noexcept; + macsec_key_t & operator=(macsec_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -171,6 +185,8 @@ class EOS_SDK_PUBLIC macsec_profile_t { macsec_profile_t& operator=( macsec_profile_t const & other); + macsec_profile_t(macsec_profile_t && other) noexcept; + macsec_profile_t & operator=(macsec_profile_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -317,6 +333,8 @@ class EOS_SDK_PUBLIC macsec_intf_status_t { macsec_intf_status_t& operator=( macsec_intf_status_t const & other); + macsec_intf_status_t(macsec_intf_status_t && other) noexcept; + macsec_intf_status_t & operator=(macsec_intf_status_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -370,6 +388,8 @@ class EOS_SDK_PUBLIC macsec_intf_counters_t { macsec_intf_counters_t& operator=( macsec_intf_counters_t const & other); + macsec_intf_counters_t(macsec_intf_counters_t && other) noexcept; + macsec_intf_counters_t & operator=(macsec_intf_counters_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/mpls_route.h b/eos/types/mpls_route.h index ceb7ffd..6c31f5c 100644 --- a/eos/types/mpls_route.h +++ b/eos/types/mpls_route.h @@ -13,6 +13,21 @@ #include #include +#ifdef SWIG +%ignore eos::mpls_route_key_t(eos::mpls_route_key_t &&) noexcept; +%ignore eos::mpls_route_key_t::operator=(eos::mpls_route_key_t &&) noexcept; +%ignore eos::mpls_route_key_t::labels_is(std::vector &&); +%ignore eos::label_set(uint32_t, eos::mpls_label_t &&); +%ignore eos::mpls_route_t(eos::mpls_route_t &&) noexcept; +%ignore eos::mpls_route_t::operator=(eos::mpls_route_t &&) noexcept; +%ignore eos::mpls_route_via_t(eos::mpls_route_via_t &&) noexcept; +%ignore eos::mpls_route_via_t::operator=(eos::mpls_route_via_t &&) noexcept; +%ignore eos::mpls_route_via_t::hop_is(eos::ip_addr_t &&); +%ignore eos::mpls_route_via_t::intf_is(intf_id_t &&); +%ignore eos::mpls_fec_id_t(eos::mpls_fec_id_t &&) noexcept; +%ignore eos::mpls_fec_id_t::operator=(eos::mpls_fec_id_t &&) noexcept; +#endif + namespace eos { /** 1..255; default/null is 0. */ @@ -43,6 +58,8 @@ class EOS_SDK_PUBLIC mpls_route_key_t { mpls_route_key_t& operator=( mpls_route_key_t const & other); + mpls_route_key_t(mpls_route_key_t && other) noexcept; + mpls_route_key_t & operator=(mpls_route_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -57,7 +74,10 @@ class EOS_SDK_PUBLIC mpls_route_key_t { std::vector const & labels() const; /** Setter for 'labels'. */ void labels_is(std::vector const & labels); + /** Moving Setter for 'labels'. */ + void labels_is(std::vector && labels); void label_set(uint32_t index, mpls_label_t const & value); + void label_set(uint32_t index, mpls_label_t && value); void label_del(uint32_t index); /** @@ -108,10 +128,14 @@ class EOS_SDK_PUBLIC mpls_route_t { mpls_route_t(); /** MPLS route constructor taking an MPLS route key. */ explicit mpls_route_t(mpls_route_key_t key); + /** MPLS route constructor taking an MPLS route key and a version. */ + explicit mpls_route_t(mpls_route_key_t key, uint32_t version_id); mpls_route_t(const mpls_route_t& other); mpls_route_t& operator=( mpls_route_t const & other); + mpls_route_t(mpls_route_t && other) noexcept; + mpls_route_t & operator=(mpls_route_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -123,6 +147,11 @@ class EOS_SDK_PUBLIC mpls_route_t { /** Setter for 'key'. */ void key_is(mpls_route_key_t key); + /** Getter for 'version_id': the MPLS route version. */ + uint32_t version_id() const; + /** Setter for 'version_id'. */ + void version_id_is(uint32_t version_id); + bool operator==(mpls_route_t const & other) const; bool operator!=(mpls_route_t const & other) const; /** The hash function for type mpls_route_t. */ @@ -156,6 +185,8 @@ class EOS_SDK_PUBLIC mpls_route_via_t { mpls_route_via_t& operator=( mpls_route_via_t const & other); + mpls_route_via_t(mpls_route_via_t && other) noexcept; + mpls_route_via_t & operator=(mpls_route_via_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -169,6 +200,8 @@ class EOS_SDK_PUBLIC mpls_route_via_t { ip_addr_t hop() const; /** Setter for 'hop'. */ void hop_is(ip_addr_t const & hop); + /** Moving Setter for 'hop'. */ + void hop_is(ip_addr_t && hop); /** * Getter for 'intf': sets the nexthop interface. @@ -177,6 +210,8 @@ class EOS_SDK_PUBLIC mpls_route_via_t { intf_id_t intf() const; /** Setter for 'intf'. */ void intf_is(intf_id_t const & intf); + /** Moving Setter for 'intf'. */ + void intf_is(intf_id_t && intf); /** Getter for 'pushswap_label': push or swap this label. */ mpls_label_t pushswap_label() const; @@ -249,6 +284,8 @@ class EOS_SDK_PUBLIC mpls_fec_id_t { mpls_fec_id_t& operator=( mpls_fec_id_t const & other); + mpls_fec_id_t(mpls_fec_id_t && other) noexcept; + mpls_fec_id_t & operator=(mpls_fec_id_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/mpls_route_impl.h b/eos/types/mpls_route_impl.h index ab94342..1b1d0a3 100644 --- a/eos/types/mpls_route_impl.h +++ b/eos/types/mpls_route_impl.h @@ -44,7 +44,10 @@ class EOS_SDK_PUBLIC mpls_route_key_impl_t { std::vector const & labels() const; /** Setter for 'labels'. */ void labels_is(std::vector const & labels); + /** Moving Setter for 'labels'. */ + void labels_is(std::vector && labels); void label_set(uint32_t index, mpls_label_t const & value); + void label_set(uint32_t index, mpls_label_t && value); void label_del(uint32_t index); /** @@ -93,12 +96,19 @@ class EOS_SDK_PUBLIC mpls_route_impl_t { mpls_route_impl_t(); /** MPLS route constructor taking an MPLS route key. */ explicit mpls_route_impl_t(mpls_route_key_t key); + /** MPLS route constructor taking an MPLS route key and a version. */ + explicit mpls_route_impl_t(mpls_route_key_t key, uint32_t version_id); /** Getter for 'key': the MPLS route key. */ mpls_route_key_t key() const; /** Setter for 'key'. */ void key_is(mpls_route_key_t key); + /** Getter for 'version_id': the MPLS route version. */ + uint32_t version_id() const; + /** Setter for 'version_id'. */ + void version_id_is(uint32_t version_id); + bool operator==(mpls_route_impl_t const & other) const; bool operator!=(mpls_route_impl_t const & other) const; /** The hash function for type mpls_route_t. */ @@ -115,6 +125,7 @@ class EOS_SDK_PUBLIC mpls_route_impl_t { private: mpls_route_key_t key_; + uint32_t version_id_; }; /** An MPLS route via, defining the action to take for a given MPLS route. */ @@ -132,6 +143,8 @@ class EOS_SDK_PUBLIC mpls_route_via_impl_t { ip_addr_t hop() const; /** Setter for 'hop'. */ void hop_is(ip_addr_t const & hop); + /** Moving Setter for 'hop'. */ + void hop_is(ip_addr_t && hop); /** * Getter for 'intf': sets the nexthop interface. @@ -140,6 +153,8 @@ class EOS_SDK_PUBLIC mpls_route_via_impl_t { intf_id_t intf() const; /** Setter for 'intf'. */ void intf_is(intf_id_t const & intf); + /** Moving Setter for 'intf'. */ + void intf_is(intf_id_t && intf); /** Getter for 'pushswap_label': push or swap this label. */ mpls_label_t pushswap_label() const; diff --git a/eos/types/mpls_vrf_label.h b/eos/types/mpls_vrf_label.h index 2f5c928..7a86a56 100644 --- a/eos/types/mpls_vrf_label.h +++ b/eos/types/mpls_vrf_label.h @@ -10,6 +10,11 @@ #include #include +#ifdef SWIG +%ignore eos::mpls_vrf_label_t(eos::mpls_vrf_label_t &&) noexcept; +%ignore eos::mpls_vrf_label_t::operator=(eos::mpls_vrf_label_t &&) noexcept; +#endif + namespace eos { class mpls_vrf_label_impl_t; @@ -22,6 +27,8 @@ class EOS_SDK_PUBLIC mpls_vrf_label_t { mpls_vrf_label_t& operator=( mpls_vrf_label_t const & other); + mpls_vrf_label_t(mpls_vrf_label_t && other) noexcept; + mpls_vrf_label_t & operator=(mpls_vrf_label_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/neighbor_table.h b/eos/types/neighbor_table.h index e67cb9f..1e7dddd 100644 --- a/eos/types/neighbor_table.h +++ b/eos/types/neighbor_table.h @@ -12,6 +12,13 @@ #include #include +#ifdef SWIG +%ignore eos::neighbor_key_t(eos::neighbor_key_t &&) noexcept; +%ignore eos::neighbor_key_t::operator=(eos::neighbor_key_t &&) noexcept; +%ignore eos::neighbor_entry_t(eos::neighbor_entry_t &&) noexcept; +%ignore eos::neighbor_entry_t::operator=(eos::neighbor_entry_t &&) noexcept; +#endif + namespace eos { /** Neighbor entry types. */ @@ -43,6 +50,8 @@ class EOS_SDK_PUBLIC neighbor_key_t { neighbor_key_t& operator=( neighbor_key_t const & other); + neighbor_key_t(neighbor_key_t && other) noexcept; + neighbor_key_t & operator=(neighbor_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -88,6 +97,8 @@ class EOS_SDK_PUBLIC neighbor_entry_t { neighbor_entry_t& operator=( neighbor_entry_t const & other); + neighbor_entry_t(neighbor_entry_t && other) noexcept; + neighbor_entry_t & operator=(neighbor_entry_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/nexthop_group.h b/eos/types/nexthop_group.h index 23eb20c..5443fe7 100644 --- a/eos/types/nexthop_group.h +++ b/eos/types/nexthop_group.h @@ -13,6 +13,42 @@ #include #include +#ifdef SWIG +%ignore eos::nexthop_group_mpls_action_t(eos::nexthop_group_mpls_action_t &&) + noexcept; +%ignore eos::nexthop_group_mpls_action_t::operator=( + eos::nexthop_group_mpls_action_t &&) noexcept; +%ignore eos::nexthop_group_mpls_action_t::label_stack_is( + std::forward_list &&); +%ignore eos::label_stack_set(eos::mpls_label_t &&); +%ignore eos::nexthop_group_entry_counter_t(eos::nexthop_group_entry_counter_t &&) + noexcept; +%ignore eos::nexthop_group_entry_counter_t::operator=( + eos::nexthop_group_entry_counter_t &&) noexcept; +%ignore eos::nexthop_group_entry_t(eos::nexthop_group_entry_t &&) noexcept; +%ignore eos::nexthop_group_entry_t::operator=(eos::nexthop_group_entry_t &&) + noexcept; +%ignore eos::nexthop_group_entry_t::mpls_action_is( + eos::nexthop_group_mpls_action_t &&); +%ignore eos::nexthop_group_entry_t::nexthop_is(eos::ip_addr_t &&); +%ignore eos::nexthop_group_entry_t::intf_is(intf_id_t &&); +%ignore eos::nexthop_group_entry_t::sbfd_session_key_is( + eos::sbfd_echo_session_key_t &&); +%ignore eos::nexthop_group_entry_t::child_nexthop_group_is(std::string &&); +%ignore eos::nexthop_group_t(eos::nexthop_group_t &&) noexcept; +%ignore eos::nexthop_group_t::operator=(eos::nexthop_group_t &&) noexcept; +%ignore eos::nexthop_group_t::source_ip_is(eos::ip_addr_t &&); +%ignore eos::nexthop_group_t::nexthops_is( + std::map &&); +%ignore eos::nexthop_group_t::backup_nexthops_is( + std::map &&); +%ignore eos::nexthop_group_t::destination_ips_is(std::map &&); +%ignore eos::nexthop_group_programmed_status_t( + eos::nexthop_group_programmed_status_t &&) noexcept; +%ignore eos::nexthop_group_programmed_status_t::operator=( + eos::nexthop_group_programmed_status_t &&) noexcept; +#endif + namespace eos { /** @@ -79,6 +115,9 @@ class EOS_SDK_PUBLIC nexthop_group_mpls_action_t { nexthop_group_mpls_action_t& operator=( nexthop_group_mpls_action_t const & other); + nexthop_group_mpls_action_t(nexthop_group_mpls_action_t && other) noexcept; + nexthop_group_mpls_action_t & operator=(nexthop_group_mpls_action_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -102,8 +141,12 @@ class EOS_SDK_PUBLIC nexthop_group_mpls_action_t { std::forward_list const & label_stack() const; /** Setter for 'label_stack'. */ void label_stack_is(std::forward_list const & label_stack); + /** Moving Setter for 'label_stack'. */ + void label_stack_is(std::forward_list && label_stack); /** Prepend one label_stack to the list. */ void label_stack_set(mpls_label_t const & label_stack); + /** Prepend one label_stack to the list. */ + void label_stack_set(mpls_label_t && label_stack); /** Remove all matching label_stack elements. */ void label_stack_del(mpls_label_t const & label_stack); @@ -140,6 +183,9 @@ class EOS_SDK_PUBLIC nexthop_group_entry_counter_t { nexthop_group_entry_counter_t& operator=( nexthop_group_entry_counter_t const & other); + nexthop_group_entry_counter_t(nexthop_group_entry_counter_t && other) noexcept; + nexthop_group_entry_counter_t & operator=(nexthop_group_entry_counter_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -193,6 +239,8 @@ class EOS_SDK_PUBLIC nexthop_group_entry_t { nexthop_group_entry_t& operator=( nexthop_group_entry_t const & other); + nexthop_group_entry_t(nexthop_group_entry_t && other) noexcept; + nexthop_group_entry_t & operator=(nexthop_group_entry_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -203,26 +251,36 @@ class EOS_SDK_PUBLIC nexthop_group_entry_t { nexthop_group_mpls_action_t mpls_action() const; /** Setter for 'mpls_action'. */ void mpls_action_is(nexthop_group_mpls_action_t const & mpls_action); + /** Moving Setter for 'mpls_action'. */ + void mpls_action_is(nexthop_group_mpls_action_t && mpls_action); /** Getter for 'nexthop': the next hop IP address for this entry. */ ip_addr_t nexthop() const; /** Setter for 'nexthop'. */ void nexthop_is(ip_addr_t const & nexthop); + /** Moving Setter for 'nexthop'. */ + void nexthop_is(ip_addr_t && nexthop); /** Getter for 'intf': the next hop egress interface. */ intf_id_t intf() const; /** Setter for 'intf'. */ void intf_is(intf_id_t const & intf); + /** Moving Setter for 'intf'. */ + void intf_is(intf_id_t && intf); /** Getter for 'sbfd_session_key': the optional key to an sBFD session. */ sbfd_echo_session_key_t sbfd_session_key() const; /** Setter for 'sbfd_session_key'. */ void sbfd_session_key_is(sbfd_echo_session_key_t const & sbfd_session_key); + /** Moving Setter for 'sbfd_session_key'. */ + void sbfd_session_key_is(sbfd_echo_session_key_t && sbfd_session_key); /** Getter for 'child_nexthop_group': the name of next level nexthop-group. */ std::string child_nexthop_group() const; /** Setter for 'child_nexthop_group'. */ void child_nexthop_group_is(std::string const & child_nexthop_group); + /** Moving Setter for 'child_nexthop_group'. */ + void child_nexthop_group_is(std::string && child_nexthop_group); bool operator==(nexthop_group_entry_t const & other) const; bool operator!=(nexthop_group_entry_t const & other) const; @@ -267,6 +325,8 @@ class EOS_SDK_PUBLIC nexthop_group_t { nexthop_group_t& operator=( nexthop_group_t const & other); + nexthop_group_t(nexthop_group_t && other) noexcept; + nexthop_group_t & operator=(nexthop_group_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -291,6 +351,8 @@ class EOS_SDK_PUBLIC nexthop_group_t { ip_addr_t source_ip() const; /** Setter for 'source_ip'. */ void source_ip_is(ip_addr_t const & source_ip); + /** Moving Setter for 'source_ip'. */ + void source_ip_is(ip_addr_t && source_ip); /** Getter for 'source_intf': the source interface to use. */ intf_id_t source_intf() const; @@ -321,8 +383,12 @@ class EOS_SDK_PUBLIC nexthop_group_t { std::map const & nexthops() const; /** Setter for 'nexthops'. */ void nexthops_is(std::map const & nexthops); + /** Moving Setter for 'nexthops'. */ + void nexthops_is(std::map && nexthops); /** Inserts key/value pair to the map. */ void nexthop_set(uint16_t key, nexthop_group_entry_t const & value); + /** Inserts key/value pair to the map. */ + void nexthop_set(uint16_t key, nexthop_group_entry_t && value); /** Deletes the key/value pair from the map. */ void nexthop_del(uint16_t key); @@ -333,8 +399,13 @@ class EOS_SDK_PUBLIC nexthop_group_t { /** Setter for 'backup_nexthops'. */ void backup_nexthops_is( std::map const & backup_nexthops); + /** Moving Setter for 'backup_nexthops'. */ + void backup_nexthops_is( + std::map && backup_nexthops); /** Inserts key/value pair to the map. */ void backup_nexthop_set(uint16_t key, nexthop_group_entry_t const & value); + /** Inserts key/value pair to the map. */ + void backup_nexthop_set(uint16_t key, nexthop_group_entry_t && value); /** Deletes the key/value pair from the map. */ void backup_nexthop_del(uint16_t key); @@ -345,8 +416,12 @@ class EOS_SDK_PUBLIC nexthop_group_t { std::map const & destination_ips() const; /** Setter for 'destination_ips'. */ void destination_ips_is(std::map const & destination_ips); + /** Moving Setter for 'destination_ips'. */ + void destination_ips_is(std::map && destination_ips); /** Inserts key/value pair to the map. */ void destination_ip_set(uint16_t key, ip_addr_t const & value); + /** Inserts key/value pair to the map. */ + void destination_ip_set(uint16_t key, ip_addr_t && value); /** Deletes the key/value pair from the map. */ void destination_ip_del(uint16_t key); @@ -432,12 +507,12 @@ enum nexthop_group_counter_state_t { * At least one nexthop group entry counter has failed to * be programmed in hardware. */ - NEXTHOP_GROUP_COUNTER_PROGRAMMING_FAILED, + NEXTHOP_GROUP_COUNTER_PROGRAMMING_FAILED = 1, /** * All nexthop group entry counters have been successfully * programmed in hardware. */ - NEXTHOP_GROUP_COUNTER_PROGRAMMING_COMPLETE, + NEXTHOP_GROUP_COUNTER_PROGRAMMING_COMPLETE = 2, }; /** * Appends a string representation of enum nexthop_group_counter_state_t value to @@ -446,17 +521,48 @@ enum nexthop_group_counter_state_t { EOS_SDK_PUBLIC std::ostream& operator<<( std::ostream& os, const nexthop_group_counter_state_t & enum_val); +/** + * The current vias hardware programmed state for a nexthop group. + * + * Programmed HW State is a summary of the entire nexthop group and + * will not note which specific entry is in the provided state. + */ +enum nexthop_group_programmed_hw_state_t { + /** All nexthop group entries are not programmed in hardware. */ + NEXTHOP_GROUP_HW_DROP, + /** + * At least one nexthop group entry is programmed in + * hardware. + */ + NEXTHOP_GROUP_HW_PARTIALLY_PROGRAMMED = 1, + /** + * All nexthop group entries are programmed in + * hardware. + */ + NEXTHOP_GROUP_HW_ALL_PROGRAMMED = 2, +}; +/** + * Appends a string representation of enum nexthop_group_programmed_hw_state_t + * value to the ostream. + */ +EOS_SDK_PUBLIC std::ostream& operator<<( + std::ostream& os, const nexthop_group_programmed_hw_state_t & enum_val); + class nexthop_group_programmed_status_impl_t; /** Status for the associated nexthop group. */ class EOS_SDK_PUBLIC nexthop_group_programmed_status_t { public: nexthop_group_programmed_status_t(); - explicit nexthop_group_programmed_status_t( - nexthop_group_counter_state_t counter_state); + nexthop_group_programmed_status_t(nexthop_group_counter_state_t counter_state, + nexthop_group_programmed_hw_state_t hw_state); nexthop_group_programmed_status_t(const nexthop_group_programmed_status_t& other); nexthop_group_programmed_status_t& operator=( nexthop_group_programmed_status_t const & other); + nexthop_group_programmed_status_t(nexthop_group_programmed_status_t && other) + noexcept; + nexthop_group_programmed_status_t & operator=( + nexthop_group_programmed_status_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -469,6 +575,12 @@ class EOS_SDK_PUBLIC nexthop_group_programmed_status_t { */ nexthop_group_counter_state_t counter_state() const; + /** + * Getter for 'hw_state': The status of the hardware programmed entries for this + * nexthop group. + */ + nexthop_group_programmed_hw_state_t hw_state() const; + bool operator==(nexthop_group_programmed_status_t const & other) const; bool operator!=(nexthop_group_programmed_status_t const & other) const; bool operator<(nexthop_group_programmed_status_t const & other) const; diff --git a/eos/types/nexthop_group_impl.h b/eos/types/nexthop_group_impl.h index fa2bded..1f574a3 100644 --- a/eos/types/nexthop_group_impl.h +++ b/eos/types/nexthop_group_impl.h @@ -49,8 +49,12 @@ class EOS_SDK_PUBLIC nexthop_group_mpls_action_impl_t { std::forward_list const & label_stack() const; /** Setter for 'label_stack'. */ void label_stack_is(std::forward_list const & label_stack); + /** Moving Setter for 'label_stack'. */ + void label_stack_is(std::forward_list && label_stack); /** Prepend one label_stack to the list. */ void label_stack_set(mpls_label_t const & label_stack); + /** Prepend one label_stack to the list. */ + void label_stack_set(mpls_label_t && label_stack); /** Remove all matching label_stack elements. */ void label_stack_del(mpls_label_t const & label_stack); @@ -126,26 +130,36 @@ class EOS_SDK_PUBLIC nexthop_group_entry_impl_t { nexthop_group_mpls_action_t mpls_action() const; /** Setter for 'mpls_action'. */ void mpls_action_is(nexthop_group_mpls_action_t const & mpls_action); + /** Moving Setter for 'mpls_action'. */ + void mpls_action_is(nexthop_group_mpls_action_t && mpls_action); /** Getter for 'nexthop': the next hop IP address for this entry. */ ip_addr_t nexthop() const; /** Setter for 'nexthop'. */ void nexthop_is(ip_addr_t const & nexthop); + /** Moving Setter for 'nexthop'. */ + void nexthop_is(ip_addr_t && nexthop); /** Getter for 'intf': the next hop egress interface. */ intf_id_t intf() const; /** Setter for 'intf'. */ void intf_is(intf_id_t const & intf); + /** Moving Setter for 'intf'. */ + void intf_is(intf_id_t && intf); /** Getter for 'sbfd_session_key': the optional key to an sBFD session. */ sbfd_echo_session_key_t sbfd_session_key() const; /** Setter for 'sbfd_session_key'. */ void sbfd_session_key_is(sbfd_echo_session_key_t const & sbfd_session_key); + /** Moving Setter for 'sbfd_session_key'. */ + void sbfd_session_key_is(sbfd_echo_session_key_t && sbfd_session_key); /** Getter for 'child_nexthop_group': the name of next level nexthop-group. */ std::string child_nexthop_group() const; /** Setter for 'child_nexthop_group'. */ void child_nexthop_group_is(std::string const & child_nexthop_group); + /** Moving Setter for 'child_nexthop_group'. */ + void child_nexthop_group_is(std::string && child_nexthop_group); bool operator==(nexthop_group_entry_impl_t const & other) const; bool operator!=(nexthop_group_entry_impl_t const & other) const; @@ -205,6 +219,8 @@ class EOS_SDK_PUBLIC nexthop_group_impl_t { ip_addr_t source_ip() const; /** Setter for 'source_ip'. */ void source_ip_is(ip_addr_t const & source_ip); + /** Moving Setter for 'source_ip'. */ + void source_ip_is(ip_addr_t && source_ip); /** Getter for 'source_intf': the source interface to use. */ intf_id_t source_intf() const; @@ -235,8 +251,12 @@ class EOS_SDK_PUBLIC nexthop_group_impl_t { std::map const & nexthops() const; /** Setter for 'nexthops'. */ void nexthops_is(std::map const & nexthops); + /** Moving Setter for 'nexthops'. */ + void nexthops_is(std::map && nexthops); /** Inserts key/value pair to the map. */ void nexthop_set(uint16_t key, nexthop_group_entry_t const & value); + /** Inserts key/value pair to the map. */ + void nexthop_set(uint16_t key, nexthop_group_entry_t && value); /** Deletes the key/value pair from the map. */ void nexthop_del(uint16_t key); @@ -247,8 +267,13 @@ class EOS_SDK_PUBLIC nexthop_group_impl_t { /** Setter for 'backup_nexthops'. */ void backup_nexthops_is( std::map const & backup_nexthops); + /** Moving Setter for 'backup_nexthops'. */ + void backup_nexthops_is( + std::map && backup_nexthops); /** Inserts key/value pair to the map. */ void backup_nexthop_set(uint16_t key, nexthop_group_entry_t const & value); + /** Inserts key/value pair to the map. */ + void backup_nexthop_set(uint16_t key, nexthop_group_entry_t && value); /** Deletes the key/value pair from the map. */ void backup_nexthop_del(uint16_t key); @@ -259,8 +284,12 @@ class EOS_SDK_PUBLIC nexthop_group_impl_t { std::map const & destination_ips() const; /** Setter for 'destination_ips'. */ void destination_ips_is(std::map const & destination_ips); + /** Moving Setter for 'destination_ips'. */ + void destination_ips_is(std::map && destination_ips); /** Inserts key/value pair to the map. */ void destination_ip_set(uint16_t key, ip_addr_t const & value); + /** Inserts key/value pair to the map. */ + void destination_ip_set(uint16_t key, ip_addr_t && value); /** Deletes the key/value pair from the map. */ void destination_ip_del(uint16_t key); @@ -348,8 +377,9 @@ class EOS_SDK_PUBLIC nexthop_group_impl_t { class EOS_SDK_PUBLIC nexthop_group_programmed_status_impl_t { public: nexthop_group_programmed_status_impl_t(); - explicit nexthop_group_programmed_status_impl_t( - nexthop_group_counter_state_t counter_state); + nexthop_group_programmed_status_impl_t( + nexthop_group_counter_state_t counter_state, + nexthop_group_programmed_hw_state_t hw_state); /** * Getter for 'counter_state': The status of the counter programming for this @@ -357,6 +387,12 @@ class EOS_SDK_PUBLIC nexthop_group_programmed_status_impl_t { */ nexthop_group_counter_state_t counter_state() const; + /** + * Getter for 'hw_state': The status of the hardware programmed entries for this + * nexthop group. + */ + nexthop_group_programmed_hw_state_t hw_state() const; + bool operator==(nexthop_group_programmed_status_impl_t const & other) const; bool operator!=(nexthop_group_programmed_status_impl_t const & other) const; bool operator<(nexthop_group_programmed_status_impl_t const & other) const; @@ -375,6 +411,7 @@ class EOS_SDK_PUBLIC nexthop_group_programmed_status_impl_t { private: nexthop_group_counter_state_t counter_state_; + nexthop_group_programmed_hw_state_t hw_state_; }; } diff --git a/eos/types/nexthop_group_tunnel.h b/eos/types/nexthop_group_tunnel.h index 66cb1bf..95eb91e 100644 --- a/eos/types/nexthop_group_tunnel.h +++ b/eos/types/nexthop_group_tunnel.h @@ -11,6 +11,14 @@ #include #include +#ifdef SWIG +%ignore eos::nexthop_group_tunnel_t(eos::nexthop_group_tunnel_t &&) noexcept; +%ignore eos::nexthop_group_tunnel_t::operator=(eos::nexthop_group_tunnel_t &&) + noexcept; +%ignore eos::nexthop_group_tunnel_t::tunnel_endpoint_is(eos::ip_prefix_t &&); +%ignore eos::nexthop_group_tunnel_t::nhg_name_is(std::string &&); +#endif + namespace eos { class nexthop_group_tunnel_impl_t; @@ -34,6 +42,8 @@ class EOS_SDK_PUBLIC nexthop_group_tunnel_t { nexthop_group_tunnel_t& operator=( nexthop_group_tunnel_t const & other); + nexthop_group_tunnel_t(nexthop_group_tunnel_t && other) noexcept; + nexthop_group_tunnel_t & operator=(nexthop_group_tunnel_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -44,11 +54,15 @@ class EOS_SDK_PUBLIC nexthop_group_tunnel_t { ip_prefix_t tunnel_endpoint() const; /** Setter for 'tunnel_endpoint'. */ void tunnel_endpoint_is(ip_prefix_t const & tunnel_endpoint); + /** Moving Setter for 'tunnel_endpoint'. */ + void tunnel_endpoint_is(ip_prefix_t && tunnel_endpoint); /** Getter for 'nhg_name': nexthop group name. */ std::string nhg_name() const; /** Setter for 'nhg_name'. */ void nhg_name_is(std::string const & nhg_name); + /** Moving Setter for 'nhg_name'. */ + void nhg_name_is(std::string && nhg_name); /** Getter for 'igp_pref': the IGP preference of the tunnel endpoint. */ uint8_t igp_pref() const; diff --git a/eos/types/nexthop_group_tunnel_impl.h b/eos/types/nexthop_group_tunnel_impl.h index e767670..3f0564a 100644 --- a/eos/types/nexthop_group_tunnel_impl.h +++ b/eos/types/nexthop_group_tunnel_impl.h @@ -34,11 +34,15 @@ class EOS_SDK_PUBLIC nexthop_group_tunnel_impl_t { ip_prefix_t tunnel_endpoint() const; /** Setter for 'tunnel_endpoint'. */ void tunnel_endpoint_is(ip_prefix_t const & tunnel_endpoint); + /** Moving Setter for 'tunnel_endpoint'. */ + void tunnel_endpoint_is(ip_prefix_t && tunnel_endpoint); /** Getter for 'nhg_name': nexthop group name. */ std::string nhg_name() const; /** Setter for 'nhg_name'. */ void nhg_name_is(std::string const & nhg_name); + /** Moving Setter for 'nhg_name'. */ + void nhg_name_is(std::string && nhg_name); /** Getter for 'igp_pref': the IGP preference of the tunnel endpoint. */ uint8_t igp_pref() const; diff --git a/eos/types/policy_map.h b/eos/types/policy_map.h index 7f7a26b..72386cf 100644 --- a/eos/types/policy_map.h +++ b/eos/types/policy_map.h @@ -16,6 +16,79 @@ #include #include +#ifdef SWIG +%ignore eos::policy_map_key_t(eos::policy_map_key_t &&) noexcept; +%ignore eos::policy_map_key_t::operator=(eos::policy_map_key_t &&) noexcept; +%ignore eos::policy_map_key_t::name_is(std::string &&); +%ignore eos::policy_map_action_t(eos::policy_map_action_t &&) noexcept; +%ignore eos::policy_map_action_t::operator=(eos::policy_map_action_t &&) noexcept; +%ignore eos::policy_map_action_t::nexthop_group_name_is(std::string &&); +%ignore eos::policy_map_action_t::nexthops_is( + std::unordered_set &&); +%ignore eos::nexthop_set(eos::ip_addr_t &&); +%ignore eos::policy_map_action_t::vrf_is(std::string &&); +%ignore eos::traffic_policy_action_t(eos::traffic_policy_action_t &&) noexcept; +%ignore eos::traffic_policy_action_t::operator=(eos::traffic_policy_action_t &&) + noexcept; +%ignore eos::traffic_policy_action_t::counter_name_is(std::string &&); +%ignore eos::traffic_policy_action_t::goto_class_name_is(std::string &&); +%ignore eos::traffic_policy_action_t::goto_next_is(bool &&); +%ignore eos::traffic_policy_action_t::vrf_is(std::string &&); +%ignore eos::traffic_policy_action_t::mirror_session_is(std::string &&); +%ignore eos::traffic_policy_action_t::police_rate_is(uint64_t &&); +%ignore eos::traffic_policy_action_t::police_burst_size_is(uint64_t &&); +%ignore eos::traffic_policy_action_t::police_rate_unit_is( + eos::police_rate_unit_t &&); +%ignore eos::traffic_policy_action_t::police_burst_unit_is( + eos::police_burst_unit_t &&); +%ignore eos::traffic_policy_action_t::nexthop_groups_is( + std::unordered_set &&); +%ignore eos::nexthop_group_set(std::string &&); +%ignore eos::traffic_policy_action_t::nexthops_is( + std::unordered_set &&); +%ignore eos::nexthop_set(eos::ip_addr_t &&); +%ignore eos::policy_map_rule_t(eos::policy_map_rule_t &&) noexcept; +%ignore eos::policy_map_rule_t::operator=(eos::policy_map_rule_t &&) noexcept; +%ignore eos::policy_map_rule_t::class_map_key_is(eos::class_map_key_t &&); +%ignore eos::policy_map_rule_t::actions_is(std::set &&); +%ignore eos::action_set(eos::policy_map_action_t &&); +%ignore eos::policy_map_t(eos::policy_map_t &&) noexcept; +%ignore eos::policy_map_t::operator=(eos::policy_map_t &&) noexcept; +%ignore eos::policy_map_t::key_is(eos::policy_map_key_t &&); +%ignore eos::policy_map_t::rules_is(std::map &&); +%ignore eos::traffic_policy_rule_t(eos::traffic_policy_rule_t &&) noexcept; +%ignore eos::traffic_policy_rule_t::operator=(eos::traffic_policy_rule_t &&) + noexcept; +%ignore eos::traffic_policy_rule_t::actions_is( + std::set &&); +%ignore eos::action_set(eos::traffic_policy_action_t &&); +%ignore eos::traffic_policy_t(eos::traffic_policy_t &&) noexcept; +%ignore eos::traffic_policy_t::operator=(eos::traffic_policy_t &&) noexcept; +%ignore eos::traffic_policy_t::named_counters_is( + std::unordered_set &&); +%ignore eos::named_counter_set(std::string &&); +%ignore eos::traffic_policy_counter_data_t(eos::traffic_policy_counter_data_t &&) + noexcept; +%ignore eos::traffic_policy_counter_data_t::operator=( + eos::traffic_policy_counter_data_t &&) noexcept; +%ignore eos::traffic_policy_counter_t(eos::traffic_policy_counter_t &&) noexcept; +%ignore eos::traffic_policy_counter_t::operator=(eos::traffic_policy_counter_t &&) + noexcept; +%ignore eos::traffic_policy_counter_t::named_counter_data_is( + std::map &&); +%ignore eos::traffic_policy_counter_t::class_counter_data_is( + std::map &&); +%ignore eos::policy_map_hw_status_key_t(eos::policy_map_hw_status_key_t &&) + noexcept; +%ignore eos::policy_map_hw_status_key_t::operator=( + eos::policy_map_hw_status_key_t &&) noexcept; +%ignore eos::policy_map_hw_statuses_t(eos::policy_map_hw_statuses_t &&) noexcept; +%ignore eos::policy_map_hw_statuses_t::operator=(eos::policy_map_hw_statuses_t &&) + noexcept; +%ignore eos::policy_map_hw_statuses_t::intf_statuses_is( + std::map &&); +#endif + namespace eos { @@ -147,6 +220,8 @@ class EOS_SDK_PUBLIC policy_map_key_t { policy_map_key_t& operator=( policy_map_key_t const & other); + policy_map_key_t(policy_map_key_t && other) noexcept; + policy_map_key_t & operator=(policy_map_key_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -155,6 +230,7 @@ class EOS_SDK_PUBLIC policy_map_key_t { std::string name() const; void name_is(std::string const & name); + void name_is(std::string && name); policy_feature_t feature() const; void feature_is(policy_feature_t feature); @@ -233,6 +309,8 @@ class EOS_SDK_PUBLIC policy_map_action_t { policy_map_action_t& operator=( policy_map_action_t const & other); + policy_map_action_t(policy_map_action_t && other) noexcept; + policy_map_action_t & operator=(policy_map_action_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -253,11 +331,16 @@ class EOS_SDK_PUBLIC policy_map_action_t { std::string nexthop_group_name() const; /** Setter for 'nexthop_group_name'. */ void nexthop_group_name_is(std::string const & nexthop_group_name); + /** Moving Setter for 'nexthop_group_name'. */ + void nexthop_group_name_is(std::string && nexthop_group_name); std::unordered_set const & nexthops() const; void nexthops_is(std::unordered_set const & nexthops); + void nexthops_is(std::unordered_set && nexthops); /** Inserts one nexthop of 'value' to the set. */ void nexthop_set(ip_addr_t const & value); + /** Inserts one nexthop of 'value' to the set. */ + void nexthop_set(ip_addr_t && value); /** Deletes one nexthop of 'value' from the set. */ void nexthop_del(ip_addr_t const & value); @@ -265,6 +348,8 @@ class EOS_SDK_PUBLIC policy_map_action_t { std::string vrf() const; /** Setter for 'vrf'. */ void vrf_is(std::string const & vrf); + /** Moving Setter for 'vrf'. */ + void vrf_is(std::string && vrf); /** * Getter for 'dscp': the DiffServ Code Point on matching IPv4/IPv6 packets. @@ -334,6 +419,8 @@ class EOS_SDK_PUBLIC traffic_policy_action_t { traffic_policy_action_t& operator=( traffic_policy_action_t const & other); + traffic_policy_action_t(traffic_policy_action_t && other) noexcept; + traffic_policy_action_t & operator=(traffic_policy_action_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -348,16 +435,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_t { std::string counter_name() const; /** Setter for 'counter_name'. */ void counter_name_is(std::string const & counter_name); + /** Moving Setter for 'counter_name'. */ + void counter_name_is(std::string && counter_name); /** Getter for 'goto_class_name': the name of class for goto action. */ std::string goto_class_name() const; /** Setter for 'goto_class_name'. */ void goto_class_name_is(std::string const & goto_class_name); + /** Moving Setter for 'goto_class_name'. */ + void goto_class_name_is(std::string && goto_class_name); /** Getter for 'goto_next': the flag indicating if it is goto next action. */ bool goto_next() const; /** Setter for 'goto_next'. */ void goto_next_is(bool const & goto_next); + /** Moving Setter for 'goto_next'. */ + void goto_next_is(bool && goto_next); /** * Getter for 'dscp': the DiffServ Code Point on matching IPv4/IPv6 packets. @@ -384,16 +477,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_t { std::string vrf() const; /** Setter for 'vrf'. */ void vrf_is(std::string const & vrf); + /** Moving Setter for 'vrf'. */ + void vrf_is(std::string && vrf); /** Getter for 'mirror_session': the name of mirror session for mirror action. */ std::string mirror_session() const; /** Setter for 'mirror_session'. */ void mirror_session_is(std::string const & mirror_session); + /** Moving Setter for 'mirror_session'. */ + void mirror_session_is(std::string && mirror_session); /** Getter for 'police_rate': the police rate value for police action. */ uint64_t police_rate() const; /** Setter for 'police_rate'. */ void police_rate_is(uint64_t const & police_rate); + /** Moving Setter for 'police_rate'. */ + void police_rate_is(uint64_t && police_rate); /** * Getter for 'police_burst_size': the police burst size value for police @@ -402,16 +501,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_t { uint64_t police_burst_size() const; /** Setter for 'police_burst_size'. */ void police_burst_size_is(uint64_t const & police_burst_size); + /** Moving Setter for 'police_burst_size'. */ + void police_burst_size_is(uint64_t && police_burst_size); /** Getter for 'police_rate_unit': the police rate unit for police action. */ police_rate_unit_t police_rate_unit() const; /** Setter for 'police_rate_unit'. */ void police_rate_unit_is(police_rate_unit_t const & police_rate_unit); + /** Moving Setter for 'police_rate_unit'. */ + void police_rate_unit_is(police_rate_unit_t && police_rate_unit); /** Getter for 'police_burst_unit': the police burst unit for police action. */ police_burst_unit_t police_burst_unit() const; /** Setter for 'police_burst_unit'. */ void police_burst_unit_is(police_burst_unit_t const & police_burst_unit); + /** Moving Setter for 'police_burst_unit'. */ + void police_burst_unit_is(police_burst_unit_t && police_burst_unit); /** * Getter for 'nexthop_groups': the set of nexthop group names for traffic- @@ -420,15 +525,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_t { std::unordered_set const & nexthop_groups() const; /** Setter for 'nexthop_groups'. */ void nexthop_groups_is(std::unordered_set const & nexthop_groups); + /** Moving Setter for 'nexthop_groups'. */ + void nexthop_groups_is(std::unordered_set && nexthop_groups); /** Inserts one nexthop_group of 'value' to the set. */ void nexthop_group_set(std::string const & value); + /** Inserts one nexthop_group of 'value' to the set. */ + void nexthop_group_set(std::string && value); /** Deletes one nexthop_group of 'value' from the set. */ void nexthop_group_del(std::string const & value); std::unordered_set const & nexthops() const; void nexthops_is(std::unordered_set const & nexthops); + void nexthops_is(std::unordered_set && nexthops); /** Inserts one nexthop of 'value' to the set. */ void nexthop_set(ip_addr_t const & value); + /** Inserts one nexthop of 'value' to the set. */ + void nexthop_set(ip_addr_t && value); /** Deletes one nexthop of 'value' from the set. */ void nexthop_del(ip_addr_t const & value); @@ -480,6 +592,8 @@ class EOS_SDK_PUBLIC policy_map_rule_t { policy_map_rule_t& operator=( policy_map_rule_t const & other); + policy_map_rule_t(policy_map_rule_t && other) noexcept; + policy_map_rule_t & operator=(policy_map_rule_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -493,6 +607,8 @@ class EOS_SDK_PUBLIC policy_map_rule_t { class_map_key_t class_map_key() const; /** Setter for 'class_map_key'. */ void class_map_key_is(class_map_key_t const & class_map_key); + /** Moving Setter for 'class_map_key'. */ + void class_map_key_is(class_map_key_t && class_map_key); /** * Getter for 'policy_map_rule_type': the rule type. Set the rule type to @@ -516,8 +632,12 @@ class EOS_SDK_PUBLIC policy_map_rule_t { std::set const & actions() const; /** Setter for 'actions'. */ void actions_is(std::set const & actions); + /** Moving Setter for 'actions'. */ + void actions_is(std::set && actions); /** Inserts one action of 'value' to the set. */ void action_set(policy_map_action_t const & value); + /** Inserts one action of 'value' to the set. */ + void action_set(policy_map_action_t && value); /** Deletes one action of 'value' from the set. */ void action_del(policy_map_action_t const & value); @@ -560,6 +680,8 @@ class EOS_SDK_PUBLIC policy_map_t { policy_map_t& operator=( policy_map_t const & other); + policy_map_t(policy_map_t && other) noexcept; + policy_map_t & operator=(policy_map_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -568,12 +690,18 @@ class EOS_SDK_PUBLIC policy_map_t { policy_map_key_t key() const; void key_is(policy_map_key_t const & key); + void key_is(policy_map_key_t && key); std::map const & rules() const; - void rules_is(std::map const & rules); + void rules_is(std::map && rules); + /** Inserts key/value pair to the map. */ void rule_set(uint32_t key, policy_map_rule_t const & value); + /** Inserts key/value pair to the map. */ + void rule_set(uint32_t key, policy_map_rule_t && value); + /** Deletes the key/value pair from the map. */ void rule_del(uint32_t key); + bool operator==(policy_map_t const & other) const; bool operator!=(policy_map_t const & other) const; bool operator<(policy_map_t const & other) const; @@ -616,6 +744,8 @@ class EOS_SDK_PUBLIC traffic_policy_rule_t { traffic_policy_rule_t& operator=( traffic_policy_rule_t const & other); + traffic_policy_rule_t(traffic_policy_rule_t && other) noexcept; + traffic_policy_rule_t & operator=(traffic_policy_rule_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -641,8 +771,12 @@ class EOS_SDK_PUBLIC traffic_policy_rule_t { std::set const & actions() const; /** Setter for 'actions'. */ void actions_is(std::set const & actions); + /** Moving Setter for 'actions'. */ + void actions_is(std::set && actions); /** Inserts one action of 'value' to the set. */ void action_set(traffic_policy_action_t const & value); + /** Inserts one action of 'value' to the set. */ + void action_set(traffic_policy_action_t && value); /** Deletes one action of 'value' from the set. */ void action_del(traffic_policy_action_t const & value); @@ -685,6 +819,8 @@ class EOS_SDK_PUBLIC traffic_policy_t { traffic_policy_t& operator=( traffic_policy_t const & other); + traffic_policy_t(traffic_policy_t && other) noexcept; + traffic_policy_t & operator=(traffic_policy_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -695,8 +831,11 @@ class EOS_SDK_PUBLIC traffic_policy_t { std::unordered_set const & named_counters() const; void named_counters_is(std::unordered_set const & named_counters); + void named_counters_is(std::unordered_set && named_counters); /** Inserts one named_counter of 'value' to the set. */ void named_counter_set(std::string const & value); + /** Inserts one named_counter of 'value' to the set. */ + void named_counter_set(std::string && value); /** Deletes one named_counter of 'value' from the set. */ void named_counter_del(std::string const & value); @@ -738,6 +877,9 @@ class EOS_SDK_PUBLIC traffic_policy_counter_data_t { traffic_policy_counter_data_t& operator=( traffic_policy_counter_data_t const & other); + traffic_policy_counter_data_t(traffic_policy_counter_data_t && other) noexcept; + traffic_policy_counter_data_t & operator=(traffic_policy_counter_data_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -789,6 +931,8 @@ class EOS_SDK_PUBLIC traffic_policy_counter_t { traffic_policy_counter_t& operator=( traffic_policy_counter_t const & other); + traffic_policy_counter_t(traffic_policy_counter_t && other) noexcept; + traffic_policy_counter_t & operator=(traffic_policy_counter_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -803,11 +947,24 @@ class EOS_SDK_PUBLIC traffic_policy_counter_t { std::map const & named_counter_data); + void named_counter_data_is( + + std::map && + named_counter_data); /** Inserts key/value pair to the map. */ void named_counter_data_set(std::string const & key, traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void named_counter_data_set(std::string const & key, + traffic_policy_counter_data_t && value); /** Deletes the key/value pair from the map. */ void named_counter_data_del(std::string const & key); + /** Inserts key/value pair to the map. */ + void named_counter_data_set(std::string && key, + traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void named_counter_data_set(std::string && key, + traffic_policy_counter_data_t && value); std::map const & class_counter_data() const; @@ -815,11 +972,24 @@ class EOS_SDK_PUBLIC traffic_policy_counter_t { std::map const & class_counter_data); + void class_counter_data_is( + + std::map && + class_counter_data); /** Inserts key/value pair to the map. */ void class_counter_data_set(std::string const & key, traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void class_counter_data_set(std::string const & key, + traffic_policy_counter_data_t && value); /** Deletes the key/value pair from the map. */ void class_counter_data_del(std::string const & key); + /** Inserts key/value pair to the map. */ + void class_counter_data_set(std::string && key, + traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void class_counter_data_set(std::string && key, + traffic_policy_counter_data_t && value); bool operator==(traffic_policy_counter_t const & other) const; bool operator!=(traffic_policy_counter_t const & other) const; @@ -899,6 +1069,9 @@ class EOS_SDK_PUBLIC policy_map_hw_status_key_t { policy_map_hw_status_key_t& operator=( policy_map_hw_status_key_t const & other); + policy_map_hw_status_key_t(policy_map_hw_status_key_t && other) noexcept; + policy_map_hw_status_key_t & operator=(policy_map_hw_status_key_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -955,6 +1128,8 @@ class EOS_SDK_PUBLIC policy_map_hw_statuses_t { policy_map_hw_statuses_t& operator=( policy_map_hw_statuses_t const & other); + policy_map_hw_statuses_t(policy_map_hw_statuses_t && other) noexcept; + policy_map_hw_statuses_t & operator=(policy_map_hw_statuses_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -969,11 +1144,25 @@ class EOS_SDK_PUBLIC policy_map_hw_statuses_t { std::map const & intf_statuses); + /** Moving Setter for 'intf_statuses'. */ + void intf_statuses_is( + + std::map && + intf_statuses); /** Inserts key/value pair to the map. */ void intf_statuse_set(policy_map_hw_status_key_t const & key, policy_map_status_t const & value); + /** Inserts key/value pair to the map. */ + void intf_statuse_set(policy_map_hw_status_key_t const & key, + policy_map_status_t && value); /** Deletes the key/value pair from the map. */ void intf_statuse_del(policy_map_hw_status_key_t const & key); + /** Inserts key/value pair to the map. */ + void intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t const & value); + /** Inserts key/value pair to the map. */ + void intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t && value); bool operator==(policy_map_hw_statuses_t const & other) const; bool operator!=(policy_map_hw_statuses_t const & other) const; diff --git a/eos/types/policy_map_impl.h b/eos/types/policy_map_impl.h index 7b820aa..4d84da4 100644 --- a/eos/types/policy_map_impl.h +++ b/eos/types/policy_map_impl.h @@ -26,6 +26,7 @@ class EOS_SDK_PUBLIC policy_map_key_impl_t { std::string name() const; void name_is(std::string const & name); + void name_is(std::string && name); policy_feature_t feature() const; void feature_is(policy_feature_t feature); @@ -85,11 +86,16 @@ class EOS_SDK_PUBLIC policy_map_action_impl_t { std::string nexthop_group_name() const; /** Setter for 'nexthop_group_name'. */ void nexthop_group_name_is(std::string const & nexthop_group_name); + /** Moving Setter for 'nexthop_group_name'. */ + void nexthop_group_name_is(std::string && nexthop_group_name); std::unordered_set const & nexthops() const; void nexthops_is(std::unordered_set const & nexthops); + void nexthops_is(std::unordered_set && nexthops); /** Inserts one nexthop of 'value' to the set. */ void nexthop_set(ip_addr_t const & value); + /** Inserts one nexthop of 'value' to the set. */ + void nexthop_set(ip_addr_t && value); /** Deletes one nexthop of 'value' from the set. */ void nexthop_del(ip_addr_t const & value); @@ -97,6 +103,8 @@ class EOS_SDK_PUBLIC policy_map_action_impl_t { std::string vrf() const; /** Setter for 'vrf'. */ void vrf_is(std::string const & vrf); + /** Moving Setter for 'vrf'. */ + void vrf_is(std::string && vrf); /** * Getter for 'dscp': the DiffServ Code Point on matching IPv4/IPv6 packets. @@ -172,16 +180,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_impl_t { std::string counter_name() const; /** Setter for 'counter_name'. */ void counter_name_is(std::string const & counter_name); + /** Moving Setter for 'counter_name'. */ + void counter_name_is(std::string && counter_name); /** Getter for 'goto_class_name': the name of class for goto action. */ std::string goto_class_name() const; /** Setter for 'goto_class_name'. */ void goto_class_name_is(std::string const & goto_class_name); + /** Moving Setter for 'goto_class_name'. */ + void goto_class_name_is(std::string && goto_class_name); /** Getter for 'goto_next': the flag indicating if it is goto next action. */ bool goto_next() const; /** Setter for 'goto_next'. */ void goto_next_is(bool const & goto_next); + /** Moving Setter for 'goto_next'. */ + void goto_next_is(bool && goto_next); /** * Getter for 'dscp': the DiffServ Code Point on matching IPv4/IPv6 packets. @@ -208,16 +222,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_impl_t { std::string vrf() const; /** Setter for 'vrf'. */ void vrf_is(std::string const & vrf); + /** Moving Setter for 'vrf'. */ + void vrf_is(std::string && vrf); /** Getter for 'mirror_session': the name of mirror session for mirror action. */ std::string mirror_session() const; /** Setter for 'mirror_session'. */ void mirror_session_is(std::string const & mirror_session); + /** Moving Setter for 'mirror_session'. */ + void mirror_session_is(std::string && mirror_session); /** Getter for 'police_rate': the police rate value for police action. */ uint64_t police_rate() const; /** Setter for 'police_rate'. */ void police_rate_is(uint64_t const & police_rate); + /** Moving Setter for 'police_rate'. */ + void police_rate_is(uint64_t && police_rate); /** * Getter for 'police_burst_size': the police burst size value for police @@ -226,16 +246,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_impl_t { uint64_t police_burst_size() const; /** Setter for 'police_burst_size'. */ void police_burst_size_is(uint64_t const & police_burst_size); + /** Moving Setter for 'police_burst_size'. */ + void police_burst_size_is(uint64_t && police_burst_size); /** Getter for 'police_rate_unit': the police rate unit for police action. */ police_rate_unit_t police_rate_unit() const; /** Setter for 'police_rate_unit'. */ void police_rate_unit_is(police_rate_unit_t const & police_rate_unit); + /** Moving Setter for 'police_rate_unit'. */ + void police_rate_unit_is(police_rate_unit_t && police_rate_unit); /** Getter for 'police_burst_unit': the police burst unit for police action. */ police_burst_unit_t police_burst_unit() const; /** Setter for 'police_burst_unit'. */ void police_burst_unit_is(police_burst_unit_t const & police_burst_unit); + /** Moving Setter for 'police_burst_unit'. */ + void police_burst_unit_is(police_burst_unit_t && police_burst_unit); /** * Getter for 'nexthop_groups': the set of nexthop group names for traffic- @@ -244,15 +270,22 @@ class EOS_SDK_PUBLIC traffic_policy_action_impl_t { std::unordered_set const & nexthop_groups() const; /** Setter for 'nexthop_groups'. */ void nexthop_groups_is(std::unordered_set const & nexthop_groups); + /** Moving Setter for 'nexthop_groups'. */ + void nexthop_groups_is(std::unordered_set && nexthop_groups); /** Inserts one nexthop_group of 'value' to the set. */ void nexthop_group_set(std::string const & value); + /** Inserts one nexthop_group of 'value' to the set. */ + void nexthop_group_set(std::string && value); /** Deletes one nexthop_group of 'value' from the set. */ void nexthop_group_del(std::string const & value); std::unordered_set const & nexthops() const; void nexthops_is(std::unordered_set const & nexthops); + void nexthops_is(std::unordered_set && nexthops); /** Inserts one nexthop of 'value' to the set. */ void nexthop_set(ip_addr_t const & value); + /** Inserts one nexthop of 'value' to the set. */ + void nexthop_set(ip_addr_t && value); /** Deletes one nexthop of 'value' from the set. */ void nexthop_del(ip_addr_t const & value); @@ -317,6 +350,8 @@ class EOS_SDK_PUBLIC policy_map_rule_impl_t { class_map_key_t class_map_key() const; /** Setter for 'class_map_key'. */ void class_map_key_is(class_map_key_t const & class_map_key); + /** Moving Setter for 'class_map_key'. */ + void class_map_key_is(class_map_key_t && class_map_key); /** * Getter for 'policy_map_rule_type': the rule type. Set the rule type to @@ -340,8 +375,12 @@ class EOS_SDK_PUBLIC policy_map_rule_impl_t { std::set const & actions() const; /** Setter for 'actions'. */ void actions_is(std::set const & actions); + /** Moving Setter for 'actions'. */ + void actions_is(std::set && actions); /** Inserts one action of 'value' to the set. */ void action_set(policy_map_action_t const & value); + /** Inserts one action of 'value' to the set. */ + void action_set(policy_map_action_t && value); /** Deletes one action of 'value' from the set. */ void action_del(policy_map_action_t const & value); @@ -383,12 +422,18 @@ class EOS_SDK_PUBLIC policy_map_impl_t { policy_map_key_t key() const; void key_is(policy_map_key_t const & key); + void key_is(policy_map_key_t && key); std::map const & rules() const; - void rules_is(std::map const & rules); + void rules_is(std::map && rules); + /** Inserts key/value pair to the map. */ void rule_set(uint32_t key, policy_map_rule_t const & value); + /** Inserts key/value pair to the map. */ + void rule_set(uint32_t key, policy_map_rule_t && value); + /** Deletes the key/value pair from the map. */ void rule_del(uint32_t key); + bool operator==(policy_map_impl_t const & other) const; bool operator!=(policy_map_impl_t const & other) const; bool operator<(policy_map_impl_t const & other) const; @@ -444,8 +489,12 @@ class EOS_SDK_PUBLIC traffic_policy_rule_impl_t { std::set const & actions() const; /** Setter for 'actions'. */ void actions_is(std::set const & actions); + /** Moving Setter for 'actions'. */ + void actions_is(std::set && actions); /** Inserts one action of 'value' to the set. */ void action_set(traffic_policy_action_t const & value); + /** Inserts one action of 'value' to the set. */ + void action_set(traffic_policy_action_t && value); /** Deletes one action of 'value' from the set. */ void action_del(traffic_policy_action_t const & value); @@ -488,8 +537,11 @@ class EOS_SDK_PUBLIC traffic_policy_impl_t { std::unordered_set const & named_counters() const; void named_counters_is(std::unordered_set const & named_counters); + void named_counters_is(std::unordered_set && named_counters); /** Inserts one named_counter of 'value' to the set. */ void named_counter_set(std::string const & value); + /** Inserts one named_counter of 'value' to the set. */ + void named_counter_set(std::string && value); /** Deletes one named_counter of 'value' from the set. */ void named_counter_del(std::string const & value); @@ -575,11 +627,24 @@ class EOS_SDK_PUBLIC traffic_policy_counter_impl_t { std::map const & named_counter_data); + void named_counter_data_is( + + std::map && + named_counter_data); /** Inserts key/value pair to the map. */ void named_counter_data_set(std::string const & key, traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void named_counter_data_set(std::string const & key, + traffic_policy_counter_data_t && value); /** Deletes the key/value pair from the map. */ void named_counter_data_del(std::string const & key); + /** Inserts key/value pair to the map. */ + void named_counter_data_set(std::string && key, + traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void named_counter_data_set(std::string && key, + traffic_policy_counter_data_t && value); std::map const & class_counter_data() const; @@ -587,11 +652,24 @@ class EOS_SDK_PUBLIC traffic_policy_counter_impl_t { std::map const & class_counter_data); + void class_counter_data_is( + + std::map && + class_counter_data); /** Inserts key/value pair to the map. */ void class_counter_data_set(std::string const & key, traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void class_counter_data_set(std::string const & key, + traffic_policy_counter_data_t && value); /** Deletes the key/value pair from the map. */ void class_counter_data_del(std::string const & key); + /** Inserts key/value pair to the map. */ + void class_counter_data_set(std::string && key, + traffic_policy_counter_data_t const & value); + /** Inserts key/value pair to the map. */ + void class_counter_data_set(std::string && key, + traffic_policy_counter_data_t && value); bool operator==(traffic_policy_counter_impl_t const & other) const; bool operator!=(traffic_policy_counter_impl_t const & other) const; @@ -674,11 +752,25 @@ class EOS_SDK_PUBLIC policy_map_hw_statuses_impl_t { std::map const & intf_statuses); + /** Moving Setter for 'intf_statuses'. */ + void intf_statuses_is( + + std::map && + intf_statuses); /** Inserts key/value pair to the map. */ void intf_statuse_set(policy_map_hw_status_key_t const & key, policy_map_status_t const & value); + /** Inserts key/value pair to the map. */ + void intf_statuse_set(policy_map_hw_status_key_t const & key, + policy_map_status_t && value); /** Deletes the key/value pair from the map. */ void intf_statuse_del(policy_map_hw_status_key_t const & key); + /** Inserts key/value pair to the map. */ + void intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t const & value); + /** Inserts key/value pair to the map. */ + void intf_statuse_set(policy_map_hw_status_key_t && key, + policy_map_status_t && value); bool operator==(policy_map_hw_statuses_impl_t const & other) const; bool operator!=(policy_map_hw_statuses_impl_t const & other) const; diff --git a/eos/types/route_map.h b/eos/types/route_map.h index b7d491f..82b5f0b 100644 --- a/eos/types/route_map.h +++ b/eos/types/route_map.h @@ -11,6 +11,23 @@ #include #include +#ifdef SWIG +%ignore eos::link_bandwidth_t(eos::link_bandwidth_t &&) noexcept; +%ignore eos::link_bandwidth_t::operator=(eos::link_bandwidth_t &&) noexcept; +%ignore eos::route_map_link_bandwidth_t(eos::route_map_link_bandwidth_t &&) + noexcept; +%ignore eos::route_map_link_bandwidth_t::operator=( + eos::route_map_link_bandwidth_t &&) noexcept; +%ignore eos::route_map_entry_t(eos::route_map_entry_t &&) noexcept; +%ignore eos::route_map_entry_t::operator=(eos::route_map_entry_t &&) noexcept; +%ignore eos::route_map_entry_t::link_bandwidth_is( + eos::route_map_link_bandwidth_t &&); +%ignore eos::route_map_t(eos::route_map_t &&) noexcept; +%ignore eos::route_map_t::operator=(eos::route_map_t &&) noexcept; +%ignore eos::route_map_t::map_entry_is( + std::map &&); +#endif + namespace eos { enum bandwidth_unit_t { @@ -34,6 +51,8 @@ class EOS_SDK_PUBLIC link_bandwidth_t { link_bandwidth_t& operator=( link_bandwidth_t const & other); + link_bandwidth_t(link_bandwidth_t && other) noexcept; + link_bandwidth_t & operator=(link_bandwidth_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -99,6 +118,9 @@ class EOS_SDK_PUBLIC route_map_link_bandwidth_t { route_map_link_bandwidth_t& operator=( route_map_link_bandwidth_t const & other); + route_map_link_bandwidth_t(route_map_link_bandwidth_t && other) noexcept; + route_map_link_bandwidth_t & operator=(route_map_link_bandwidth_t && other) + noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -150,6 +172,8 @@ class EOS_SDK_PUBLIC route_map_entry_t { route_map_entry_t& operator=( route_map_entry_t const & other); + route_map_entry_t(route_map_entry_t && other) noexcept; + route_map_entry_t & operator=(route_map_entry_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -175,6 +199,8 @@ class EOS_SDK_PUBLIC route_map_entry_t { route_map_link_bandwidth_t link_bandwidth() const; /** Setter for 'link_bandwidth'. */ void link_bandwidth_is(route_map_link_bandwidth_t const & link_bandwidth); + /** Moving Setter for 'link_bandwidth'. */ + void link_bandwidth_is(route_map_link_bandwidth_t && link_bandwidth); /** Remove the link bandwidth configuration. */ void link_bandwidth_del(); @@ -207,6 +233,8 @@ class EOS_SDK_PUBLIC route_map_t { route_map_t& operator=( route_map_t const & other); + route_map_t(route_map_t && other) noexcept; + route_map_t & operator=(route_map_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -223,11 +251,23 @@ class EOS_SDK_PUBLIC route_map_t { std::map const & map_entry); + /** Moving Setter for 'map_entry'. */ + void map_entry_is( + std::map && map_entry); /** Inserts key/value pair to the map. */ void map_entry_set(route_map_sequence_number_t const & key, route_map_entry_t const & value); + /** Inserts key/value pair to the map. */ + void map_entry_set(route_map_sequence_number_t const & key, + route_map_entry_t && value); /** Deletes the key/value pair from the map. */ void map_entry_del(route_map_sequence_number_t const & key); + /** Inserts key/value pair to the map. */ + void map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t const & value); + /** Inserts key/value pair to the map. */ + void map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t && value); bool operator==(route_map_t const & other) const; bool operator!=(route_map_t const & other) const; diff --git a/eos/types/route_map_impl.h b/eos/types/route_map_impl.h index 2f718f7..9a5dd8d 100644 --- a/eos/types/route_map_impl.h +++ b/eos/types/route_map_impl.h @@ -116,6 +116,8 @@ class EOS_SDK_PUBLIC route_map_entry_impl_t { route_map_link_bandwidth_t link_bandwidth() const; /** Setter for 'link_bandwidth'. */ void link_bandwidth_is(route_map_link_bandwidth_t const & link_bandwidth); + /** Moving Setter for 'link_bandwidth'. */ + void link_bandwidth_is(route_map_link_bandwidth_t && link_bandwidth); /** Remove the link bandwidth configuration. */ void link_bandwidth_del(); @@ -154,11 +156,23 @@ class EOS_SDK_PUBLIC route_map_impl_t { std::map const & map_entry); + /** Moving Setter for 'map_entry'. */ + void map_entry_is( + std::map && map_entry); /** Inserts key/value pair to the map. */ void map_entry_set(route_map_sequence_number_t const & key, route_map_entry_t const & value); + /** Inserts key/value pair to the map. */ + void map_entry_set(route_map_sequence_number_t const & key, + route_map_entry_t && value); /** Deletes the key/value pair from the map. */ void map_entry_del(route_map_sequence_number_t const & key); + /** Inserts key/value pair to the map. */ + void map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t const & value); + /** Inserts key/value pair to the map. */ + void map_entry_set(route_map_sequence_number_t && key, + route_map_entry_t && value); bool operator==(route_map_impl_t const & other) const; bool operator!=(route_map_impl_t const & other) const; diff --git a/eos/types/structured_filter.h b/eos/types/structured_filter.h index 4ece965..d313235 100644 --- a/eos/types/structured_filter.h +++ b/eos/types/structured_filter.h @@ -14,6 +14,32 @@ #include #include +#ifdef SWIG +%ignore eos::protocol_range_t(eos::protocol_range_t &&) noexcept; +%ignore eos::protocol_range_t::operator=(eos::protocol_range_t &&) noexcept; +%ignore eos::port_range_t(eos::port_range_t &&) noexcept; +%ignore eos::port_range_t::operator=(eos::port_range_t &&) noexcept; +%ignore eos::port_field_t(eos::port_field_t &&) noexcept; +%ignore eos::port_field_t::operator=(eos::port_field_t &&) noexcept; +%ignore eos::port_field_t::src_ports_is(std::set &&); +%ignore eos::src_port_set(eos::port_range_t &&); +%ignore eos::port_field_t::dst_ports_is(std::set &&); +%ignore eos::dst_port_set(eos::port_range_t &&); +%ignore eos::port_field_t::src_port_field_sets_is( + std::unordered_set &&); +%ignore eos::src_port_field_set_set(std::string &&); +%ignore eos::port_field_t::dst_port_field_sets_is( + std::unordered_set &&); +%ignore eos::dst_port_field_set_set(std::string &&); +%ignore eos::protocol_field_t(eos::protocol_field_t &&) noexcept; +%ignore eos::protocol_field_t::operator=(eos::protocol_field_t &&) noexcept; +%ignore eos::protocol_field_t::ports_is(std::map &&); +%ignore eos::tp_rule_filter_t(eos::tp_rule_filter_t &&) noexcept; +%ignore eos::tp_rule_filter_t::operator=(eos::tp_rule_filter_t &&) noexcept; +%ignore eos::tp_rule_filter_t::protocols_is( + std::map &&); +#endif + namespace eos { /** @@ -37,6 +63,8 @@ class EOS_SDK_PUBLIC protocol_range_t { protocol_range_t& operator=( protocol_range_t const & other); + protocol_range_t(protocol_range_t && other) noexcept; + protocol_range_t & operator=(protocol_range_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -80,6 +108,8 @@ class EOS_SDK_PUBLIC port_range_t { port_range_t& operator=( port_range_t const & other); + port_range_t(port_range_t && other) noexcept; + port_range_t & operator=(port_range_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -123,6 +153,8 @@ class EOS_SDK_PUBLIC port_field_t { port_field_t& operator=( port_field_t const & other); + port_field_t(port_field_t && other) noexcept; + port_field_t & operator=(port_field_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -131,31 +163,45 @@ class EOS_SDK_PUBLIC port_field_t { std::set const & src_ports() const; void src_ports_is(std::set const & src_ports); + void src_ports_is(std::set && src_ports); /** Inserts one src_port of 'value' to the set. */ void src_port_set(port_range_t const & value); + /** Inserts one src_port of 'value' to the set. */ + void src_port_set(port_range_t && value); /** Deletes one src_port of 'value' from the set. */ void src_port_del(port_range_t const & value); std::set const & dst_ports() const; void dst_ports_is(std::set const & dst_ports); + void dst_ports_is(std::set && dst_ports); /** Inserts one dst_port of 'value' to the set. */ void dst_port_set(port_range_t const & value); + /** Inserts one dst_port of 'value' to the set. */ + void dst_port_set(port_range_t && value); /** Deletes one dst_port of 'value' from the set. */ void dst_port_del(port_range_t const & value); std::unordered_set const & src_port_field_sets() const; void src_port_field_sets_is( std::unordered_set const & src_port_field_sets); + void src_port_field_sets_is( + std::unordered_set && src_port_field_sets); /** Inserts one src_port_field_set of 'value' to the set. */ void src_port_field_set_set(std::string const & value); + /** Inserts one src_port_field_set of 'value' to the set. */ + void src_port_field_set_set(std::string && value); /** Deletes one src_port_field_set of 'value' from the set. */ void src_port_field_set_del(std::string const & value); std::unordered_set const & dst_port_field_sets() const; void dst_port_field_sets_is( std::unordered_set const & dst_port_field_sets); + void dst_port_field_sets_is( + std::unordered_set && dst_port_field_sets); /** Inserts one dst_port_field_set of 'value' to the set. */ void dst_port_field_set_set(std::string const & value); + /** Inserts one dst_port_field_set of 'value' to the set. */ + void dst_port_field_set_set(std::string && value); /** Deletes one dst_port_field_set of 'value' from the set. */ void dst_port_field_set_del(std::string const & value); @@ -190,6 +236,8 @@ class EOS_SDK_PUBLIC protocol_field_t { protocol_field_t& operator=( protocol_field_t const & other); + protocol_field_t(protocol_field_t && other) noexcept; + protocol_field_t & operator=(protocol_field_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -200,8 +248,12 @@ class EOS_SDK_PUBLIC protocol_field_t { std::map const & ports() const; /** Setter for 'ports'. */ void ports_is(std::map const & ports); + /** Moving Setter for 'ports'. */ + void ports_is(std::map && ports); /** Inserts key/value pair to the map. */ void port_set(uint32_t key, port_field_t const & value); + /** Inserts key/value pair to the map. */ + void port_set(uint32_t key, port_field_t && value); /** Deletes the key/value pair from the map. */ void port_del(uint32_t key); @@ -253,6 +305,8 @@ class EOS_SDK_PUBLIC tp_rule_filter_t { tp_rule_filter_t& operator=( tp_rule_filter_t const & other); + tp_rule_filter_t(tp_rule_filter_t && other) noexcept; + tp_rule_filter_t & operator=(tp_rule_filter_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } @@ -270,8 +324,11 @@ class EOS_SDK_PUBLIC tp_rule_filter_t { std::map const & protocols() const; void protocols_is( std::map const & protocols); + void protocols_is(std::map && protocols); /** Inserts key/value pair to the map. */ void protocol_set(protocol_range_t key, protocol_field_t const & value); + /** Inserts key/value pair to the map. */ + void protocol_set(protocol_range_t key, protocol_field_t && value); /** Deletes the key/value pair from the map. */ void protocol_del(protocol_range_t key); diff --git a/eos/types/structured_filter_impl.h b/eos/types/structured_filter_impl.h index 56d3930..3c3e0ba 100644 --- a/eos/types/structured_filter_impl.h +++ b/eos/types/structured_filter_impl.h @@ -86,31 +86,45 @@ class EOS_SDK_PUBLIC port_field_impl_t { std::set const & src_ports() const; void src_ports_is(std::set const & src_ports); + void src_ports_is(std::set && src_ports); /** Inserts one src_port of 'value' to the set. */ void src_port_set(port_range_t const & value); + /** Inserts one src_port of 'value' to the set. */ + void src_port_set(port_range_t && value); /** Deletes one src_port of 'value' from the set. */ void src_port_del(port_range_t const & value); std::set const & dst_ports() const; void dst_ports_is(std::set const & dst_ports); + void dst_ports_is(std::set && dst_ports); /** Inserts one dst_port of 'value' to the set. */ void dst_port_set(port_range_t const & value); + /** Inserts one dst_port of 'value' to the set. */ + void dst_port_set(port_range_t && value); /** Deletes one dst_port of 'value' from the set. */ void dst_port_del(port_range_t const & value); std::unordered_set const & src_port_field_sets() const; void src_port_field_sets_is( std::unordered_set const & src_port_field_sets); + void src_port_field_sets_is( + std::unordered_set && src_port_field_sets); /** Inserts one src_port_field_set of 'value' to the set. */ void src_port_field_set_set(std::string const & value); + /** Inserts one src_port_field_set of 'value' to the set. */ + void src_port_field_set_set(std::string && value); /** Deletes one src_port_field_set of 'value' from the set. */ void src_port_field_set_del(std::string const & value); std::unordered_set const & dst_port_field_sets() const; void dst_port_field_sets_is( std::unordered_set const & dst_port_field_sets); + void dst_port_field_sets_is( + std::unordered_set && dst_port_field_sets); /** Inserts one dst_port_field_set of 'value' to the set. */ void dst_port_field_set_set(std::string const & value); + /** Inserts one dst_port_field_set of 'value' to the set. */ + void dst_port_field_set_set(std::string && value); /** Deletes one dst_port_field_set of 'value' from the set. */ void dst_port_field_set_del(std::string const & value); @@ -145,8 +159,12 @@ class EOS_SDK_PUBLIC protocol_field_impl_t { std::map const & ports() const; /** Setter for 'ports'. */ void ports_is(std::map const & ports); + /** Moving Setter for 'ports'. */ + void ports_is(std::map && ports); /** Inserts key/value pair to the map. */ void port_set(uint32_t key, port_field_t const & value); + /** Inserts key/value pair to the map. */ + void port_set(uint32_t key, port_field_t && value); /** Deletes the key/value pair from the map. */ void port_del(uint32_t key); @@ -190,8 +208,11 @@ class EOS_SDK_PUBLIC tp_rule_filter_impl_t { std::map const & protocols() const; void protocols_is( std::map const & protocols); + void protocols_is(std::map && protocols); /** Inserts key/value pair to the map. */ void protocol_set(protocol_range_t key, protocol_field_t const & value); + /** Inserts key/value pair to the map. */ + void protocol_set(protocol_range_t key, protocol_field_t && value); /** Deletes the key/value pair from the map. */ void protocol_del(protocol_range_t key); diff --git a/eos/types/subintf.h b/eos/types/subintf.h index f6218d5..d9f623a 100644 --- a/eos/types/subintf.h +++ b/eos/types/subintf.h @@ -11,6 +11,11 @@ #include #include +#ifdef SWIG +%ignore eos::subintf_t(eos::subintf_t &&) noexcept; +%ignore eos::subintf_t::operator=(eos::subintf_t &&) noexcept; +#endif + namespace eos { class subintf_impl_t; @@ -23,6 +28,8 @@ class EOS_SDK_PUBLIC subintf_t { subintf_t& operator=( subintf_t const & other); + subintf_t(subintf_t && other) noexcept; + subintf_t & operator=(subintf_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/types/vrf.h b/eos/types/vrf.h index 6b1def9..b1c28c1 100644 --- a/eos/types/vrf.h +++ b/eos/types/vrf.h @@ -9,6 +9,11 @@ #include #include +#ifdef SWIG +%ignore eos::vrf_t(eos::vrf_t &&) noexcept; +%ignore eos::vrf_t::operator=(eos::vrf_t &&) noexcept; +#endif + namespace eos { /** VRF state. */ @@ -36,6 +41,8 @@ class EOS_SDK_PUBLIC vrf_t { vrf_t& operator=( vrf_t const & other); + vrf_t(vrf_t && other) noexcept; + vrf_t & operator=(vrf_t && other) noexcept; static void * operator new( std::size_t, void * ptr ) { return ptr; } diff --git a/eos/version.h b/eos/version.h index 086c9c6..41da873 100644 --- a/eos/version.h +++ b/eos/version.h @@ -24,10 +24,10 @@ #include -#define EOSSDK_VERSION "2.23.0" +#define EOSSDK_VERSION "2.23.1" #define EOSSDK_MAJOR 2 #define EOSSDK_MINOR 23 -#define EOSSDK_PATCH 0 +#define EOSSDK_PATCH 1 namespace eos { diff --git a/eth_lag_intf.cpp b/eth_lag_intf.cpp index 0fc412e..b162e7b 100644 --- a/eth_lag_intf.cpp +++ b/eth_lag_intf.cpp @@ -96,6 +96,14 @@ class eth_lag_intf_mgr_impl : public eth_lag_intf_mgr { return 8; } + void min_speed_is(intf_id_t eth_lag_intf_id, uint64_t min_speed) { + return; + } + + uint64_t min_speed(intf_id_t eth_lag_intf_id) const { + return 0; + } + void fallback_type_is(intf_id_t eth_lag_intf_id, eth_lag_intf_fallback_type_t fallback_type) { return; @@ -185,6 +193,19 @@ class eth_lag_intf_mgr_impl : public eth_lag_intf_mgr { } }; +// -- pimpl wrappers to min_speed/min_speed_is + +uint64_t eth_lag_intf_mgr::min_speed(intf_id_t eth_lag_intf_id) const { + return static_cast(this)->min_speed( + eth_lag_intf_id); +} + +void eth_lag_intf_mgr::min_speed_is(intf_id_t eth_lag_intf_id, uint64_t speed) { + static_cast(this)->min_speed_is(eth_lag_intf_id, speed); +} + +// -- end of wrappers + DEFINE_STUB_MGR_CTOR(eth_lag_intf_mgr) } // end namespace eos diff --git a/eth_lag_intf_gen.cpp b/eth_lag_intf_gen.cpp index cc88fa2..b6bcfe3 100644 --- a/eth_lag_intf_gen.cpp +++ b/eth_lag_intf_gen.cpp @@ -35,6 +35,19 @@ eth_lag_intf_membership_t::operator=( return *this; } +EOS_SDK_PUBLIC eth_lag_intf_membership_t::eth_lag_intf_membership_t( + eth_lag_intf_membership_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC eth_lag_intf_membership_t& +eth_lag_intf_membership_t::operator=( + eth_lag_intf_membership_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * eth_lag_intf_membership_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -55,13 +68,14 @@ eth_lag_intf_t::eth_lag_intf_t(intf_id_t intf) : )) {} eth_lag_intf_t::eth_lag_intf_t(intf_id_t intf, uint32_t min_links, uint64_t speed, eth_lag_intf_fallback_type_t fallback_type, - uint16_t fallback_timeout) : + uint16_t fallback_timeout, uint64_t min_speed) : pimpl(std::make_shared( intf, min_links, speed, fallback_type, - fallback_timeout + fallback_timeout, + min_speed )) {} EOS_SDK_PUBLIC eth_lag_intf_t::eth_lag_intf_t( const eth_lag_intf_t& other) : @@ -78,6 +92,19 @@ eth_lag_intf_t::operator=( return *this; } +EOS_SDK_PUBLIC eth_lag_intf_t::eth_lag_intf_t( + eth_lag_intf_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC eth_lag_intf_t& +eth_lag_intf_t::operator=( + eth_lag_intf_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * eth_lag_intf_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/eth_phy_intf_gen.cpp b/eth_phy_intf_gen.cpp index 2902b25..226d438 100644 --- a/eth_phy_intf_gen.cpp +++ b/eth_phy_intf_gen.cpp @@ -56,6 +56,19 @@ eth_phy_intf_counters_t::operator=( return *this; } +EOS_SDK_PUBLIC eth_phy_intf_counters_t::eth_phy_intf_counters_t( + eth_phy_intf_counters_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC eth_phy_intf_counters_t& +eth_phy_intf_counters_t::operator=( + eth_phy_intf_counters_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * eth_phy_intf_counters_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -112,6 +125,19 @@ eth_phy_intf_bin_counters_t::operator=( return *this; } +EOS_SDK_PUBLIC eth_phy_intf_bin_counters_t::eth_phy_intf_bin_counters_t( + eth_phy_intf_bin_counters_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC eth_phy_intf_bin_counters_t& +eth_phy_intf_bin_counters_t::operator=( + eth_phy_intf_bin_counters_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * eth_phy_intf_bin_counters_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/fib_gen.cpp b/fib_gen.cpp index aca2676..edd5f47 100644 --- a/fib_gen.cpp +++ b/fib_gen.cpp @@ -29,6 +29,19 @@ fib_route_key_t::operator=( return *this; } +EOS_SDK_PUBLIC fib_route_key_t::fib_route_key_t( + fib_route_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC fib_route_key_t& +fib_route_key_t::operator=( + fib_route_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * fib_route_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -62,6 +75,19 @@ fib_route_t::operator=( return *this; } +EOS_SDK_PUBLIC fib_route_t::fib_route_t( + fib_route_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC fib_route_t& +fib_route_t::operator=( + fib_route_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * fib_route_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -95,6 +121,19 @@ fib_fec_key_t::operator=( return *this; } +EOS_SDK_PUBLIC fib_fec_key_t::fib_fec_key_t( + fib_fec_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC fib_fec_key_t& +fib_fec_key_t::operator=( + fib_fec_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * fib_fec_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -129,6 +168,19 @@ fib_via_t::operator=( return *this; } +EOS_SDK_PUBLIC fib_via_t::fib_via_t( + fib_via_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC fib_via_t& +fib_via_t::operator=( + fib_via_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * fib_via_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -162,6 +214,19 @@ fib_fec_t::operator=( return *this; } +EOS_SDK_PUBLIC fib_fec_t::fib_fec_t( + fib_fec_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC fib_fec_t& +fib_fec_t::operator=( + fib_fec_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * fib_fec_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/hardware_table_gen.cpp b/hardware_table_gen.cpp index 6833a8f..6ebf371 100644 --- a/hardware_table_gen.cpp +++ b/hardware_table_gen.cpp @@ -42,6 +42,19 @@ hardware_table_key_t::operator=( return *this; } +EOS_SDK_PUBLIC hardware_table_key_t::hardware_table_key_t( + hardware_table_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC hardware_table_key_t& +hardware_table_key_t::operator=( + hardware_table_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * hardware_table_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -76,6 +89,19 @@ hardware_table_high_watermark_t::operator=( return *this; } +EOS_SDK_PUBLIC hardware_table_high_watermark_t::hardware_table_high_watermark_t( + hardware_table_high_watermark_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC hardware_table_high_watermark_t& +hardware_table_high_watermark_t::operator=( + hardware_table_high_watermark_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * hardware_table_high_watermark_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -112,6 +138,19 @@ hardware_table_usage_t::operator=( return *this; } +EOS_SDK_PUBLIC hardware_table_usage_t::hardware_table_usage_t( + hardware_table_usage_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC hardware_table_usage_t& +hardware_table_usage_t::operator=( + hardware_table_usage_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * hardware_table_usage_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -148,6 +187,19 @@ hardware_table_entry_t::operator=( return *this; } +EOS_SDK_PUBLIC hardware_table_entry_t::hardware_table_entry_t( + hardware_table_entry_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC hardware_table_entry_t& +hardware_table_entry_t::operator=( + hardware_table_entry_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * hardware_table_entry_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/intf_gen.cpp b/intf_gen.cpp index d62e0b8..ebec4ee 100644 --- a/intf_gen.cpp +++ b/intf_gen.cpp @@ -49,6 +49,19 @@ intf_counters_t::operator=( return *this; } +EOS_SDK_PUBLIC intf_counters_t::intf_counters_t( + intf_counters_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC intf_counters_t& +intf_counters_t::operator=( + intf_counters_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * intf_counters_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -90,6 +103,19 @@ intf_traffic_rates_t::operator=( return *this; } +EOS_SDK_PUBLIC intf_traffic_rates_t::intf_traffic_rates_t( + intf_traffic_rates_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC intf_traffic_rates_t& +intf_traffic_rates_t::operator=( + intf_traffic_rates_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * intf_traffic_rates_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/ip_gen.cpp b/ip_gen.cpp index 476d110..421f696 100644 --- a/ip_gen.cpp +++ b/ip_gen.cpp @@ -29,6 +29,19 @@ ip_addr_mask_t::operator=( return *this; } +EOS_SDK_PUBLIC ip_addr_mask_t::ip_addr_mask_t( + ip_addr_mask_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC ip_addr_mask_t& +ip_addr_mask_t::operator=( + ip_addr_mask_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * ip_addr_mask_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/ip_route_gen.cpp b/ip_route_gen.cpp index 80a4395..a2c4a8e 100644 --- a/ip_route_gen.cpp +++ b/ip_route_gen.cpp @@ -34,6 +34,19 @@ ip_route_key_t::operator=( return *this; } +EOS_SDK_PUBLIC ip_route_key_t::ip_route_key_t( + ip_route_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC ip_route_key_t& +ip_route_key_t::operator=( + ip_route_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * ip_route_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -66,6 +79,19 @@ ip_route_t::operator=( return *this; } +EOS_SDK_PUBLIC ip_route_t::ip_route_t( + ip_route_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC ip_route_t& +ip_route_t::operator=( + ip_route_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * ip_route_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -98,6 +124,19 @@ ip_route_via_t::operator=( return *this; } +EOS_SDK_PUBLIC ip_route_via_t::ip_route_via_t( + ip_route_via_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC ip_route_via_t& +ip_route_via_t::operator=( + ip_route_via_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * ip_route_via_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/lldp_gen.cpp b/lldp_gen.cpp index 0f785b9..aed22c5 100644 --- a/lldp_gen.cpp +++ b/lldp_gen.cpp @@ -31,6 +31,19 @@ lldp_tlv_type_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_tlv_type_t::lldp_tlv_type_t( + lldp_tlv_type_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_tlv_type_t& +lldp_tlv_type_t::operator=( + lldp_tlv_type_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_tlv_type_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -59,6 +72,19 @@ lldp_std_tlv_type_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_std_tlv_type_t::lldp_std_tlv_type_t( + lldp_std_tlv_type_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_std_tlv_type_t& +lldp_std_tlv_type_t::operator=( + lldp_std_tlv_type_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_std_tlv_type_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -92,6 +118,19 @@ lldp_syscap_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_syscap_t::lldp_syscap_t( + lldp_syscap_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_syscap_t& +lldp_syscap_t::operator=( + lldp_syscap_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_syscap_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -131,6 +170,19 @@ lldp_management_address_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_management_address_t::lldp_management_address_t( + lldp_management_address_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_management_address_t& +lldp_management_address_t::operator=( + lldp_management_address_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_management_address_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -167,6 +219,19 @@ lldp_lacp_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_lacp_t::lldp_lacp_t( + lldp_lacp_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_lacp_t& +lldp_lacp_t::operator=( + lldp_lacp_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_lacp_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -204,6 +269,19 @@ lldp_phy_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_phy_t::lldp_phy_t( + lldp_phy_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_phy_t& +lldp_phy_t::operator=( + lldp_phy_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_phy_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -239,6 +317,19 @@ lldp_chassis_id_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_chassis_id_t::lldp_chassis_id_t( + lldp_chassis_id_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_chassis_id_t& +lldp_chassis_id_t::operator=( + lldp_chassis_id_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_chassis_id_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -273,6 +364,19 @@ lldp_intf_id_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_intf_id_t::lldp_intf_id_t( + lldp_intf_id_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_intf_id_t& +lldp_intf_id_t::operator=( + lldp_intf_id_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_intf_id_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -309,6 +413,19 @@ lldp_remote_system_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_remote_system_t::lldp_remote_system_t( + lldp_remote_system_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_remote_system_t& +lldp_remote_system_t::operator=( + lldp_remote_system_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_remote_system_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -350,6 +467,19 @@ lldp_neighbor_t::operator=( return *this; } +EOS_SDK_PUBLIC lldp_neighbor_t::lldp_neighbor_t( + lldp_neighbor_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC lldp_neighbor_t& +lldp_neighbor_t::operator=( + lldp_neighbor_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * lldp_neighbor_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/mac_table_gen.cpp b/mac_table_gen.cpp index 67a3f6b..39506c1 100644 --- a/mac_table_gen.cpp +++ b/mac_table_gen.cpp @@ -29,6 +29,19 @@ mac_key_t::operator=( return *this; } +EOS_SDK_PUBLIC mac_key_t::mac_key_t( + mac_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC mac_key_t& +mac_key_t::operator=( + mac_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * mac_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -82,6 +95,19 @@ mac_entry_t::operator=( return *this; } +EOS_SDK_PUBLIC mac_entry_t::mac_entry_t( + mac_entry_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC mac_entry_t& +mac_entry_t::operator=( + mac_entry_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * mac_entry_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/macsec_gen.cpp b/macsec_gen.cpp index 2257b27..6ad2ff5 100644 --- a/macsec_gen.cpp +++ b/macsec_gen.cpp @@ -24,6 +24,19 @@ macsec_key_t::operator=( return *this; } +EOS_SDK_PUBLIC macsec_key_t::macsec_key_t( + macsec_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC macsec_key_t& +macsec_key_t::operator=( + macsec_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * macsec_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -56,6 +69,19 @@ macsec_profile_t::operator=( return *this; } +EOS_SDK_PUBLIC macsec_profile_t::macsec_profile_t( + macsec_profile_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC macsec_profile_t& +macsec_profile_t::operator=( + macsec_profile_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * macsec_profile_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -84,6 +110,19 @@ macsec_intf_status_t::operator=( return *this; } +EOS_SDK_PUBLIC macsec_intf_status_t::macsec_intf_status_t( + macsec_intf_status_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC macsec_intf_status_t& +macsec_intf_status_t::operator=( + macsec_intf_status_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * macsec_intf_status_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -124,6 +163,19 @@ macsec_intf_counters_t::operator=( return *this; } +EOS_SDK_PUBLIC macsec_intf_counters_t::macsec_intf_counters_t( + macsec_intf_counters_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC macsec_intf_counters_t& +macsec_intf_counters_t::operator=( + macsec_intf_counters_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * macsec_intf_counters_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/mpls_route_gen.cpp b/mpls_route_gen.cpp index 5b4aedd..3be61db 100644 --- a/mpls_route_gen.cpp +++ b/mpls_route_gen.cpp @@ -36,6 +36,19 @@ mpls_route_key_t::operator=( return *this; } +EOS_SDK_PUBLIC mpls_route_key_t::mpls_route_key_t( + mpls_route_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC mpls_route_key_t& +mpls_route_key_t::operator=( + mpls_route_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * mpls_route_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -53,6 +66,11 @@ mpls_route_t::mpls_route_t(mpls_route_key_t key) : pimpl(std::make_shared( key )) {} +mpls_route_t::mpls_route_t(mpls_route_key_t key, uint32_t version_id) : + pimpl(std::make_shared( + key, + version_id + )) {} EOS_SDK_PUBLIC mpls_route_t::mpls_route_t( const mpls_route_t& other) : pimpl(std::make_shared( @@ -68,6 +86,19 @@ mpls_route_t::operator=( return *this; } +EOS_SDK_PUBLIC mpls_route_t::mpls_route_t( + mpls_route_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC mpls_route_t& +mpls_route_t::operator=( + mpls_route_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * mpls_route_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -106,6 +137,19 @@ mpls_route_via_t::operator=( return *this; } +EOS_SDK_PUBLIC mpls_route_via_t::mpls_route_via_t( + mpls_route_via_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC mpls_route_via_t& +mpls_route_via_t::operator=( + mpls_route_via_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * mpls_route_via_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -138,6 +182,19 @@ mpls_fec_id_t::operator=( return *this; } +EOS_SDK_PUBLIC mpls_fec_id_t::mpls_fec_id_t( + mpls_fec_id_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC mpls_fec_id_t& +mpls_fec_id_t::operator=( + mpls_fec_id_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * mpls_fec_id_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/mpls_vrf_label_gen.cpp b/mpls_vrf_label_gen.cpp index d89ad32..60f43ba 100644 --- a/mpls_vrf_label_gen.cpp +++ b/mpls_vrf_label_gen.cpp @@ -30,6 +30,19 @@ mpls_vrf_label_t::operator=( return *this; } +EOS_SDK_PUBLIC mpls_vrf_label_t::mpls_vrf_label_t( + mpls_vrf_label_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC mpls_vrf_label_t& +mpls_vrf_label_t::operator=( + mpls_vrf_label_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * mpls_vrf_label_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/neighbor_table_gen.cpp b/neighbor_table_gen.cpp index fb59d7a..8308d2d 100644 --- a/neighbor_table_gen.cpp +++ b/neighbor_table_gen.cpp @@ -34,6 +34,19 @@ neighbor_key_t::operator=( return *this; } +EOS_SDK_PUBLIC neighbor_key_t::neighbor_key_t( + neighbor_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC neighbor_key_t& +neighbor_key_t::operator=( + neighbor_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * neighbor_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -71,6 +84,19 @@ neighbor_entry_t::operator=( return *this; } +EOS_SDK_PUBLIC neighbor_entry_t::neighbor_entry_t( + neighbor_entry_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC neighbor_entry_t& +neighbor_entry_t::operator=( + neighbor_entry_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * neighbor_entry_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/nexthop_group_gen.cpp b/nexthop_group_gen.cpp index 51b1599..579b46c 100644 --- a/nexthop_group_gen.cpp +++ b/nexthop_group_gen.cpp @@ -35,6 +35,19 @@ nexthop_group_mpls_action_t::operator=( return *this; } +EOS_SDK_PUBLIC nexthop_group_mpls_action_t::nexthop_group_mpls_action_t( + nexthop_group_mpls_action_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC nexthop_group_mpls_action_t& +nexthop_group_mpls_action_t::operator=( + nexthop_group_mpls_action_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * nexthop_group_mpls_action_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -71,6 +84,19 @@ nexthop_group_entry_counter_t::operator=( return *this; } +EOS_SDK_PUBLIC nexthop_group_entry_counter_t::nexthop_group_entry_counter_t( + nexthop_group_entry_counter_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC nexthop_group_entry_counter_t& +nexthop_group_entry_counter_t::operator=( + nexthop_group_entry_counter_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * nexthop_group_entry_counter_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -114,6 +140,19 @@ nexthop_group_entry_t::operator=( return *this; } +EOS_SDK_PUBLIC nexthop_group_entry_t::nexthop_group_entry_t( + nexthop_group_entry_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC nexthop_group_entry_t& +nexthop_group_entry_t::operator=( + nexthop_group_entry_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * nexthop_group_entry_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -167,6 +206,19 @@ nexthop_group_t::operator=( return *this; } +EOS_SDK_PUBLIC nexthop_group_t::nexthop_group_t( + nexthop_group_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC nexthop_group_t& +nexthop_group_t::operator=( + nexthop_group_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * nexthop_group_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -181,9 +233,11 @@ nexthop_group_t::operator delete( void * p ) noexcept { nexthop_group_programmed_status_t::nexthop_group_programmed_status_t() : pimpl(std::make_shared()) {} nexthop_group_programmed_status_t::nexthop_group_programmed_status_t( - nexthop_group_counter_state_t counter_state) : + nexthop_group_counter_state_t counter_state, + nexthop_group_programmed_hw_state_t hw_state) : pimpl(std::make_shared( - counter_state + counter_state, + hw_state )) {} EOS_SDK_PUBLIC nexthop_group_programmed_status_t::nexthop_group_programmed_status_t( const nexthop_group_programmed_status_t& other) : @@ -200,6 +254,19 @@ nexthop_group_programmed_status_t::operator=( return *this; } +EOS_SDK_PUBLIC nexthop_group_programmed_status_t::nexthop_group_programmed_status_t( + nexthop_group_programmed_status_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC nexthop_group_programmed_status_t& +nexthop_group_programmed_status_t::operator=( + nexthop_group_programmed_status_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * nexthop_group_programmed_status_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/nexthop_group_tunnel_gen.cpp b/nexthop_group_tunnel_gen.cpp index 86022da..daf7850 100644 --- a/nexthop_group_tunnel_gen.cpp +++ b/nexthop_group_tunnel_gen.cpp @@ -30,6 +30,19 @@ nexthop_group_tunnel_t::operator=( return *this; } +EOS_SDK_PUBLIC nexthop_group_tunnel_t::nexthop_group_tunnel_t( + nexthop_group_tunnel_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC nexthop_group_tunnel_t& +nexthop_group_tunnel_t::operator=( + nexthop_group_tunnel_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * nexthop_group_tunnel_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/policy_map_gen.cpp b/policy_map_gen.cpp index f8937aa..c439522 100644 --- a/policy_map_gen.cpp +++ b/policy_map_gen.cpp @@ -30,6 +30,19 @@ policy_map_key_t::operator=( return *this; } +EOS_SDK_PUBLIC policy_map_key_t::policy_map_key_t( + policy_map_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC policy_map_key_t& +policy_map_key_t::operator=( + policy_map_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * policy_map_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -63,6 +76,19 @@ policy_map_action_t::operator=( return *this; } +EOS_SDK_PUBLIC policy_map_action_t::policy_map_action_t( + policy_map_action_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC policy_map_action_t& +policy_map_action_t::operator=( + policy_map_action_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * policy_map_action_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -97,6 +123,19 @@ traffic_policy_action_t::operator=( return *this; } +EOS_SDK_PUBLIC traffic_policy_action_t::traffic_policy_action_t( + traffic_policy_action_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC traffic_policy_action_t& +traffic_policy_action_t::operator=( + traffic_policy_action_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * traffic_policy_action_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -129,6 +168,19 @@ policy_map_rule_t::operator=( return *this; } +EOS_SDK_PUBLIC policy_map_rule_t::policy_map_rule_t( + policy_map_rule_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC policy_map_rule_t& +policy_map_rule_t::operator=( + policy_map_rule_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * policy_map_rule_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -161,6 +213,19 @@ policy_map_t::operator=( return *this; } +EOS_SDK_PUBLIC policy_map_t::policy_map_t( + policy_map_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC policy_map_t& +policy_map_t::operator=( + policy_map_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * policy_map_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -196,6 +261,19 @@ traffic_policy_rule_t::operator=( return *this; } +EOS_SDK_PUBLIC traffic_policy_rule_t::traffic_policy_rule_t( + traffic_policy_rule_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC traffic_policy_rule_t& +traffic_policy_rule_t::operator=( + traffic_policy_rule_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * traffic_policy_rule_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -226,6 +304,19 @@ traffic_policy_t::operator=( return *this; } +EOS_SDK_PUBLIC traffic_policy_t::traffic_policy_t( + traffic_policy_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC traffic_policy_t& +traffic_policy_t::operator=( + traffic_policy_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * traffic_policy_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -264,6 +355,19 @@ traffic_policy_counter_data_t::operator=( return *this; } +EOS_SDK_PUBLIC traffic_policy_counter_data_t::traffic_policy_counter_data_t( + traffic_policy_counter_data_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC traffic_policy_counter_data_t& +traffic_policy_counter_data_t::operator=( + traffic_policy_counter_data_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * traffic_policy_counter_data_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -294,6 +398,19 @@ traffic_policy_counter_t::operator=( return *this; } +EOS_SDK_PUBLIC traffic_policy_counter_t::traffic_policy_counter_t( + traffic_policy_counter_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC traffic_policy_counter_t& +traffic_policy_counter_t::operator=( + traffic_policy_counter_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * traffic_policy_counter_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -328,6 +445,19 @@ policy_map_hw_status_key_t::operator=( return *this; } +EOS_SDK_PUBLIC policy_map_hw_status_key_t::policy_map_hw_status_key_t( + policy_map_hw_status_key_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC policy_map_hw_status_key_t& +policy_map_hw_status_key_t::operator=( + policy_map_hw_status_key_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * policy_map_hw_status_key_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -363,6 +493,19 @@ policy_map_hw_statuses_t::operator=( return *this; } +EOS_SDK_PUBLIC policy_map_hw_statuses_t::policy_map_hw_statuses_t( + policy_map_hw_statuses_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC policy_map_hw_statuses_t& +policy_map_hw_statuses_t::operator=( + policy_map_hw_statuses_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * policy_map_hw_statuses_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/route_map_gen.cpp b/route_map_gen.cpp index 684f8a6..e652fed 100644 --- a/route_map_gen.cpp +++ b/route_map_gen.cpp @@ -33,6 +33,19 @@ link_bandwidth_t::operator=( return *this; } +EOS_SDK_PUBLIC link_bandwidth_t::link_bandwidth_t( + link_bandwidth_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC link_bandwidth_t& +link_bandwidth_t::operator=( + link_bandwidth_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * link_bandwidth_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -61,6 +74,19 @@ route_map_link_bandwidth_t::operator=( return *this; } +EOS_SDK_PUBLIC route_map_link_bandwidth_t::route_map_link_bandwidth_t( + route_map_link_bandwidth_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC route_map_link_bandwidth_t& +route_map_link_bandwidth_t::operator=( + route_map_link_bandwidth_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * route_map_link_bandwidth_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -93,6 +119,19 @@ route_map_entry_t::operator=( return *this; } +EOS_SDK_PUBLIC route_map_entry_t::route_map_entry_t( + route_map_entry_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC route_map_entry_t& +route_map_entry_t::operator=( + route_map_entry_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * route_map_entry_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -121,6 +160,19 @@ route_map_t::operator=( return *this; } +EOS_SDK_PUBLIC route_map_t::route_map_t( + route_map_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC route_map_t& +route_map_t::operator=( + route_map_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * route_map_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/structured_filter_gen.cpp b/structured_filter_gen.cpp index ee041e5..b504741 100644 --- a/structured_filter_gen.cpp +++ b/structured_filter_gen.cpp @@ -24,6 +24,19 @@ protocol_range_t::operator=( return *this; } +EOS_SDK_PUBLIC protocol_range_t::protocol_range_t( + protocol_range_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC protocol_range_t& +protocol_range_t::operator=( + protocol_range_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * protocol_range_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -52,6 +65,19 @@ port_range_t::operator=( return *this; } +EOS_SDK_PUBLIC port_range_t::port_range_t( + port_range_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC port_range_t& +port_range_t::operator=( + port_range_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * port_range_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -80,6 +106,19 @@ port_field_t::operator=( return *this; } +EOS_SDK_PUBLIC port_field_t::port_field_t( + port_field_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC port_field_t& +port_field_t::operator=( + port_field_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * port_field_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -108,6 +147,19 @@ protocol_field_t::operator=( return *this; } +EOS_SDK_PUBLIC protocol_field_t::protocol_field_t( + protocol_field_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC protocol_field_t& +protocol_field_t::operator=( + protocol_field_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * protocol_field_t::operator new( std::size_t size ) { return ::operator new( size ); @@ -140,6 +192,19 @@ tp_rule_filter_t::operator=( return *this; } +EOS_SDK_PUBLIC tp_rule_filter_t::tp_rule_filter_t( + tp_rule_filter_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC tp_rule_filter_t& +tp_rule_filter_t::operator=( + tp_rule_filter_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * tp_rule_filter_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/subintf_gen.cpp b/subintf_gen.cpp index f95ca0d..153840e 100644 --- a/subintf_gen.cpp +++ b/subintf_gen.cpp @@ -30,6 +30,19 @@ subintf_t::operator=( return *this; } +EOS_SDK_PUBLIC subintf_t::subintf_t( + subintf_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC subintf_t& +subintf_t::operator=( + subintf_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * subintf_t::operator new( std::size_t size ) { return ::operator new( size ); diff --git a/version.m4 b/version.m4 index c3c99e4..2027dbb 100644 --- a/version.m4 +++ b/version.m4 @@ -1,2 +1,2 @@ m4_define([_NAME_],[EosSdk]) -m4_define([_VERSION_],[2.23.0]) \ No newline at end of file +m4_define([_VERSION_],[2.23.1]) \ No newline at end of file diff --git a/vrf_gen.cpp b/vrf_gen.cpp index 3ff19be..f690ec3 100644 --- a/vrf_gen.cpp +++ b/vrf_gen.cpp @@ -31,6 +31,19 @@ vrf_t::operator=( return *this; } +EOS_SDK_PUBLIC vrf_t::vrf_t( + vrf_t && other) noexcept : + pimpl(std::move(other.pimpl)) {} +EOS_SDK_PUBLIC vrf_t& +vrf_t::operator=( + vrf_t && other) noexcept +{ + if(this != &other) { + std::swap(pimpl, other.pimpl); + } + return *this; +} + EOS_SDK_PUBLIC void * vrf_t::operator new( std::size_t size ) { return ::operator new( size );