OpFlex Framework 1.7.0
ConstInfo.h
Go to the documentation of this file.
1/* -*- C++ -*-; c-basic-offset: 4; indent-tabs-mode: nil */
6/*
7 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
8 *
9 * This program and the accompanying materials are made available under the
10 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
11 * and is available at http://www.eclipse.org/legal/epl-v10.html
12 */
13
14#ifndef MODB_CONSTINFO_H
15#define MODB_CONSTINFO_H
16
17#include <string>
18#include <boost/cstdint.hpp>
19
20namespace opflex {
21namespace modb {
22
29
36class ConstInfo {
37public:
38
42 ConstInfo(const std::string &name_,
43 uint64_t id_)
44 : name(name_), id(id_) {}
45
50
56 const std::string& getName() const { return name; }
57
62 const uint64_t getId() const { return id; }
63
64private:
68 std::string name;
69
73 uint64_t id;
74};
75
76/* @} metadata */
77/* @} cpp */
78
79} /* namespace modb */
80} /* namespace opflex */
81
82#endif
const std::string & getName() const
Get the name for this const.
Definition ConstInfo.h:56
~ConstInfo()
Destructor.
Definition ConstInfo.h:49
ConstInfo(const std::string &name_, uint64_t id_)
Construct a const info object with the given name and ID.
Definition ConstInfo.h:42
const uint64_t getId() const
Get the unique ID for this const within the enclosing enum.
Definition ConstInfo.h:62