OpFlex Framework  1.7.0
ModelMetadata.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_MODELMETADATA_H
15 #define MODB_MODELMETADATA_H
16 
17 #include <string>
18 #include <vector>
19 
20 #include "opflex/modb/ClassInfo.h"
21 
22 namespace opflex {
23 namespace modb {
24 
48 public:
55  ModelMetadata(const std::string& model_name,
56  const std::vector<ClassInfo>& classes);
57 
62 
67  const std::string& getName() const { return model_name; }
68 
73  const std::vector<ClassInfo>& getClasses() const { return classes; }
74 
75 private:
79  std::string model_name;
80 
84  std::string model_version;
85 
89  std::vector<ClassInfo> classes;
90 };
91 
92 /* @} metadata */
93 /* @} cpp */
94 
95 } /* namespace modb */
96 } /* namespace opflex */
97 
98 #endif /* MODB_MODELMETADATA_H */
const std::vector< ClassInfo > & getClasses() const
Get the classes that exist in this model.
Definition: ModelMetadata.h:73
ModelMetadata(const std::string &model_name, const std::vector< ClassInfo > &classes)
Construct a model metadata object for the given class ID.
const std::string & getName() const
Get the name for this model.
Definition: ModelMetadata.h:67
Interface definition file for ClassInfo.
Model metadata encapsulated all the metadata for a given model.
Definition: ModelMetadata.h:47
~ModelMetadata()
Destroy the class index.