% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hook.R
\name{vecvec_register}
\alias{vecvec_register}
\title{Register methods for a vecvec subclass}
\usage{
vecvec_register(x)
}
\arguments{
\item{x}{An S7 class object that extends \link{class_vecvec}. Typically the
class object created by \code{\link[S7:new_class]{S7::new_class()}} in your package, e.g.
\code{class_myvec}.}
}
\value{
\code{NULL}, invisibly. Called for its side effects.
}
\description{
Call \code{vecvec_register()} inside your package's \code{.onLoad()} function to
register the S3 methods that allow a custom
\link[=class_vecvec]{vecvec} subclass to participate in the
\href{https://vctrs.r-lib.org/}{vctrs} vector system.
}
\details{
Specifically, \code{vecvec_register()} registers:
\itemize{
\item \verb{vec_cast.<class>.*} methods, so that other types can be cast \emph{to} your
vecvec subclass.
\item \verb{vec_cast.*.<class>} methods, so that your vecvec subclass can be cast
\emph{from} other types.
}
}
\examples{
\dontrun{
# In your package, define a vecvec subclass:
class_myvec <- S7::new_class(
  "myvec",
  parent = vecvec::class_vecvec
)

# Then register it in .onLoad():
.onLoad <- function(libname, pkgname) {
  S7::methods_register()
  vecvec::vecvec_register(class_myvec)
}
}
}
