OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:Person
(Results
1 - 7
of
7
) sorted by null
/external/javassist/sample/reflect/
Person.java
10
public class
Person
{
17
public
Person
(String name, int birthYear) {
41
Person
p = new
Person
(name, 1960);
/external/protobuf/examples/
AddPerson.java
4
import com.example.tutorial.AddressBookProtos.
Person
;
14
// This function fills in a
Person
message based on user input.
15
static
Person
PromptForAddress(BufferedReader stdin,
17
Person
.Builder
person
=
Person
.newBuilder();
local
19
stdout.print("Enter
person
ID: ");
20
person
.setId(Integer.valueOf(stdin.readLine()));
23
person
.setName(stdin.readLine());
28
person
.setEmail(email)
[
all
...]
add_person.cc
9
// This function fills in a
Person
message based on user input.
10
void PromptForAddress(tutorial::
Person
*
person
) {
11
cout << "Enter
person
ID number: ";
14
person
->set_id(id);
18
getline(cin, *
person
->mutable_name());
24
person
->set_email(email);
35
tutorial::
Person
::PhoneNumber* phone_number =
person
->add_phone();
42
phone_number->set_type(tutorial::
Person
::MOBILE)
[
all
...]
list_people.cc
12
const tutorial::
Person
&
person
= address_book.
person
(i);
local
14
cout << "
Person
ID: " <<
person
.id() << endl;
15
cout << " Name: " <<
person
.name() << endl;
16
if (
person
.has_email()) {
17
cout << " E-mail address: " <<
person
.email() << endl;
20
for (int j = 0; j <
person
.phone_size(); j++) {
21
const tutorial::
Person
::PhoneNumber& phone_number = person.phone(j)
[
all
...]
add_person.py
8
# This function fills in a
Person
message based on user input.
9
def PromptForAddress(
person
):
10
person
.id = int(raw_input("Enter
person
ID number: "))
11
person
.name = raw_input("Enter name: ")
15
person
.email = email
22
phone_number =
person
.phone.add()
27
phone_number.type = addressbook_pb2.
Person
.MOBILE
29
phone_number.type = addressbook_pb2.
Person
.HOME
31
phone_number.type = addressbook_pb2.
Person
.WOR
[
all
...]
list_people.py
10
for
person
in address_book.
person
:
11
print "
Person
ID:",
person
.id
12
print " Name:",
person
.name
13
if
person
.HasField('email'):
14
print " E-mail address:",
person
.email
16
for phone_number in
person
.phone:
17
if phone_number.type == addressbook_pb2.
Person
.MOBILE:
19
elif phone_number.type == addressbook_pb2.
Person
.HOME
[
all
...]
ListPeople.java
4
import com.example.tutorial.AddressBookProtos.
Person
;
12
for (
Person
person
: addressBook.getPersonList()) {
13
System.out.println("
Person
ID: " +
person
.getId());
14
System.out.println(" Name: " +
person
.getName());
15
if (
person
.hasEmail()) {
16
System.out.println(" E-mail address: " +
person
.getEmail());
19
for (
Person
.PhoneNumber phoneNumber :
person
.getPhoneList())
[
all
...]
Completed in 64 milliseconds