A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CatalogPrintMetadata.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * *
3  * Copyright 2018 Rice University *
4  * *
5  * Licensed under the Apache License, Version 2.0 (the "License"); *
6  * you may not use this file except in compliance with the License. *
7  * You may obtain a copy of the License at *
8  * *
9  * http://www.apache.org/licenses/LICENSE-2.0 *
10  * *
11  * Unless required by applicable law or agreed to in writing, software *
12  * distributed under the License is distributed on an "AS IS" BASIS, *
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14  * See the License for the specific language governing permissions and *
15  * limitations under the License. *
16  * *
17  *****************************************************************************/
18 /*
19  * CatalogPrintMetadata.h
20  *
21  */
22 
23 #ifndef CATALOG_PRINT_METADATA_H_
24 #define CATALOG_PRINT_METADATA_H_
25 
26 #include <iostream>
27 #include "Object.h"
28 #include "PDBString.h"
29 #include "PDBVector.h"
30 
31 // PRELOAD %CatalogPrintMetadata%
32 
33 using namespace std;
34 
35 namespace pdb {
36 
37 // This class serves to retrieve metadata from the Catalog and returns it
38 // as a String
39 
40 class CatalogPrintMetadata : public Object {
41 public:
43 
45  String itemName,
46  String timeStamp,
47  String categoryIn)
48  : itemName(itemName),
49  timeStamp(timeStamp),
50  category(categoryIn) {}
51 
52 
53  // Copy constructor
55  itemName = pdbItemToCopy.itemName;
56  timeStamp = pdbItemToCopy.timeStamp;
57  category = pdbItemToCopy.category;
58 
59  }
60 
61  // Copy constructor
63  itemName = pdbItemToCopy->getItemName();
64  timeStamp = pdbItemToCopy->getTimeStamp();
65  category = pdbItemToCopy->getCategoryToPrint();
66  }
67 
68 
70  return itemName;
71  }
72 
74  return timeStamp;
75  }
76 
78  return category;
79  }
80 
82  return metadataToPrint;
83  }
84 
85  String setMetadataToPrint(string &metadataIn) {
86  return metadataToPrint = String(metadataIn);
87  }
88 
90 
91 private:
92  // the category to print (databases, sets, nodes, udts)
93  // udts are user-defined types
95  // the item Name to print
97  // the starting timeStamp to include, will retrieve
98  // only metadata created after a given timeline
100  // a string with the metadata to print
102 };
103 
104 } /* namespace pdb */
105 
106 #endif /* CATALOG_PRINT_METADATA_H_ */
#define ENABLE_DEEP_COPY
Definition: DeepCopy.h:52
CatalogPrintMetadata(const CatalogPrintMetadata &pdbItemToCopy)
String setMetadataToPrint(string &metadataIn)
CatalogPrintMetadata(String itemName, String timeStamp, String categoryIn)
CatalogPrintMetadata(const Handle< CatalogPrintMetadata > &pdbItemToCopy)