Panda3D
Public Member Functions | List of all members
DXFLayerMap Class Reference

A map of string (layer name) to DXFLayer: that is, the layers of a file ordered by name. More...

#include "dxfLayerMap.h"

Inheritance diagram for DXFLayerMap:
pmap< std::string, DXFLayer * >

Public Member Functions

DXFLayerget_layer (const std::string &name, DXFFile *dxffile)
 Looks up the layer name in the map, and returns a pointer to the associated DXFLayer. More...
 
- Public Member Functions inherited from pmap< std::string, DXFLayer * >
 pmap (TypeHandle type_handle=pmap_type_handle)
 
 pmap (const std::less< std::string > &comp, TypeHandle type_handle=pmap_type_handle)
 

Additional Inherited Members

- Public Types inherited from pmap< std::string, DXFLayer * >
typedef pallocator_single< std::pair< const std::string, DXFLayer * > > allocator
 
typedef std::map< std::string, DXFLayer *, std::less< std::string >, allocatorbase_class
 

Detailed Description

A map of string (layer name) to DXFLayer: that is, the layers of a file ordered by name.

This is used as a lookup within DXFFile to locate the layer associated with a particular entity.

Definition at line 28 of file dxfLayerMap.h.

Member Function Documentation

◆ get_layer()

DXFLayer * DXFLayerMap::get_layer ( const std::string &  name,
DXFFile dxffile 
)

Looks up the layer name in the map, and returns a pointer to the associated DXFLayer.

If this is the first time this layer name has been used, creates a new DXFLayer by the given name. In this case, it calls dxffile->new_layer() to create the layer, allowing user code to override this function to create a specialized time, if desired.

Definition at line 25 of file dxfLayerMap.cxx.


The documentation for this class was generated from the following files: