LCOV - code coverage report
Current view: top level - root/contrail/src/contrail-common/sandesh/compiler/parse - t_container.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 7 14 50.0 %
Date: 2026-11-09 02:10:49 Functions: 3 7 42.9 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Licensed to the Apache Software Foundation (ASF) under one
       3             :  * or more contributor license agreements. See the NOTICE file
       4             :  * distributed with this work for additional information
       5             :  * regarding copyright ownership. The ASF licenses this file
       6             :  * to you under the Apache License, Version 2.0 (the
       7             :  * "License"); you may not use this file except in compliance
       8             :  * with the License. You may obtain a copy of the License at
       9             :  *
      10             :  *   http://www.apache.org/licenses/LICENSE-2.0
      11             :  *
      12             :  * Unless required by applicable law or agreed to in writing,
      13             :  * software distributed under the License is distributed on an
      14             :  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      15             :  * KIND, either express or implied. See the License for the
      16             :  * specific language governing permissions and limitations
      17             :  * under the License.
      18             :  *
      19             :  * Modifications Copyright (c) Juniper Networks, Inc.
      20             :  * Copyright Contributors to the OpenSDN project
      21             :  */
      22             : 
      23             : #ifndef T_CONTAINER_H
      24             : #define T_CONTAINER_H
      25             : 
      26             : #include "t_type.h"
      27             : 
      28             : class t_container : public t_type {
      29             :  public:
      30       11038 :   t_container() :
      31       11038 :     cpp_name_(),
      32       11038 :     has_cpp_name_(false) {}
      33             : 
      34           0 :   virtual ~t_container() {}
      35             : 
      36           0 :   void set_cpp_name(std::string cpp_name) {
      37           0 :     cpp_name_ = cpp_name;
      38           0 :     has_cpp_name_ = true;
      39           0 :   }
      40             : 
      41       12876 :   bool has_cpp_name() {
      42       12876 :     return has_cpp_name_;
      43             :   }
      44             : 
      45           0 :   std::string get_cpp_name() {
      46           0 :     return cpp_name_;
      47             :   }
      48             : 
      49       21729 :   bool is_container() const {
      50       21729 :     return true;
      51             :   }
      52             : 
      53             :  private:
      54             :   std::string cpp_name_;
      55             :   bool has_cpp_name_;
      56             : 
      57             : };
      58             : 
      59             : #endif

Generated by: LCOV version 1.14