Coverage Report

Created: 2025-11-11 06:31

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/opendnp3/cpp/lib/src/app/IVariableLength.h
Line
Count
Source
1
/*
2
 * Copyright 2013-2022 Step Function I/O, LLC
3
 *
4
 * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O
5
 * LLC (https://stepfunc.io) under one or more contributor license agreements.
6
 * See the NOTICE file distributed with this work for additional information
7
 * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license
8
 * this file to you under the Apache License, Version 2.0 (the "License"); you
9
 * may not use this file except in compliance with the License. You may obtain
10
 * a copy of the License at:
11
 *
12
 * http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20
#ifndef OPENDNP3_IVARIABLELENGTH_H
21
#define OPENDNP3_IVARIABLELENGTH_H
22
23
#include "opendnp3/app/GroupVariationID.h"
24
25
#include <ser4cpp/container/SequenceTypes.h>
26
27
namespace opendnp3
28
{
29
30
class IVariableLength
31
{
32
33
public:
34
0
    virtual ~IVariableLength() {}
35
36
    virtual GroupVariationID InstanceID() const = 0;
37
38
    // The size of the object in its current configuration
39
    virtual size_t Size() const = 0;
40
41
    // attempt to write the object to the destination buffer
42
    virtual bool Write(ser4cpp::wseq_t& dest) const = 0;
43
44
    // attempt to read the object from the input buffer
45
    virtual bool Read(const ser4cpp::rseq_t& input) = 0;
46
};
47
48
} // namespace opendnp3
49
50
#endif