# OEAltLocationState¶

class OEAltLocationState


This class represents OEAltLocationState, an abstraction of the internal OEAltLocation selection state of an OEAltLocationFactory. It is designed for ease of use with collection classes and to support serialization.

The following OEAltLocationFactory methods get or set an OEAltLocationState:

## Constructors¶

OEAltLocationState()
OEAltLocationState(const std::string &hex)
OEAltLocationState(const OEAltLocationState &state)


Default and copy constructors.

If no arguments are supplied, the constructed object is uninitialized and will return false when operator bool is called.

If a string is supplied, then an object is constructed to represent the state described by the string. Strings appropriate for use with this method are generated by OEAltLocationState.ToHexString. This constructor is used when reconstituting the serialized state of an OEAltLocationFactory prior to providing the resulting OEAltLocationState to OEAltLocationFactory.MakeAltMol.

If an OEAltLocationState is supplied, an object is constructed that is identical to the input.

## operator=¶

OEAltLocationState &operator=(const OEAltLocationState &state)


Assignment – sets this state to match the supplied OEAltLocationState.

## operator bool¶

operator bool() const


Returns true if the state has been initialized (constructed from a string argument or from another state that has been initialized). Otherwise, returns false.

## ToHexString¶

bool ToHexString(std::string &hex) const


Generate a text string that describes the state. Used when serializing the state of an OEAltLocationFactory.