class LibraryLoader

Defined at line 466 of file ../../src/lib/fidl_codec/library_loader.h

An indexed collection of libraries.

WARNING: All references on Enum, Struct, Table, ... and all references on

types and fields must be destroyed before this class (LibraryLoader

should be one of the last objects we destroy).

Public Methods

void LibraryLoader ()

Creates a LibraryLoader with no libraries

Defined at line 473 of file ../../src/lib/fidl_codec/library_loader.h

LibraryLoader & operator= (const LibraryLoader & )

Defined at line 475 of file ../../src/lib/fidl_codec/library_loader.h

void LibraryLoader (const LibraryLoader & )

Defined at line 476 of file ../../src/lib/fidl_codec/library_loader.h

const std::vector<ProtocolMethod *> * GetByOrdinal (Ordinal64 ordinal)

Returns a pointer to a set of methods that have this ordinal. There may be

more than one if the method was composed into multiple protocols. For

convenience, the methods that are not composed are at the front of the

vector. Returns |nullptr| if there is no such method. The returned

pointer continues to be owned by the LibraryLoader, and should not be

deleted.

Defined at line 503 of file ../../src/lib/fidl_codec/library_loader.h

Library * GetLibraryFromName (const std::string & name)

If the library with name |name| is present in this loader, returns the

library. Otherwise, returns null.

|name| is of the format "a.b.c"

Defined at line 518 of file ../../src/lib/fidl_codec/library_loader.h

void LibraryLoader (const std::vector<std::string> & library_paths, LibraryReadError * err)

Creates a LibraryLoader populated by the given library paths.

Defined at line 617 of file ../../src/lib/fidl_codec/library_loader.cc

bool AddAll (const std::vector<std::string> & library_paths, LibraryReadError * err)

Add the libraries for all the paths.

Defined at line 621 of file ../../src/lib/fidl_codec/library_loader.cc

bool DecodeAll ()

Decode all the FIDL files.

Defined at line 634 of file ../../src/lib/fidl_codec/library_loader.cc

void AddPath (const std::string & path, LibraryReadError * err)

Adds a single library to this Loader given its path. Sets err as appropriate.

Defined at line 645 of file ../../src/lib/fidl_codec/library_loader.cc

void AddContent (const std::string & content, LibraryReadError * err, std::string source)

Adds a single library to this Loader given its content (the JSON text).

Sets err as appropriate. The optional `source` field denotes the location from which the

file was loaded, and is expected to be formatted as a file system path.

Defined at line 662 of file ../../src/lib/fidl_codec/library_loader.cc

void AddMethod (ProtocolMethod * method)

Adds a method ordinal to the ordinal map.

Defined at line 681 of file ../../src/lib/fidl_codec/library_loader.cc

void ParseBuiltinSemantics ()

Defined at line 694 of file ../../src/lib/fidl_codec/library_loader.cc

Friends

class Library