# Coriolis Core (CRL) Documentation

AllianceLibrary.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | Alliance / Hurricane Interface |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./crlcore/AllianceLibrary.h" |
14 // +-----------------------------------------------------------------+
15
16
17 #ifndef CRL_ALLIANCE_LIBRARY_H
18 #define CRL_ALLIANCE_LIBRARY_H
19
20 #include <string>
21 #include <vector>
22 #include "hurricane/Name.h"
23 #include "hurricane/Slot.h"
24
25 namespace Hurricane {
26 class Library;
27 }
28
29
30 namespace CRL {
31
32 using std::vector;
33 using Hurricane::JsonObject;
34 using Hurricane::JsonStack;
35 using Hurricane::Name;
36 using Hurricane::Library;
37 using Hurricane::Record;
38 using Hurricane::_TName;
39
40
41 // -------------------------------------------------------------------
42 // Class : "CRL::AllianceLibrary".
43
44 class AllianceLibrary {
45
46 public:
47 AllianceLibrary ();
48 AllianceLibrary ( const Name& path, Library* library=NULL );
49 AllianceLibrary& operator= ( const AllianceLibrary& directory );
50 AllianceLibrary& operator= ( const std::string& path );
51 inline const Name& getPath () const;
52 inline Library* getLibrary () const;
53 void saveCells () const;
54 void saveCATAL () const;
55 void toJson ( JsonWriter* ) const;
56 inline std::string _getTypeName () const;
57 std::string _getString () const;
58 Record* _getRecord () const;
59
60 protected:
61 Name _path;
62 Library* _library;
63
64 };
65
66
67 typedef vector<AllianceLibrary*> AllianceLibraries;
68
69
70 // Inline Functions.
71 inline const Name& AllianceLibrary::getPath () const { return _path; }
72 inline Library* AllianceLibrary::getLibrary () const { return _library; }
73 inline std::string AllianceLibrary::_getTypeName () const { return _TName("AllianceLibrary"); }
74
75
76 // -------------------------------------------------------------------
77 // Class : "JsonAllianceLibrary".
78
79 class JsonAllianceLibrary : public JsonObject {
80 public:
81 static void initialize ();
82 JsonAllianceLibrary ( unsigned long flags );
83 virtual std::string getTypeName () const;
84 virtual JsonAllianceLibrary* clone ( unsigned long flags ) const;
85 virtual void toData ( JsonStack& );
86 };
87
88
89 } // CRL namespace.
90
91
92 INSPECTOR_P_SUPPORT(CRL::AllianceLibrary);
93
94 #endif // CRL_ALLIANCE_LIBRARY_H
CRL::AllianceLibrary
A small wrapper around Hurricane::Library.
Definition: AllianceLibrary.h:44
Hurricane::Library
Hurricane::JsonObject
Hurricane::Name
Hurricane::JsonStack
CRL::AllianceLibrary::getPath
const Name & getPath() const
Definition: AllianceLibrary.h:71
CRL::AllianceLibrary::AllianceLibrary
AllianceLibrary()
Hurricane
CRL::AllianceLibrary::getLibrary
Library * getLibrary() const
Definition: AllianceLibrary.h:72
CRL
The namespace of Coriolis Core.
Definition: Environment.h:26

Generated by doxygen 1.8.14 on Mon Apr 27 2020 | Return to top of page

Coriolis Core (CRL) | Copyright © 2008-2016 UPMC All rights reserved