=encoding utf8

=head1 NAME

PDK::Content::Role - A Moose role for content parsing and management

=head1 SYNOPSIS

  package MyContentParser;
  use Moose;
  with 'PDK::Content::Role';

  # Implement required methods
  sub config { ... }
  sub confContent { ... }
  sub cursor { ... }
  sub goToHead { ... }
  sub nextLine { ... }
  sub prevLine { ... }
  sub nextUnParsedLine { ... }
  sub moveBack { ... }
  sub ignore { ... }
  sub getUnParsedLines { ... }

=head1 DESCRIPTION

PDK::Content::Role is a Moose role that defines a common interface for content parsing and management. It provides a set of attributes and required methods that implementing classes must define to handle configuration content effectively.

=head1 ATTRIBUTES

=head2 id

An integer representing the unique identifier of the content. This attribute is required and read-only.

=head2 name

A string representing the name of the content, used for display and identification. This attribute is required and read-only.

=head2 type

A string representing the type or category of the content. This attribute is required and read-only.

=head2 sign

A string representing the configuration signature, used to verify the integrity of the content. This attribute is required and read-only.

=head2 timestamp

A string representing the timestamp of when the content was created or modified. This attribute is required and read-only.

=head2 lineParsedFlags

An arrayref of integers representing the parse status of each line in the content. It is built using the C<_buildLineParsedFlags> method, which must be implemented by the consuming class.

=head2 debug

An integer representing the debug level, used to control the output of debug information. This attribute is optional and read-only.

=head1 REQUIRED METHODS

The following methods must be implemented by any class consuming this role:

=head2 config

Method to get or set the configuration.

=head2 confContent

Method to get the configuration content as text.

=head2 cursor

Method to get or set the current parsing position.

=head2 goToHead

Method to reset the parsing position to the beginning.

=head2 nextLine

Method to move to the next line and return its content.

=head2 prevLine

Method to move to the previous line and return its content.

=head2 nextUnParsedLine

Method to find and return the next unparsed line, skipping already parsed lines.

=head2 moveBack

Method to return to the previous parsing position.

=head2 ignore

Method to skip the current line.

=head2 getUnParsedLines

Method to return all unparsed lines.

=head1 AUTHOR

WENWU YAN E<lt>968828@gmail.comE<gt>

=head1 LICENSE

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

=cut