LCOV - code coverage report
Current view: top level - src/impl - conf.cc (source / functions) Hit Total Coverage
Test: vlink Lines: 18 19 94.7 %
Date: 2026-06-27 19:56:04 Functions: 14 15 93.3 %
Branches: 4 6 66.7 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (C) 2026 by Thun Lu. All rights reserved.
       3                 :            :  * Author: Thun Lu <thun.lu@zohomail.cn>
       4                 :            :  * Repo:   https://github.com/thun-res/vlink
       5                 :            :  *  _    __   __      _           __
       6                 :            :  * | |  / /  / /     (_) ____    / /__
       7                 :            :  * | | / /  / /     / / / __ \  / //_/
       8                 :            :  * | |/ /  / /___  / / / / / / / ,<
       9                 :            :  * |___/  /_____/ /_/ /_/ /_/ /_/|_|
      10                 :            :  *
      11                 :            :  * Licensed under the Apache License, Version 2.0 (the "License");
      12                 :            :  * you may not use this file except in compliance with the License.
      13                 :            :  * You may obtain a copy of the License at
      14                 :            :  *
      15                 :            :  *     http://www.apache.org/licenses/LICENSE-2.0
      16                 :            :  *
      17                 :            :  * Unless required by applicable law or agreed to in writing, software
      18                 :            :  * distributed under the License is distributed on an "AS IS" BASIS,
      19                 :            :  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      20                 :            :  * See the License for the specific language governing permissions and
      21                 :            :  * limitations under the License.
      22                 :            :  */
      23                 :            : 
      24                 :            : #include "./impl/conf.h"
      25                 :            : 
      26                 :            : #include <memory>
      27                 :            : 
      28                 :            : #include "./base/logger.h"
      29                 :            : #include "./impl/client_impl.h"
      30                 :            : #include "./impl/getter_impl.h"
      31                 :            : #include "./impl/publisher_impl.h"
      32                 :            : #include "./impl/server_impl.h"
      33                 :            : #include "./impl/setter_impl.h"
      34                 :            : #include "./impl/subscriber_impl.h"
      35                 :            : 
      36                 :            : namespace vlink {
      37                 :            : 
      38                 :            : // Conf
      39                 :       2844 : Conf::~Conf() = default;
      40                 :            : 
      41                 :       1644 : bool Conf::parse(ImplType impl_type) const {
      42         [ +  + ]:       1644 :   if VUNLIKELY (impl_type == kUnknownImplType) {
      43   [ +  -  -  + ]:          8 :     VLOG_F("Conf::parse() called with unknown node type (kUnknownImplType).");
      44                 :          0 :     return false;
      45                 :            :   }
      46                 :            : 
      47                 :       1640 :   impl_type_ = impl_type;
      48                 :       1640 :   return true;
      49                 :            : }
      50                 :            : 
      51                 :          2 : bool Conf::is_valid() const { return false; }
      52                 :            : 
      53                 :        758 : ImplType Conf::get_impl_type() const { return impl_type_; }
      54                 :            : 
      55                 :          2 : TransportType Conf::get_transport_type() const { return TransportType::kUnknown; }
      56                 :            : 
      57                 :       1818 : Conf::Conf() = default;
      58                 :            : 
      59                 :          1 : bool Conf::parse_protocol(struct Protocol* protocol) {
      60                 :            :   (void)protocol;
      61                 :          1 :   return false;
      62                 :            : }
      63                 :            : 
      64                 :          1 : std::unique_ptr<ServerImpl> Conf::create_server() const { return nullptr; }
      65                 :            : 
      66                 :          1 : std::unique_ptr<ClientImpl> Conf::create_client() const { return nullptr; }
      67                 :            : 
      68                 :          1 : std::unique_ptr<PublisherImpl> Conf::create_publisher() const { return nullptr; }
      69                 :            : 
      70                 :          1 : std::unique_ptr<SubscriberImpl> Conf::create_subscriber() const { return nullptr; }
      71                 :            : 
      72                 :          1 : std::unique_ptr<SetterImpl> Conf::create_setter() const { return nullptr; }
      73                 :            : 
      74                 :          1 : std::unique_ptr<GetterImpl> Conf::create_getter() const { return nullptr; }
      75                 :            : 
      76                 :            : }  // namespace vlink

Generated by: LCOV version 1.14